summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2013-01-17 10:15:52 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2013-01-24 18:31:05 +0100
commitcee3950eeac9746991c29fbf359b9f31f50dbb51 (patch)
treea2aec3fe42e668eebdb5a50dbdd701656e2eb2bf /tools
parent9c127b32a27e5077f4688f5241ef1890f0217038 (diff)
downloadmsitools-cee3950eeac9746991c29fbf359b9f31f50dbb51.tar.gz
msitools-cee3950eeac9746991c29fbf359b9f31f50dbb51.tar.xz
msitools-cee3950eeac9746991c29fbf359b9f31f50dbb51.zip
wixl: add ServiceControl, ServiceInstall and their children elements
Diffstat (limited to 'tools')
-rw-r--r--tools/wixl/builder.vala12
-rw-r--r--tools/wixl/wix.vala90
2 files changed, 102 insertions, 0 deletions
diff --git a/tools/wixl/builder.vala b/tools/wixl/builder.vala
index dd4d646..69c5e19 100644
--- a/tools/wixl/builder.vala
+++ b/tools/wixl/builder.vala
@@ -762,6 +762,18 @@ namespace Wixl {
public override void visit_text (WixText text) throws GLib.Error {
}
+
+ public override void visit_service_argument (WixServiceArgument service_argument) throws GLib.Error {
+ }
+
+ public override void visit_service_control (WixServiceControl service_control, VisitState state) throws GLib.Error {
+ }
+
+ public override void visit_service_dependency (WixServiceDependency service_dependency) throws GLib.Error {
+ }
+
+ public override void visit_service_install (WixServiceInstall service_install, VisitState state) throws GLib.Error {
+ }
}
} // Wixl
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),
});
}