diff options
Diffstat (limited to 'src/main.h')
-rw-r--r-- | src/main.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/src/main.h b/src/main.h new file mode 100644 index 0000000..2fd39ea --- /dev/null +++ b/src/main.h @@ -0,0 +1,51 @@ +#include <gio/gio.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>"; |