started work on xml file installation/configuration
authorkremlin <ian@kremlin.cc>
Sun, 8 Jun 2014 06:19:46 +0000 (01:19 -0500)
committerkremlin <ian@kremlin.cc>
Sun, 8 Jun 2014 06:19:46 +0000 (01:19 -0500)
src/interfaces/hostnamed/hostnamed.c
src/main.c
src/main.h
src/xml_defs.h [new file with mode: 0644]

index b2f96841cb148a40c824faace565215309e8bd19..42137cde94e27b8418da12ab4fa3bfb85343c648 100644 (file)
@@ -105,17 +105,7 @@ GError * hostnamed_init() {
 
        guint bus_descriptor;
        GError *err = NULL;     
-       gchar  **hnd_ispect_xml;
-       GDir   *cur_dir;
-       gchar  *dir;
        
-       cur_dir = g_dir_open("./../", 0, err);
-
-       g_sprintf(dir, "%s\n", g_dir_read_name(cur_dir));
-
-       //g_file_get_contents("../../../../conf/hostnamed-ispect.xml", hnd_ispect_xml, NULL, err);
-       //spect_data = g_dbus_node_info_new_for_xml(hnd_ispect_xml, &err);
-
        bus_descriptor = g_bus_own_name(G_BUS_TYPE_SYSTEM,
                                        (gchar *)"org.freedesktop.hostname1",
                                                    G_BUS_NAME_OWNER_FLAGS_NONE,
index c19b489c31633dea4c4a60cf041e8b8a23445971..59e23fe96ea74a26525ccde1cba2d10b629a02b2 100644 (file)
@@ -1,7 +1,21 @@
+/* debugging */
+#define INSTALL 1
+#define NO_BUILTIN_XML 1
+
+/* end debugging */
+
 #include <gio/gio.h>
 #include "interfaces/hostnamed/hostnamed.c"
+#include "main.h"
 
 int main() {
+
+       #if (defined NO_BUILTIN_XML && defined INSTALL)
+               if(!install_conf())
+                       g_printf("%s\n", "FAILED to install xml configs!");;            
+       #else
+       #endif
+
        GMainLoop *mloop = NULL;
        
        mloop = g_main_loop_new(NULL, FALSE);
index 2fd39eaa782bd5fb6051b6d2146fd418a08e6639..1869cdac140118db187a386af6dc240a92bc0b2d 100644 (file)
@@ -1,51 +1,74 @@
 #include <gio/gio.h>
+#include "xml_defs.h"
 
-#ifdef  NO BUILTIN XML
-//TODO install conf
-#endif
-
-#ifndef NO_BUILTIN_XML
-gchar **hostnamed_config_xml =
-"<!DOCTYPE busconfig PUBLIC"
-"         \"-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN\""
-"         \"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd\">"
-"<busconfig>"
-"   <!-- Only members of 'wheel' and user 'daemon' may set hostnames -->"
-"   <policy group=\"wheel\">"
-"       <allow own=\"org.freedesktop.hostname1\"/>"
-"       <allow send_destination=\"org.freedesktop.hostname1\"/>"
-"       <allow receive_sender=\"org.freedesktop.hostname1\"/>"
-"   </policy>"
-"   <policy user=\"daemon\">"
-"       <allow own=\"org.freedesktop.hostname1\"/>"
-"       <allow send_destination=\"org.freedesktop.hostname1\"/>"
-"       <allow receive_sender=\"org.freedesktop.hostname1\"/>"
-"    </policy>"
-"</busconfig>";
-
-gchar **hostnamed_ispect_xml =
-"<!-- Taken from Gentoo Linux's OpenRC settingsd -->"
-"<node name=\"/org/freedesktop/hostname1\">"
-"    <interface name=\"org.freedesktop.hostname1\">"
-"        <method name=\"SetHostname\">"
-"            <arg direction=\"in\" type=\"s\" name=\"name\"/>"
-"            <arg direction=\"in\" type=\"b\" name=\"user_interaction\"/>"
-"        </method>"
-"        <method name=\"SetStaticHostname\">"
-"            <arg direction=\"in\" type=\"s\" name=\"name\"/>"
-"            <arg direction=\"in\" type=\"b\" name=\"user_interaction\"/>"
-"        </method>"
-"        <method name=\"SetPrettyHostname\">"
-"            <arg direction=\"in\" type=\"s\" name=\"name\"/>"
-"            <arg direction=\"in\" type=\"b\" name=\"user_interaction\"/>"
-"        </method>"
-"        <method name=\"SetIconName\">"
-"            <arg direction=\"in\" type=\"s\" name=\"name\"/>"
-"            <arg direction=\"in\" type=\"b\" name=\"user_interaction\"/>"
-"        </method>"
-"        <property name=\"Hostname\" type=\"s\" access=\"read\"/>"
-"        <property name=\"StaticHostname\" type=\"s\" access=\"read\"/>"
-"        <property name=\"PrettyHostname\" type=\"s\" access=\"read\"/>"
-"        <property name=\"IconName\" type=\"s\" access=\"read\"/>"
-"    </interface>"
-"</node>";
+//expects valid input, always free() output 
+const gchar **get_prefixs(gchar *path, gchar *dname) {
+       gsize size = sizeof(path) + sizeof(dname) + 11; //11 extra bytes for file suffix
+       const gchar **ret = (gchar**) g_malloc0(2 * size);
+
+       g_snprintf(ret[0], size, "%s%s-ispect.xml", path, dname);
+       g_snprintf(ret[1], size, "%s%s-config.xml", path, dname);
+
+       return ret;
+}
+
+const GString *strjoin(gchar *sep, GString strings[]) {
+       GString *cur;
+       GString *out;
+       gint n;
+
+       while((cur = &strings[n]) != NULL) {
+               g_string_append(out, cur);
+               n++;
+       }
+
+       return out;
+}
+
+gboolean install_conf() {
+       gchar *our_conf_uri   = "systemd-utl/xml-conf/";
+       gchar **data_dir = g_get_system_data_dirs();
+
+       if(g_strcmp0(data_dir[0], NULL)) {
+               const gchar our_conf_path[256];
+               g_snprintf(our_conf_path, sizeof our_conf_path, "%s%s", *data_dir, our_conf_uri);
+               GError **errors;
+
+               /*TODO permissions w/ this */
+               g_mkdir_with_parents(our_conf_path, 0644);
+
+               const gchar   **hostnamed_prefixs   = get_prefixs(our_conf_path, "hostnamed");
+               const GString *hostnamed_ispect_xml = strjoin("\n", hostnamed_ispect_xml_def);
+               const GString *hostnamed_config_xml = strjoin("\n", hostnamed_config_xml_def);
+
+               const gchar   **timedated_prefixs   = get_prefixs(our_conf_path, "timedated");
+               const GString *timedated_ispect_xml = strjoin("\n", timedated_ispect_xml_def);
+               const GString *timedated_config_xml = strjoin("\n", timedated_config_xml_def);
+
+               const gchar   **localed_prefixs   = get_prefixs(our_conf_path, "localed");
+               const GString *localed_ispect_xml = strjoin("\n", localed_ispect_xml_def);
+               const GString *localed_config_xml = strjoin("\n", localed_config_xml_def);
+
+               const gchar   **logind_prefixs   = get_prefixs(our_conf_path, "logind");
+               const GString *logind_ispect_xml = strjoin("\n", logind_ispect_xml_def);
+               const GString *logind_config_xml = strjoin("\n", logind_config_xml_def);        
+
+               g_file_set_contents(*hostnamed_prefixs[0], hostnamed_config_xml, -1, errors);
+               g_file_set_contents(*hostnamed_prefixs[1], hostnamed_config_xml, -1, errors);
+
+               g_file_set_contents(*timedated_prefixs[0], timedated_config_xml, -1, errors);
+               g_file_set_contents(*timedated_prefixs[1], timedated_config_xml, -1, errors);
+
+               g_file_set_contents(*localed_prefixs[0], localed_config_xml, -1, errors);
+               g_file_set_contents(*localed_prefixs[1], localed_config_xml, -1, errors);
+
+               g_file_set_contents(*logind_prefixs[0], logind_config_xml, -1, errors);
+               g_file_set_contents(*logind_prefixs[1], logind_config_xml, -1, errors);
+
+               /* TODO: free() strings */
+
+               return (errors[0] == NULL);
+
+               } else
+                       return FALSE;
+}
diff --git a/src/xml_defs.h b/src/xml_defs.h
new file mode 100644 (file)
index 0000000..52fd066
--- /dev/null
@@ -0,0 +1,446 @@
+const GString hostnamed_config_xml_def[] = {
+"<?xml version=\"1.0\" encoding=\"UTF-8\"?>",
+"<!DOCTYPE busconfig PUBLIC",
+"        \"-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN\"",
+"        \"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd\">",
+"<busconfig>",
+"    <!-- Only members of 'wheel' and user 'daemon' may set hostnames -->",
+"    <policy group=\"wheel\">",
+"        <allow own=\"org.freedesktop.hostname1\"/>",
+"        <allow send_destination=\"org.freedesktop.hostname1\"/>",
+"        <allow receive_sender=\"org.freedesktop.hostname1\"/>",
+"    </policy>",
+"    <policy user=\"daemon\">",
+"        <allow own=\"org.freedesktop.hostname1\"/>",
+"        <allow send_destination=\"org.freedesktop.hostname1\"/>",
+"        <allow receive_sender=\"org.freedesktop.hostname1\"/>",
+"    </policy>",
+"</busconfig>"};
+
+const GString hostnamed_ispect_xml_def[] = {
+"<?xml version=\"1.0\" encoding=\"UTF-8\"?>",
+"<!DOCTYPE node PUBLIC",
+"        \"-//freedesktop//DTD D-BUS Object Introspection 1.0//EN\"",
+"        \"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd\">",
+"<!-- Taken from Gentoo Linux's OpenRC settingsd -->",
+"<node name=\"/org/freedesktop/hostname1\">",
+"    <interface name=\"org.freedesktop.hostname1\">",
+"        <method name=\"SetHostname\">",
+"            <arg direction=\"in\" type=\"s\" name=\"name\"/>",
+"            <arg direction=\"in\" type=\"b\" name=\"user_interaction\"/>",
+"        </method>",
+"        <method name=\"SetStaticHostname\">",
+"            <arg direction=\"in\" type=\"s\" name=\"name\"/>",
+"            <arg direction=\"in\" type=\"b\" name=\"user_interaction\"/>",
+"        </method>",
+"        <method name=\"SetPrettyHostname\">",
+"            <arg direction=\"in\" type=\"s\" name=\"name\"/>",
+"            <arg direction=\"in\" type=\"b\" name=\"user_interaction\"/>",
+"        </method>",
+"        <method name=\"SetIconName\">",
+"            <arg direction=\"in\" type=\"s\" name=\"name\"/>",
+"            <arg direction=\"in\" type=\"b\" name=\"user_interaction\"/>",
+"        </method>",
+"        <property name=\"Hostname\" type=\"s\" access=\"read\"/>",
+"        <property name=\"StaticHostname\" type=\"s\" access=\"read\"/>",
+"        <property name=\"PrettyHostname\" type=\"s\" access=\"read\"/>",
+"        <property name=\"IconName\" type=\"s\" access=\"read\"/>",
+"    </interface>",
+"</node>"};
+
+const GString timedated_config_xml_def[] = {
+"<?xml version=\"1.0\" encoding=\"UTF-8\"?>",
+"<!DOCTYPE busconfig PUBLIC",
+"        \"-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN\"",
+"        \"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd\">",
+"<busconfig>",
+"    <!-- Only members of 'wheel' and user 'daemon' may change time settings -->",
+"    <policy group=\"wheel\">",
+"        <allow own=\"org.freedesktop.timedate1\"/>",
+"        <allow send_destination=\"org.freedesktop.timedate1\"/>",
+"        <allow receive_sender=\"org.freedesktop.timedate1\"/>",
+"    </policy>",
+"    <policy user=\"daemon\">",
+"       <allow own=\"org.freedesktop.timedate1\"/>",
+"       <allow send_destination=\"org.freedesktop.timedate1\"/>",
+"       <allow receive_sender=\"org.freedesktop.timedate1\"/>",
+"    </policy>",
+"</busconfig>"};
+
+const GString timedated_ispect_xml_def[] = {
+"<?xml version=\"1.0\" encoding=\"UTF-8\"?>",
+"<!DOCTYPE node PUBLIC",
+"        \"-//freedesktop//DTD D-BUS Object Introspection 1.0//EN\"",
+"        \"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd\">",
+"<!-- Taken from Gentoo Linux's OpenRC settingsd -->",
+"<node name=\"/org/freedesktop/timedate1\">",
+"    <interface name=\"org.freedesktop.timedate1\">",
+"        <method name=\"SetTime\">",
+"            <arg direction=\"in\" type=\"x\" name=\"usec_utc\"/>",
+"            <arg direction=\"in\" type=\"b\" name=\"relative\"/>",
+"            <arg direction=\"in\" type=\"b\" name=\"user_interaction\"/>",
+"        </method>",
+"        <method name=\"SetTimezone\">",
+"            <arg direction=\"in\" type=\"s\" name=\"timezone\"/>",
+"            <arg direction=\"in\" type=\"b\" name=\"user_interaction\"/>",
+"        </method>",
+"        <method name=\"SetLocalRTC\">",
+"            <arg direction=\"in\" type=\"b\" name=\"local_rtc\"/>",
+"            <arg direction=\"in\" type=\"b\" name=\"fix_system\"/>",
+"            <arg direction=\"in\" type=\"b\" name=\"user_interaction\"/>",
+"        </method>",
+"        <method name=\"SetNTP\">",
+"            <arg direction=\"in\" type=\"b\" name=\"use_ntp\"/>",
+"            <arg direction=\"in\" type=\"b\" name=\"user_interaction\"/>",
+"        </method>",
+"        <property name=\"Timezone\" type=\"s\" access=\"read\"/>",
+"        <property name=\"LocalRTC\" type=\"b\" access=\"read\"/>",
+"        <property name=\"NTP\" type=\"b\" access=\"read\"/>",
+"    </interface>",
+"</node>"};
+
+const GString localed_config_xml_def[] = {
+"<?xml version=\"1.0\" encoding=\"UTF-8\"?>",
+"<!DOCTYPE busconfig PUBLIC",
+"        \"-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN\"",
+"        \"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd\">",
+"<busconfig>",
+"    <!-- Only members of 'wheel' and user 'daemon' may change system-wide locales -->",
+"    <policy group=\"wheel\">",
+"        <allow own=\"org.freedesktop.locale1\"/>",
+"        <allow send_destination=\"org.freedesktop.locale1\"/>",
+"        <allow receive_sender=\"org.freedesktop.locale1\"/>",
+"    </policy>",
+"    <policy user=\"daemon\">",
+"       <allow own=\"org.freedesktop.locale1\"/>",
+"       <allow send_destination=\"org.freedesktop.locale1\"/>",
+"       <allow receive_sender=\"org.freedesktop.locale1\"/>",
+"    </policy>",
+"</busconfig>"};
+
+const GString localed_ispect_xml_def[] = {
+"<?xml version=\"1.0\" encoding=\"UTF-8\"?>",
+"<!DOCTYPE node PUBLIC",
+"        \"-//freedesktop//DTD D-BUS Object Introspection 1.0//EN\"",
+"        \"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd\">",
+"<!-- Taken from Gentoo Linux's OpenRC settingsd -->",
+"<node name=\"/org/freedesktop/locale1\">",
+"    <interface name=\"org.freedesktop.locale1\">",
+"        <method name=\"SetLocale\">",
+"            <arg direction=\"in\" type=\"as\" name=\"locale\" />",
+"            <arg direction=\"in\" type=\"b\" name=\"user_interaction\" />",
+"        </method>",
+"        <method name=\"SetVConsoleKeyboard\">",
+"            <arg direction=\"in\" type=\"s\" name=\"keymap\" />",
+"            <arg direction=\"in\" type=\"s\" name=\"keymap_toggle\" />",
+"            <arg direction=\"in\" type=\"b\" name=\"convert\" />",
+"            <arg direction=\"in\" type=\"b\" name=\"user_interaction\" />",
+"        </method>",
+"        <method name=\"SetX11Keyboard\">",
+"            <arg direction=\"in\" type=\"s\" name=\"layout\" />",
+"            <arg direction=\"in\" type=\"s\" name=\"model\" />",
+"            <arg direction=\"in\" type=\"s\" name=\"variant\" />",
+"            <arg direction=\"in\" type=\"s\" name=\"options\" />",
+"            <arg direction=\"in\" type=\"b\" name=\"convert\" />",
+"            <arg direction=\"in\" type=\"b\" name=\"user_interaction\" />",
+"        </method>",
+"        <property name=\"Locale\" type=\"as\" access=\"read\" />",
+"        <property name=\"VConsoleKeymap\" type=\"s\" access=\"read\" />",
+"        <property name=\"VConsoleKeymapToggle\" type=\"s\" access=\"read\" />",
+"        <property name=\"X11Layout\" type=\"s\" access=\"read\" />",
+"        <property name=\"X11Model\" type=\"s\" access=\"read\" />",
+"        <property name=\"X11Variant\" type=\"s\" access=\"read\" />",
+"        <property name=\"X11Options\" type=\"s\" access=\"read\" />",
+"    </interface>",
+"</node>"};
+
+const GString logind_config_xml_def[] = {
+"<?xml version=\"1.0\" encoding=\"UTF-8\"?>",
+"<!DOCTYPE busconfig PUBLIC",
+"        \"-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN\"",
+"        \"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd\">",
+"<busconfig>",
+"    <!-- TODO: figure out nessecary logind permissions -->",
+"    <policy group=\"wheel\">",
+"        <allow own=\"org.freedesktop.login1\"/>",
+"        <allow send_destination=\"org.freedesktop.login1\"/>",
+"        <allow receive_sender=\"org.freedesktop.login1\"/>",
+"    </policy>",
+"    <policy user=\"daemon\">",
+"       <allow own=\"org.freedesktop.login1\"/>",
+"       <allow send_destination=\"org.freedesktop.login1\"/>",
+"       <allow receive_sender=\"org.freedesktop.login1\"/>",
+"    </policy>",
+"</busconfig>"};
+
+const GString logind_ispect_xml_def[] = {
+"<?xml version=\"1.0\" encoding=\"UTF-8\"?>",
+"<!DOCTYPE node PUBLIC",
+"        \"-//freedesktop//DTD D-BUS Object Introspection 1.0//EN\"",
+"        \"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd\">",
+"<node name=\"/org/freedesktop/login1\">",
+"    <interface name=\"org.freedesktop.DBus.Peer\">",
+"        <method name=\"Ping\" />",
+"        <method name=\"GetMachineId\">",
+"            <arg type=\"s\" name=\"machine_uuid\" direction=\"out\" />",
+"        </method>",
+"    </interface>",
+"    <interface name=\"org.freedesktop.DBus.Introspectable\">",
+"        <method name=\"Introspect\">",
+"            <arg name=\"data\" type=\"s\" direction=\"out\" />",
+"        </method>",
+"    </interface>",
+"    <interface name=\"org.freedesktop.DBus.Properties\">",
+"        <method name=\"Get\">",
+"            <arg name=\"interface\" direction=\"in\" type=\"s\" />",
+"            <arg name=\"property\" direction=\"in\" type=\"s\" />",
+"            <arg name=\"value\" direction=\"out\" type=\"v\" />",
+"        </method>",
+"        <method name=\"GetAll\">",
+"            <arg name=\"interface\" direction=\"in\" type=\"s\" />",
+"            <arg name=\"properties\" direction=\"out\" type=\"a{sv}\" />",
+"        </method>",
+"        <method name=\"Set\">",
+"            <arg name=\"interface\" direction=\"in\" type=\"s\" />",
+"            <arg name=\"property\" direction=\"in\" type=\"s\" />",
+"            <arg name=\"value\" direction=\"in\" type=\"v\" />",
+"        </method>",
+"        <signal name=\"PropertiesChanged\">",
+"            <arg type=\"s\" name=\"interface\" direction=\"in\" />",
+"            <arg type=\"a{sv}\" name=\"changed_properties\" direction=\"in\" />",
+"            <arg type=\"as\" name=\"invalidated_properties\" direction=\"in\" />",
+"        </signal>",
+"    </interface>",
+"    <interface name=\"org.freedesktop.login1.Manager\">",
+"        <property name=\"NAutoVTs\" type=\"u\" access=\"read\">",
+"            <annotation name=\"org.freedesktop.DBus.Property.EmitsChangedSignal\" value=\"const\" />",
+"        </property>",
+"        <property name=\"KillOnlyUsers\" type=\"as\" access=\"read\">",
+"            <annotation name=\"org.freedesktop.DBus.Property.EmitsChangedSignal\" value=\"const\" />",
+"        </property>",
+"        <property name=\"KillExcludeUsers\" type=\"as\" access=\"read\">",
+"            <annotation name=\"org.freedesktop.DBus.Property.EmitsChangedSignal\" value=\"const\" />",
+"        </property>",
+"        <property name=\"KillUserProcesses\" type=\"b\" access=\"read\">",
+"            <annotation name=\"org.freedesktop.DBus.Property.EmitsChangedSignal\" value=\"const\" />",
+"        </property>",
+"        <property name=\"IdleHint\" type=\"b\" access=\"read\" />",
+"        <property name=\"IdleSinceHint\" type=\"t\" access=\"read\" />",
+"        <property name=\"IdleSinceHintMonotonic\" type=\"t\" access=\"read\" />",
+"        <property name=\"BlockInhibited\" type=\"s\" access=\"read\" />",
+"        <property name=\"DelayInhibited\" type=\"s\" access=\"read\" />",
+"        <property name=\"InhibitDelayMaxUSec\" type=\"t\" access=\"read\">",
+"            <annotation name=\"org.freedesktop.DBus.Property.EmitsChangedSignal\" value=\"const\" />",
+"        </property>",
+"        <property name=\"HandlePowerKey\" type=\"s\" access=\"read\">",
+"            <annotation name=\"org.freedesktop.DBus.Property.EmitsChangedSignal\" value=\"const\" />",
+"        </property>",
+"        <property name=\"HandleSuspendKey\" type=\"s\" access=\"read\">",
+"            <annotation name=\"org.freedesktop.DBus.Property.EmitsChangedSignal\" value=\"const\" />",
+"        </property>",
+"        <property name=\"HandleHibernateKey\" type=\"s\" access=\"read\">",
+"            <annotation name=\"org.freedesktop.DBus.Property.EmitsChangedSignal\" value=\"const\" />",
+"        </property>",
+"        <property name=\"HandleLidSwitch\" type=\"s\" access=\"read\">",
+"            <annotation name=\"org.freedesktop.DBus.Property.EmitsChangedSignal\" value=\"const\" />",
+"        </property>",
+"        <property name=\"IdleAction\" type=\"s\" access=\"read\">",
+"            <annotation name=\"org.freedesktop.DBus.Property.EmitsChangedSignal\" value=\"const\" />",
+"        </property>",
+"        <property name=\"IdleActionUSec\" type=\"t\" access=\"read\">",
+"            <annotation name=\"org.freedesktop.DBus.Property.EmitsChangedSignal\" value=\"const\" />",
+"        </property>",
+"        <property name=\"PreparingForShutdown\" type=\"b\" access=\"read\">",
+"            <annotation name=\"org.freedesktop.DBus.Property.EmitsChangedSignal\" value=\"false\" />",
+"        </property>",
+"        <property name=\"PreparingForSleep\" type=\"b\" access=\"read\">",
+"            <annotation name=\"org.freedesktop.DBus.Property.EmitsChangedSignal\" value=\"false\" />",
+"        </property>",
+"        <method name=\"GetSession\">",
+"            <arg type=\"s\" direction=\"in\" />",
+"            <arg type=\"o\" direction=\"out\" />",
+"        </method>",
+"        <method name=\"GetSessionByPID\">",
+"            <arg type=\"u\" direction=\"in\" />",
+"            <arg type=\"o\" direction=\"out\" />",
+"        </method>",
+"        <method name=\"GetUser\">",
+"            <arg type=\"u\" direction=\"in\" />",
+"            <arg type=\"o\" direction=\"out\" />",
+"        </method>",
+"        <method name=\"GetUserByPID\">",
+"            <arg type=\"u\" direction=\"in\" />",
+"            <arg type=\"o\" direction=\"out\" />",
+"        </method>",
+"        <method name=\"GetSeat\">",
+"            <arg type=\"s\" direction=\"in\" />",
+"            <arg type=\"o\" direction=\"out\" />",
+"        </method>",
+"        <method name=\"ListSessions\">",
+"            <arg type=\"a(susso)\" direction=\"out\" />",
+"        </method>",
+"        <method name=\"ListUsers\">",
+"            <arg type=\"a(uso)\" direction=\"out\" />",
+"        </method>",
+"        <method name=\"ListSeats\">",
+"            <arg type=\"a(so)\" direction=\"out\" />",
+"        </method>",
+"        <method name=\"ListInhibitors\">",
+"            <arg type=\"a(ssssuu)\" direction=\"out\" />",
+"        </method>",
+"        <method name=\"CreateSession\">",
+"            <arg type=\"u\" direction=\"in\" />",
+"            <arg type=\"u\" direction=\"in\" />",
+"            <arg type=\"s\" direction=\"in\" />",
+"            <arg type=\"s\" direction=\"in\" />",
+"            <arg type=\"s\" direction=\"in\" />",
+"            <arg type=\"s\" direction=\"in\" />",
+"            <arg type=\"s\" direction=\"in\" />",
+"            <arg type=\"u\" direction=\"in\" />",
+"            <arg type=\"s\" direction=\"in\" />",
+"            <arg type=\"s\" direction=\"in\" />",
+"            <arg type=\"b\" direction=\"in\" />",
+"            <arg type=\"s\" direction=\"in\" />",
+"            <arg type=\"s\" direction=\"in\" />",
+"            <arg type=\"a(sv)\" direction=\"in\" />",
+"            <arg type=\"s\" direction=\"out\" />",
+"            <arg type=\"o\" direction=\"out\" />",
+"            <arg type=\"s\" direction=\"out\" />",
+"            <arg type=\"h\" direction=\"out\" />",
+"            <arg type=\"u\" direction=\"out\" />",
+"            <arg type=\"s\" direction=\"out\" />",
+"            <arg type=\"u\" direction=\"out\" />",
+"            <arg type=\"b\" direction=\"out\" />",
+"            <annotation name=\"org.freedesktop.systemd1.Privileged\" value=\"true\" />",
+"        </method>",
+"        <method name=\"ReleaseSession\">",
+"            <arg type=\"s\" direction=\"in\" />",
+"            <annotation name=\"org.freedesktop.systemd1.Privileged\" value=\"true\" />",
+"        </method>",
+"        <method name=\"ActivateSession\">",
+"            <arg type=\"s\" direction=\"in\" />",
+"        </method>",
+"        <method name=\"ActivateSessionOnSeat\">",
+"            <arg type=\"s\" direction=\"in\" />",
+"            <arg type=\"s\" direction=\"in\" />",
+"        </method>",
+"        <method name=\"LockSession\">",
+"            <arg type=\"s\" direction=\"in\" />",
+"            <annotation name=\"org.freedesktop.systemd1.Privileged\" value=\"true\" />",
+"        </method>",
+"        <method name=\"UnlockSession\">",
+"            <arg type=\"s\" direction=\"in\" />",
+"            <annotation name=\"org.freedesktop.systemd1.Privileged\" value=\"true\" />",
+"        </method>",
+"        <method name=\"LockSessions\">",
+"            <annotation name=\"org.freedesktop.systemd1.Privileged\" value=\"true\" />",
+"        </method>",
+"        <method name=\"UnlockSessions\">",
+"            <annotation name=\"org.freedesktop.systemd1.Privileged\" value=\"true\" />",
+"        </method>",
+"        <method name=\"KillSession\">",
+"            <arg type=\"s\" direction=\"in\" />",
+"            <arg type=\"s\" direction=\"in\" />",
+"            <arg type=\"i\" direction=\"in\" />",
+"            <annotation name=\"org.freedesktop.systemd1.Privileged\" value=\"true\" />",
+"        </method>",
+"        <method name=\"KillUser\">",
+"            <arg type=\"u\" direction=\"in\" />",
+"            <arg type=\"i\" direction=\"in\" />",
+"            <annotation name=\"org.freedesktop.systemd1.Privileged\" value=\"true\" />",
+"        </method>",
+"        <method name=\"TerminateSession\">",
+"            <arg type=\"s\" direction=\"in\" />",
+"            <annotation name=\"org.freedesktop.systemd1.Privileged\" value=\"true\" />",
+"        </method>",
+"        <method name=\"TerminateUser\">",
+"            <arg type=\"u\" direction=\"in\" />",
+"            <annotation name=\"org.freedesktop.systemd1.Privileged\" value=\"true\" />",
+"        </method>",
+"        <method name=\"TerminateSeat\">",
+"            <arg type=\"s\" direction=\"in\" />",
+"            <annotation name=\"org.freedesktop.systemd1.Privileged\" value=\"true\" />",
+"        </method>",
+"        <method name=\"SetUserLinger\">",
+"            <arg type=\"u\" direction=\"in\" />",
+"            <arg type=\"b\" direction=\"in\" />",
+"            <arg type=\"b\" direction=\"in\" />",
+"        </method>",
+"        <method name=\"AttachDevice\">",
+"            <arg type=\"s\" direction=\"in\" />",
+"            <arg type=\"s\" direction=\"in\" />",
+"            <arg type=\"b\" direction=\"in\" />",
+"        </method>",
+"        <method name=\"FlushDevices\">",
+"            <arg type=\"b\" direction=\"in\" />",
+"        </method>",
+"        <method name=\"PowerOff\">",
+"            <arg type=\"b\" direction=\"in\" />",
+"        </method>",
+"        <method name=\"Reboot\">",
+"            <arg type=\"b\" direction=\"in\" />",
+"        </method>",
+"        <method name=\"Suspend\">",
+"            <arg type=\"b\" direction=\"in\" />",
+"        </method>",
+"        <method name=\"Hibernate\">",
+"            <arg type=\"b\" direction=\"in\" />",
+"        </method>",
+"        <method name=\"HybridSleep\">",
+"            <arg type=\"b\" direction=\"in\" />",
+"        </method>",
+"        <method name=\"CanPowerOff\">",
+"            <arg type=\"s\" direction=\"out\" />",
+"        </method>",
+"        <method name=\"CanReboot\">",
+"            <arg type=\"s\" direction=\"out\" />",
+"        </method>",
+"        <method name=\"CanSuspend\">",
+"            <arg type=\"s\" direction=\"out\" />",
+"        </method>",
+"        <method name=\"CanHibernate\">",
+"            <arg type=\"s\" direction=\"out\" />",
+"        </method>",
+"        <method name=\"CanHybridSleep\">",
+"            <arg type=\"s\" direction=\"out\" />",
+"        </method>",
+"        <method name=\"Inhibit\">",
+"            <arg type=\"s\" direction=\"in\" />",
+"            <arg type=\"s\" direction=\"in\" />",
+"            <arg type=\"s\" direction=\"in\" />",
+"            <arg type=\"s\" direction=\"in\" />",
+"            <arg type=\"h\" direction=\"out\" />",
+"        </method>",
+"        <signal name=\"SessionNew\">",
+"            <arg type=\"s\" direction=\"in\" />",
+"            <arg type=\"o\" direction=\"in\" />",
+"        </signal>",
+"        <signal name=\"SessionRemoved\">",
+"            <arg type=\"s\" direction=\"in\" />",
+"            <arg type=\"o\" direction=\"in\" />",
+"        </signal>",
+"        <signal name=\"UserNew\">",
+"            <arg type=\"u\" direction=\"in\" />",
+"            <arg type=\"o\" direction=\"in\" />",
+"        </signal>",
+"        <signal name=\"UserRemoved\">",
+"            <arg type=\"u\" direction=\"in\" />",
+"            <arg type=\"o\" direction=\"in\" />",
+"        </signal>",
+"        <signal name=\"SeatNew\">",
+"            <arg type=\"s\" direction=\"in\" />",
+"            <arg type=\"o\" direction=\"in\" />",
+"        </signal>",
+"        <signal name=\"SeatRemoved\">",
+"            <arg type=\"s\" direction=\"in\" />",
+"            <arg type=\"o\" direction=\"in\" />",
+"        </signal>",
+"        <signal name=\"PrepareForShutdown\">",
+"            <arg type=\"b\" direction=\"in\" />",
+"        </signal>",
+"        <signal name=\"PrepareForSleep\">",
+"            <arg type=\"b\" direction=\"in\" />",
+"        </signal>",
+"    </interface>",
+"</node>" };
+