diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2013-01-17 10:15:52 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2013-01-24 18:31:05 +0100 |
commit | cee3950eeac9746991c29fbf359b9f31f50dbb51 (patch) | |
tree | a2aec3fe42e668eebdb5a50dbdd701656e2eb2bf /tools/wixl/wix.vala | |
parent | 9c127b32a27e5077f4688f5241ef1890f0217038 (diff) | |
download | msitools-cee3950eeac9746991c29fbf359b9f31f50dbb51.tar.gz msitools-cee3950eeac9746991c29fbf359b9f31f50dbb51.tar.xz msitools-cee3950eeac9746991c29fbf359b9f31f50dbb51.zip |
wixl: add ServiceControl, ServiceInstall and their children elements
Diffstat (limited to 'tools/wixl/wix.vala')
-rw-r--r-- | tools/wixl/wix.vala | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/tools/wixl/wix.vala b/tools/wixl/wix.vala index 6a4ed85..beacd2f 100644 --- a/tools/wixl/wix.vala +++ b/tools/wixl/wix.vala @@ -33,6 +33,10 @@ namespace Wixl { public abstract void visit_extension (WixExtension extension) throws GLib.Error; public abstract void visit_verb (WixVerb verb) throws GLib.Error; public abstract void visit_mime (WixMIME mime) throws GLib.Error; + public abstract void visit_service_argument (WixServiceArgument service_argument) throws GLib.Error; + public abstract void visit_service_control (WixServiceControl service_control, VisitState state) throws GLib.Error; + public abstract void visit_service_dependency (WixServiceDependency service_dependency) throws GLib.Error; + public abstract void visit_service_install (WixServiceInstall service_install, VisitState state) throws GLib.Error; } public abstract class WixNode: Object { @@ -456,6 +460,90 @@ namespace Wixl { } } + public class WixServiceArgument: WixElement { + static construct { + name = "ServiceArgument"; + } + + public string get_text() { + foreach (var c in children) { + if (c is WixText) { + return (c as WixText).Text; + } + } + + return ""; + } + + public override void accept (WixNodeVisitor visitor) throws GLib.Error { + visitor.visit_service_argument (this); + } + } + + public class WixServiceControl: WixElement { + static construct { + name = "ServiceControl"; + + add_child_types (child_types, { + typeof (WixServiceArgument), + }); + } + + public string Name { get; set; } + public string Start { get; set; } + public string Stop { get; set; } + public string Remove { get; set; } + public string Wait { get; set; } + + public override void accept (WixNodeVisitor visitor) throws GLib.Error { + visitor.visit_service_control (this, VisitState.ENTER); + base.accept (visitor); + visitor.visit_service_control (this, VisitState.LEAVE); + } + } + + public class WixServiceDependency: WixElement { + static construct { + name = "ServiceDependency"; + } + + public string Group { get; set; } + + public override void accept (WixNodeVisitor visitor) throws GLib.Error { + visitor.visit_service_dependency (this); + } + } + + public class WixServiceInstall: WixElement { + static construct { + name = "ServiceInstall"; + + add_child_types (child_types, { + typeof (WixServiceDependency), + }); + } + + public string Name { get; set; } + public string DisplayName { get; set; } + public string Type { get; set; } + public string Interactive { get; set; } + public string Start { get; set; } + public string ErrorControl { get; set; } + public string Vital { get; set; } + public string LoadOrderGroup { get; set; } + public string Account { get; set; } + public string Password { get; set; } + public string Arguments { get; set; } + public string Description { get; set; } + public string EraseDescription { get; set; } + + public override void accept (WixNodeVisitor visitor) throws GLib.Error { + visitor.visit_service_install (this, VisitState.ENTER); + base.accept (visitor); + visitor.visit_service_install (this, VisitState.LEAVE); + } + } + public class WixVerb: WixElement { static construct { name = "Verb"; @@ -817,6 +905,8 @@ namespace Wixl { typeof (WixShortcut), typeof (WixProgId), typeof (WixRegistryKey), + typeof (WixServiceControl), + typeof (WixServiceInstall), }); } |