js: use ES6 template strings for dbus interfaces

Use multiline template strings for dbus interfaces as they're easier to maintain
This commit is contained in:
Marco Trevisan (Treviño) 2018-08-23 02:55:02 +02:00
parent f77b3da74f
commit dbf993300a
37 changed files with 1006 additions and 945 deletions

View File

@ -14,15 +14,16 @@ const _ = Gettext.gettext;
const Config = imports.misc.config; const Config = imports.misc.config;
const ExtensionUtils = imports.misc.extensionUtils; const ExtensionUtils = imports.misc.extensionUtils;
const GnomeShellIface = '<node> \ const GnomeShellIface = `
<interface name="org.gnome.Shell.Extensions"> \ <node>
<signal name="ExtensionStatusChanged"> \ <interface name="org.gnome.Shell.Extensions">
<arg type="s" name="uuid"/> \ <signal name="ExtensionStatusChanged">
<arg type="i" name="state"/> \ <arg type="s" name="uuid"/>
<arg type="s" name="error"/> \ <arg type="i" name="state"/>
</signal> \ <arg type="s" name="error"/>
</interface> \ </signal>
</node>'; </interface>
</node>`;
const GnomeShellProxy = Gio.DBusProxy.makeProxyWrapper(GnomeShellIface); const GnomeShellProxy = Gio.DBusProxy.makeProxyWrapper(GnomeShellIface);

View File

@ -5,13 +5,14 @@ const Lang = imports.lang;
const Shell = imports.gi.Shell; const Shell = imports.gi.Shell;
const Signals = imports.signals; const Signals = imports.signals;
const FprintManagerIface = '<node> \ const FprintManagerIface = `
<interface name="net.reactivated.Fprint.Manager"> \ <node>
<method name="GetDefaultDevice"> \ <interface name="net.reactivated.Fprint.Manager">
<arg type="o" direction="out" /> \ <method name="GetDefaultDevice">
</method> \ <arg type="o" direction="out" />
</interface> \ </method>
</node>'; </interface>
</node>`;
const FprintManagerInfo = Gio.DBusInterfaceInfo.new_for_xml(FprintManagerIface); const FprintManagerInfo = Gio.DBusInterfaceInfo.new_for_xml(FprintManagerIface);

View File

@ -4,13 +4,13 @@ const Gio = imports.gi.Gio;
const Lang = imports.lang; const Lang = imports.lang;
const Signals = imports.signals; const Signals = imports.signals;
const OVirtCredentialsIface = '<node> \ const OVirtCredentialsIface =`<node>
<interface name="org.ovirt.vdsm.Credentials"> \ <interface name="org.ovirt.vdsm.Credentials">
<signal name="UserAuthenticated"> \ <signal name="UserAuthenticated">
<arg type="s" name="token"/> \ <arg type="s" name="token"/>
</signal> \ </signal>
</interface> \ </interface>
</node>'; </node>`;
const OVirtCredentialsInfo = Gio.DBusInterfaceInfo.new_for_xml(OVirtCredentialsIface); const OVirtCredentialsInfo = Gio.DBusInterfaceInfo.new_for_xml(OVirtCredentialsIface);

View File

@ -5,58 +5,61 @@ const Lang = imports.lang;
const Shell = imports.gi.Shell; const Shell = imports.gi.Shell;
const Signals = imports.signals; const Signals = imports.signals;
const ProviderIface = '<node> \ const ProviderIface = `
<interface name="org.freedesktop.realmd.Provider"> \ <node>
<property name="Name" type="s" access="read"/> \ <interface name="org.freedesktop.realmd.Provider">
<property name="Version" type="s" access="read"/> \ <property name="Name" type="s" access="read"/>
<property name="Realms" type="ao" access="read"/> \ <property name="Version" type="s" access="read"/>
<method name="Discover"> \ <property name="Realms" type="ao" access="read"/>
<arg name="string" type="s" direction="in"/> \ <method name="Discover">
<arg name="options" type="a{sv}" direction="in"/> \ <arg name="string" type="s" direction="in"/>
<arg name="relevance" type="i" direction="out"/> \ <arg name="options" type="a{sv}" direction="in"/>
<arg name="realm" type="ao" direction="out"/> \ <arg name="relevance" type="i" direction="out"/>
</method> \ <arg name="realm" type="ao" direction="out"/>
</interface> \ </method>
</node>'; </interface>
</node>`;
const Provider = Gio.DBusProxy.makeProxyWrapper(ProviderIface); const Provider = Gio.DBusProxy.makeProxyWrapper(ProviderIface);
const ServiceIface = '<node> \ const ServiceIface = `
<interface name="org.freedesktop.realmd.Service"> \ <node>
<method name="Cancel"> \ <interface name="org.freedesktop.realmd.Service">
<arg name="operation" type="s" direction="in"/> \ <method name="Cancel">
</method> \ <arg name="operation" type="s" direction="in"/>
<method name="Release" /> \ </method>
<method name="SetLocale"> \ <method name="Release" />
<arg name="locale" type="s" direction="in"/> \ <method name="SetLocale">
</method> \ <arg name="locale" type="s" direction="in"/>
<signal name="Diagnostics"> \ </method>
<arg name="data" type="s"/> \ <signal name="Diagnostics">
<arg name="operation" type="s"/> \ <arg name="data" type="s"/>
</signal> \ <arg name="operation" type="s"/>
</interface> \ </signal>
</node>'; </interface>
</node>`;
const Service = Gio.DBusProxy.makeProxyWrapper(ServiceIface); const Service = Gio.DBusProxy.makeProxyWrapper(ServiceIface);
const RealmIface = '<node> \ const RealmIface = `
<interface name="org.freedesktop.realmd.Realm"> \ <node>
<property name="Name" type="s" access="read"/> \ <interface name="org.freedesktop.realmd.Realm">
<property name="Configured" type="s" access="read"/> \ <property name="Name" type="s" access="read"/>
<property name="Details" type="a(ss)" access="read"/> \ <property name="Configured" type="s" access="read"/>
<property name="LoginFormats" type="as" access="read"/> \ <property name="Details" type="a(ss)" access="read"/>
<property name="LoginPolicy" type="s" access="read"/> \ <property name="LoginFormats" type="as" access="read"/>
<property name="PermittedLogins" type="as" access="read"/> \ <property name="LoginPolicy" type="s" access="read"/>
<property name="SupportedInterfaces" type="as" access="read"/> \ <property name="PermittedLogins" type="as" access="read"/>
<method name="ChangeLoginPolicy"> \ <property name="SupportedInterfaces" type="as" access="read"/>
<arg name="login_policy" type="s" direction="in"/> \ <method name="ChangeLoginPolicy">
<arg name="permitted_add" type="as" direction="in"/> \ <arg name="login_policy" type="s" direction="in"/>
<arg name="permitted_remove" type="as" direction="in"/> \ <arg name="permitted_add" type="as" direction="in"/>
<arg name="options" type="a{sv}" direction="in"/> \ <arg name="permitted_remove" type="as" direction="in"/>
</method> \ <arg name="options" type="a{sv}" direction="in"/>
<method name="Deconfigure"> \ </method>
<arg name="options" type="a{sv}" direction="in"/> \ <method name="Deconfigure">
</method> \ <arg name="options" type="a{sv}" direction="in"/>
</interface> \ </method>
</node>'; </interface>
</node>`;
const Realm = Gio.DBusProxy.makeProxyWrapper(RealmIface); const Realm = Gio.DBusProxy.makeProxyWrapper(RealmIface);
var Manager = new Lang.Class({ var Manager = new Lang.Class({

View File

@ -4,17 +4,18 @@ const Gio = imports.gi.Gio;
const Lang = imports.lang; const Lang = imports.lang;
const Signals = imports.signals; const Signals = imports.signals;
const PresenceIface = '<node> \ const PresenceIface = `
<interface name="org.gnome.SessionManager.Presence"> \ <node>
<method name="SetStatus"> \ <interface name="org.gnome.SessionManager.Presence">
<arg type="u" direction="in"/> \ <method name="SetStatus">
</method> \ <arg type="u" direction="in"/>
<property name="status" type="u" access="readwrite"/> \ </method>
<signal name="StatusChanged"> \ <property name="status" type="u" access="readwrite"/>
<arg type="u" direction="out"/> \ <signal name="StatusChanged">
</signal> \ <arg type="u" direction="out"/>
</interface> \ </signal>
</node>'; </interface>
</node>`;
var PresenceStatus = { var PresenceStatus = {
AVAILABLE: 0, AVAILABLE: 0,
@ -32,16 +33,17 @@ function Presence(initCallback, cancellable) {
// Note inhibitors are immutable objects, so they don't // Note inhibitors are immutable objects, so they don't
// change at runtime (changes always come in the form // change at runtime (changes always come in the form
// of new inhibitors) // of new inhibitors)
const InhibitorIface = '<node> \ const InhibitorIface = `
<interface name="org.gnome.SessionManager.Inhibitor"> \ <node>
<method name="GetAppId"> \ <interface name="org.gnome.SessionManager.Inhibitor">
<arg type="s" direction="out" /> \ <method name="GetAppId">
</method> \ <arg type="s" direction="out" />
<method name="GetReason"> \ </method>
<arg type="s" direction="out" /> \ <method name="GetReason">
</method> \ <arg type="s" direction="out" />
</interface> \ </method>
</node>'; </interface>
</node>`;
var InhibitorProxy = Gio.DBusProxy.makeProxyWrapper(InhibitorIface); var InhibitorProxy = Gio.DBusProxy.makeProxyWrapper(InhibitorIface);
function Inhibitor(objectPath, initCallback, cancellable) { function Inhibitor(objectPath, initCallback, cancellable) {
@ -49,29 +51,30 @@ function Inhibitor(objectPath, initCallback, cancellable) {
} }
// Not the full interface, only the methods we use // Not the full interface, only the methods we use
const SessionManagerIface = '<node> \ const SessionManagerIface = `
<interface name="org.gnome.SessionManager"> \ <node>
<method name="Logout"> \ <interface name="org.gnome.SessionManager">
<arg type="u" direction="in" /> \ <method name="Logout">
</method> \ <arg type="u" direction="in" />
<method name="Shutdown" /> \ </method>
<method name="Reboot" /> \ <method name="Shutdown" />
<method name="CanShutdown"> \ <method name="Reboot" />
<arg type="b" direction="out" /> \ <method name="CanShutdown">
</method> \ <arg type="b" direction="out" />
<method name="IsInhibited"> \ </method>
<arg type="u" direction="in" /> \ <method name="IsInhibited">
<arg type="b" direction="out" /> \ <arg type="u" direction="in" />
</method> \ <arg type="b" direction="out" />
<property name="SessionIsActive" type="b" access="read"/> \ </method>
<signal name="InhibitorAdded"> \ <property name="SessionIsActive" type="b" access="read"/>
<arg type="o" direction="out"/> \ <signal name="InhibitorAdded">
</signal> \ <arg type="o" direction="out"/>
<signal name="InhibitorRemoved"> \ </signal>
<arg type="o" direction="out"/> \ <signal name="InhibitorRemoved">
</signal> \ <arg type="o" direction="out"/>
</interface> \ </signal>
</node>'; </interface>
</node>`;
var SessionManagerProxy = Gio.DBusProxy.makeProxyWrapper(SessionManagerIface); var SessionManagerProxy = Gio.DBusProxy.makeProxyWrapper(SessionManagerIface);
function SessionManager(initCallback, cancellable) { function SessionManager(initCallback, cancellable) {

View File

@ -7,53 +7,56 @@ const Mainloop = imports.mainloop;
const Shell = imports.gi.Shell; const Shell = imports.gi.Shell;
const Signals = imports.signals; const Signals = imports.signals;
const SystemdLoginManagerIface = '<node> \ const SystemdLoginManagerIface = `
<interface name="org.freedesktop.login1.Manager"> \ <node>
<method name="Suspend"> \ <interface name="org.freedesktop.login1.Manager">
<arg type="b" direction="in"/> \ <method name="Suspend">
</method> \ <arg type="b" direction="in"/>
<method name="CanSuspend"> \ </method>
<arg type="s" direction="out"/> \ <method name="CanSuspend">
</method> \ <arg type="s" direction="out"/>
<method name="Inhibit"> \ </method>
<arg type="s" direction="in"/> \ <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="s" direction="in"/> \ <arg type="s" direction="in"/>
<arg type="h" direction="out"/> \ <arg type="s" direction="in"/>
</method> \ <arg type="h" direction="out"/>
<method name="GetSession"> \ </method>
<arg type="s" direction="in"/> \ <method name="GetSession">
<arg type="o" direction="out"/> \ <arg type="s" direction="in"/>
</method> \ <arg type="o" direction="out"/>
<method name="ListSessions"> \ </method>
<arg name="sessions" type="a(susso)" direction="out"/> \ <method name="ListSessions">
</method> \ <arg name="sessions" type="a(susso)" direction="out"/>
<signal name="PrepareForSleep"> \ </method>
<arg type="b" direction="out"/> \ <signal name="PrepareForSleep">
</signal> \ <arg type="b" direction="out"/>
</interface> \ </signal>
</node>'; </interface>
</node>`;
const SystemdLoginSessionIface = '<node> \ const SystemdLoginSessionIface = `
<interface name="org.freedesktop.login1.Session"> \ <node>
<signal name="Lock" /> \ <interface name="org.freedesktop.login1.Session">
<signal name="Unlock" /> \ <signal name="Lock" />
<property name="Active" type="b" access="read" /> \ <signal name="Unlock" />
<property name="Class" type="s" access="read" /> \ <property name="Active" type="b" access="read" />
<property name="Id" type="s" access="read" /> \ <property name="Class" type="s" access="read" />
<method name="SetLockedHint"> \ <property name="Id" type="s" access="read" />
<arg type="b" direction="in"/> \ <method name="SetLockedHint">
</method> \ <arg type="b" direction="in"/>
</interface> \ </method>
</node>'; </interface>
</node>`;
const SystemdLoginUserIface = '<node> \ const SystemdLoginUserIface = `
<interface name="org.freedesktop.login1.User"> \ <node>
<property name="Display" type="(so)" access="read" /> \ <interface name="org.freedesktop.login1.User">
<property name="Sessions" type="a(so)" access="read" /> \ <property name="Display" type="(so)" access="read" />
</interface> \ <property name="Sessions" type="a(so)" access="read" />
</node>'; </interface>
</node>`;
const SystemdLoginManager = Gio.DBusProxy.makeProxyWrapper(SystemdLoginManagerIface); const SystemdLoginManager = Gio.DBusProxy.makeProxyWrapper(SystemdLoginManagerIface);
const SystemdLoginSession = Gio.DBusProxy.makeProxyWrapper(SystemdLoginSessionIface); const SystemdLoginSession = Gio.DBusProxy.makeProxyWrapper(SystemdLoginSessionIface);

View File

@ -92,41 +92,43 @@ function _findProviderForSid(sid) {
// The following are not the complete interfaces, just the methods we need // The following are not the complete interfaces, just the methods we need
// (or may need in the future) // (or may need in the future)
const ModemGsmNetworkInterface = '<node> \ const ModemGsmNetworkInterface = `
<interface name="org.freedesktop.ModemManager.Modem.Gsm.Network"> \ <node>
<method name="GetRegistrationInfo"> \ <interface name="org.freedesktop.ModemManager.Modem.Gsm.Network">
<arg type="(uss)" direction="out" /> \ <method name="GetRegistrationInfo">
</method> \ <arg type="(uss)" direction="out" />
<method name="GetSignalQuality"> \ </method>
<arg type="u" direction="out" /> \ <method name="GetSignalQuality">
</method> \ <arg type="u" direction="out" />
<property name="AccessTechnology" type="u" access="read" /> \ </method>
<signal name="SignalQuality"> \ <property name="AccessTechnology" type="u" access="read" />
<arg type="u" direction="out" /> \ <signal name="SignalQuality">
</signal> \ <arg type="u" direction="out" />
<signal name="RegistrationInfo"> \ </signal>
<arg type="u" direction="out" /> \ <signal name="RegistrationInfo">
<arg type="s" direction="out" /> \ <arg type="u" direction="out" />
<arg type="s" direction="out" /> \ <arg type="s" direction="out" />
</signal> \ <arg type="s" direction="out" />
</interface> \ </signal>
</node>'; </interface>
</node>`;
const ModemGsmNetworkProxy = Gio.DBusProxy.makeProxyWrapper(ModemGsmNetworkInterface); const ModemGsmNetworkProxy = Gio.DBusProxy.makeProxyWrapper(ModemGsmNetworkInterface);
const ModemCdmaInterface = '<node> \ const ModemCdmaInterface = `
<interface name="org.freedesktop.ModemManager.Modem.Cdma"> \ <node>
<method name="GetSignalQuality"> \ <interface name="org.freedesktop.ModemManager.Modem.Cdma">
<arg type="u" direction="out" /> \ <method name="GetSignalQuality">
</method> \ <arg type="u" direction="out" />
<method name="GetServingSystem"> \ </method>
<arg type="(usu)" direction="out" /> \ <method name="GetServingSystem">
</method> \ <arg type="(usu)" direction="out" />
<signal name="SignalQuality"> \ </method>
<arg type="u" direction="out" /> \ <signal name="SignalQuality">
</signal> \ <arg type="u" direction="out" />
</interface> \ </signal>
</node>'; </interface>
</node>`;
const ModemCdmaProxy = Gio.DBusProxy.makeProxyWrapper(ModemCdmaInterface); const ModemCdmaProxy = Gio.DBusProxy.makeProxyWrapper(ModemCdmaInterface);
@ -222,26 +224,29 @@ Signals.addSignalMethods(ModemCdma.prototype);
// Support for the new ModemManager1 interface (MM >= 0.7) // Support for the new ModemManager1 interface (MM >= 0.7)
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
const BroadbandModemInterface = '<node> \ const BroadbandModemInterface = `
<interface name="org.freedesktop.ModemManager1.Modem"> \ <node>
<property name="SignalQuality" type="(ub)" access="read" /> \ <interface name="org.freedesktop.ModemManager1.Modem">
</interface> \ <property name="SignalQuality" type="(ub)" access="read" />
</node>'; </interface>
</node>`;
const BroadbandModemProxy = Gio.DBusProxy.makeProxyWrapper(BroadbandModemInterface); const BroadbandModemProxy = Gio.DBusProxy.makeProxyWrapper(BroadbandModemInterface);
const BroadbandModem3gppInterface = '<node> \ const BroadbandModem3gppInterface = `
<interface name="org.freedesktop.ModemManager1.Modem.Modem3gpp"> \ <node>
<property name="OperatorCode" type="s" access="read" /> \ <interface name="org.freedesktop.ModemManager1.Modem.Modem3gpp">
<property name="OperatorName" type="s" access="read" /> \ <property name="OperatorCode" type="s" access="read" />
</interface> \ <property name="OperatorName" type="s" access="read" />
</node>'; </interface>
</node>`;
const BroadbandModem3gppProxy = Gio.DBusProxy.makeProxyWrapper(BroadbandModem3gppInterface); const BroadbandModem3gppProxy = Gio.DBusProxy.makeProxyWrapper(BroadbandModem3gppInterface);
const BroadbandModemCdmaInterface = '<node> \ const BroadbandModemCdmaInterface = `
<interface name="org.freedesktop.ModemManager1.Modem.ModemCdma"> \ <node>
<property name="Sid" type="u" access="read" /> \ <interface name="org.freedesktop.ModemManager1.Modem.ModemCdma">
</interface> \ <property name="Sid" type="u" access="read" />
</node>'; </interface>
</node>`;
const BroadbandModemCdmaProxy = Gio.DBusProxy.makeProxyWrapper(BroadbandModemCdmaInterface); const BroadbandModemCdmaProxy = Gio.DBusProxy.makeProxyWrapper(BroadbandModemCdmaInterface);
var BroadbandModem = new Lang.Class({ var BroadbandModem = new Lang.Class({

View File

@ -8,21 +8,22 @@ const Signals = imports.signals;
// Specified in the D-Bus specification here: // Specified in the D-Bus specification here:
// http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager // http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager
const ObjectManagerIface = '<node> \ const ObjectManagerIface = `
<interface name="org.freedesktop.DBus.ObjectManager"> \ <node>
<method name="GetManagedObjects"> \ <interface name="org.freedesktop.DBus.ObjectManager">
<arg name="objects" type="a{oa{sa{sv}}}" direction="out"/> \ <method name="GetManagedObjects">
</method> \ <arg name="objects" type="a{oa{sa{sv}}}" direction="out"/>
<signal name="InterfacesAdded"> \ </method>
<arg name="objectPath" type="o"/> \ <signal name="InterfacesAdded">
<arg name="interfaces" type="a{sa{sv}}" /> \ <arg name="objectPath" type="o"/>
</signal> \ <arg name="interfaces" type="a{sa{sv}}" />
<signal name="InterfacesRemoved"> \ </signal>
<arg name="objectPath" type="o"/> \ <signal name="InterfacesRemoved">
<arg name="interfaces" type="as" /> \ <arg name="objectPath" type="o"/>
</signal> \ <arg name="interfaces" type="as" />
</interface> \ </signal>
</node>'; </interface>
</node>`;
const ObjectManagerInfo = Gio.DBusInterfaceInfo.new_for_xml(ObjectManagerIface); const ObjectManagerInfo = Gio.DBusInterfaceInfo.new_for_xml(ObjectManagerIface);

View File

@ -2,30 +2,31 @@
const Gio = imports.gi.Gio; const Gio = imports.gi.Gio;
const PermissionStoreIface = '<node> \ const PermissionStoreIface = `
<interface name="org.freedesktop.impl.portal.PermissionStore"> \ <node>
<method name="Lookup"> \ <interface name="org.freedesktop.impl.portal.PermissionStore">
<arg name="table" type="s" direction="in"/> \ <method name="Lookup">
<arg name="id" type="s" direction="in"/> \ <arg name="table" type="s" direction="in"/>
<arg name="permissions" type="a{sas}" direction="out"/> \ <arg name="id" type="s" direction="in"/>
<arg name="data" type="v" direction="out"/> \ <arg name="permissions" type="a{sas}" direction="out"/>
</method> \ <arg name="data" type="v" direction="out"/>
<method name="Set"> \ </method>
<arg name="table" type="s" direction="in"/> \ <method name="Set">
<arg name="create" type="b" direction="in"/> \ <arg name="table" type="s" direction="in"/>
<arg name="id" type="s" direction="in"/> \ <arg name="create" type="b" direction="in"/>
<arg name="app_permissions" type="a{sas}" direction="in"/> \ <arg name="id" type="s" direction="in"/>
<arg name="data" type="v" direction="in"/> \ <arg name="app_permissions" type="a{sas}" direction="in"/>
</method> \ <arg name="data" type="v" direction="in"/>
<signal name="Changed"> \ </method>
<arg name="table" type="s" direction="out"/> \ <signal name="Changed">
<arg name="id" type="s" direction="out"/> \ <arg name="table" type="s" direction="out"/>
<arg name="deleted" type="b" direction="out"/> \ <arg name="id" type="s" direction="out"/>
<arg name="data" type="v" direction="out"/> \ <arg name="deleted" type="b" direction="out"/>
<arg name="permissions" type="a{sas}" direction="out"/> \ <arg name="data" type="v" direction="out"/>
</signal> \ <arg name="permissions" type="a{sas}" direction="out"/>
</interface> \ </signal>
</node>'; </interface>
</node>`;
const PermissionStoreProxy = Gio.DBusProxy.makeProxyWrapper(PermissionStoreIface); const PermissionStoreProxy = Gio.DBusProxy.makeProxyWrapper(PermissionStoreIface);

View File

@ -7,14 +7,15 @@ const Signals = imports.signals;
const ObjectManager = imports.misc.objectManager; const ObjectManager = imports.misc.objectManager;
const SmartcardTokenIface = '<node> \ const SmartcardTokenIface = `
<interface name="org.gnome.SettingsDaemon.Smartcard.Token"> \ <node>
<property name="Name" type="s" access="read"/> \ <interface name="org.gnome.SettingsDaemon.Smartcard.Token">
<property name="Driver" type="o" access="read"/> \ <property name="Name" type="s" access="read"/>
<property name="IsInserted" type="b" access="read"/> \ <property name="Driver" type="o" access="read"/>
<property name="UsedToLogin" type="b" access="read"/> \ <property name="IsInserted" type="b" access="read"/>
</interface> \ <property name="UsedToLogin" type="b" access="read"/>
</node>'; </interface>
</node>`;
let _smartcardManager = null; let _smartcardManager = null;

View File

@ -22,11 +22,12 @@ const ALWAYS_SHOW_LOG_OUT_KEY = 'always-show-log-out';
const SENSOR_BUS_NAME = 'net.hadess.SensorProxy'; const SENSOR_BUS_NAME = 'net.hadess.SensorProxy';
const SENSOR_OBJECT_PATH = '/net/hadess/SensorProxy'; const SENSOR_OBJECT_PATH = '/net/hadess/SensorProxy';
const SensorProxyInterface = '<node> \ const SensorProxyInterface = `
<interface name="net.hadess.SensorProxy"> \ <node>
<property name="HasAccelerometer" type="b" access="read"/> \ <interface name="net.hadess.SensorProxy">
</interface> \ <property name="HasAccelerometer" type="b" access="read"/>
</node>'; </interface>
</node>`;
const POWER_OFF_ACTION_ID = 'power-off'; const POWER_OFF_ACTION_ID = 'power-off';
const LOCK_SCREEN_ACTION_ID = 'lock-screen'; const LOCK_SCREEN_ACTION_ID = 'lock-screen';

View File

@ -30,25 +30,26 @@ const CONNECTIVITY_CHECK_HOST = 'nmcheck.gnome.org';
const CONNECTIVITY_CHECK_URI = 'http://' + CONNECTIVITY_CHECK_HOST; const CONNECTIVITY_CHECK_URI = 'http://' + CONNECTIVITY_CHECK_HOST;
const CONNECTIVITY_RECHECK_RATELIMIT_TIMEOUT = 30 * GLib.USEC_PER_SEC; const CONNECTIVITY_RECHECK_RATELIMIT_TIMEOUT = 30 * GLib.USEC_PER_SEC;
const HelperDBusInterface = '<node> \ const HelperDBusInterface = `
<interface name="org.gnome.Shell.PortalHelper"> \ <node>
<method name="Authenticate"> \ <interface name="org.gnome.Shell.PortalHelper">
<arg type="o" direction="in" name="connection" /> \ <method name="Authenticate">
<arg type="s" direction="in" name="url" /> \ <arg type="o" direction="in" name="connection" />
<arg type="u" direction="in" name="timestamp" /> \ <arg type="s" direction="in" name="url" />
</method> \ <arg type="u" direction="in" name="timestamp" />
<method name="Close"> \ </method>
<arg type="o" direction="in" name="connection" /> \ <method name="Close">
</method> \ <arg type="o" direction="in" name="connection" />
<method name="Refresh"> \ </method>
<arg type="o" direction="in" name="connection" /> \ <method name="Refresh">
</method> \ <arg type="o" direction="in" name="connection" />
<signal name="Done"> \ </method>
<arg type="o" name="connection" /> \ <signal name="Done">
<arg type="u" name="result" /> \ <arg type="o" name="connection" />
</signal> \ <arg type="u" name="result" />
</interface> \ </signal>
</node>'; </interface>
</node>`;
var PortalHeaderBar = new Lang.Class({ var PortalHeaderBar = new Lang.Class({
Name: 'PortalHeaderBar', Name: 'PortalHeaderBar',

View File

@ -10,27 +10,29 @@ const CheckBox = imports.ui.checkBox;
const Dialog = imports.ui.dialog; const Dialog = imports.ui.dialog;
const ModalDialog = imports.ui.modalDialog; const ModalDialog = imports.ui.modalDialog;
const RequestIface = '<node> \ const RequestIface = `
<interface name="org.freedesktop.impl.portal.Request"> \ <node>
<method name="Close"/> \ <interface name="org.freedesktop.impl.portal.Request">
</interface> \ <method name="Close"/>
</node>'; </interface>
</node>`;
const AccessIface = '<node> \ const AccessIface = `
<interface name="org.freedesktop.impl.portal.Access"> \ <node>
<method name="AccessDialog"> \ <interface name="org.freedesktop.impl.portal.Access">
<arg type="o" name="handle" direction="in"/> \ <method name="AccessDialog">
<arg type="s" name="app_id" direction="in"/> \ <arg type="o" name="handle" direction="in"/>
<arg type="s" name="parent_window" direction="in"/> \ <arg type="s" name="app_id" direction="in"/>
<arg type="s" name="title" direction="in"/> \ <arg type="s" name="parent_window" direction="in"/>
<arg type="s" name="subtitle" direction="in"/> \ <arg type="s" name="title" direction="in"/>
<arg type="s" name="body" direction="in"/> \ <arg type="s" name="subtitle" direction="in"/>
<arg type="a{sv}" name="options" direction="in"/> \ <arg type="s" name="body" direction="in"/>
<arg type="u" name="response" direction="out"/> \ <arg type="a{sv}" name="options" direction="in"/>
<arg type="a{sv}" name="results" direction="out"/> \ <arg type="u" name="response" direction="out"/>
</method> \ <arg type="a{sv}" name="results" direction="out"/>
</interface> \ </method>
</node>'; </interface>
</node>`;
var DialogResponse = { var DialogResponse = {
OK: 0, OK: 0,

View File

@ -66,11 +66,12 @@ var PAGE_SWITCH_TIME = 0.3;
const SWITCHEROO_BUS_NAME = 'net.hadess.SwitcherooControl'; const SWITCHEROO_BUS_NAME = 'net.hadess.SwitcherooControl';
const SWITCHEROO_OBJECT_PATH = '/net/hadess/SwitcherooControl'; const SWITCHEROO_OBJECT_PATH = '/net/hadess/SwitcherooControl';
const SwitcherooProxyInterface = '<node> \ const SwitcherooProxyInterface = `
<interface name="net.hadess.SwitcherooControl"> \ <node>
<property name="HasDualGpu" type="b" access="read"/> \ <interface name="net.hadess.SwitcherooControl">
</interface> \ <property name="HasDualGpu" type="b" access="read"/>
</node>'; </interface>
</node>`;
const SwitcherooProxy = Gio.DBusProxy.makeProxyWrapper(SwitcherooProxyInterface); const SwitcherooProxy = Gio.DBusProxy.makeProxyWrapper(SwitcherooProxyInterface);
let discreteGpuAvailable = false; let discreteGpuAvailable = false;

View File

@ -15,18 +15,19 @@ var AudioDevice = {
MICROPHONE: 1 << 2 MICROPHONE: 1 << 2
}; };
const AudioDeviceSelectionIface = '<node> \ const AudioDeviceSelectionIface = `
<interface name="org.gnome.Shell.AudioDeviceSelection"> \ <node>
<method name="Open"> \ <interface name="org.gnome.Shell.AudioDeviceSelection">
<arg name="devices" direction="in" type="as" /> \ <method name="Open">
</method> \ <arg name="devices" direction="in" type="as" />
<method name="Close"> \ </method>
</method> \ <method name="Close">
<signal name="DeviceSelected"> \ </method>
<arg name="device" type="s" /> \ <signal name="DeviceSelected">
</signal> \ <arg name="device" type="s" />
</interface> \ </signal>
</node>'; </interface>
</node>`;
var AudioDeviceSelectionDialog = new Lang.Class({ var AudioDeviceSelectionDialog = new Lang.Class({
Name: 'AudioDeviceSelectionDialog', Name: 'AudioDeviceSelectionDialog',

View File

@ -134,18 +134,19 @@ var EmptyEventSource = new Lang.Class({
}); });
Signals.addSignalMethods(EmptyEventSource.prototype); Signals.addSignalMethods(EmptyEventSource.prototype);
const CalendarServerIface = '<node> \ const CalendarServerIface = `
<interface name="org.gnome.Shell.CalendarServer"> \ <node>
<method name="GetEvents"> \ <interface name="org.gnome.Shell.CalendarServer">
<arg type="x" direction="in" /> \ <method name="GetEvents">
<arg type="x" direction="in" /> \ <arg type="x" direction="in" />
<arg type="b" direction="in" /> \ <arg type="x" direction="in" />
<arg type="a(sssbxxa{sv})" direction="out" /> \ <arg type="b" direction="in" />
</method> \ <arg type="a(sssbxxa{sv})" direction="out" />
<property name="HasCalendars" type="b" access="read" /> \ </method>
<signal name="Changed" /> \ <property name="HasCalendars" type="b" access="read" />
</interface> \ <signal name="Changed" />
</node>'; </interface>
</node>`;
const CalendarServerInfo = Gio.DBusInterfaceInfo.new_for_xml(CalendarServerIface); const CalendarServerInfo = Gio.DBusInterfaceInfo.new_for_xml(CalendarServerIface);

View File

@ -74,14 +74,15 @@ function startAppForMount(app, mount) {
/******************************************/ /******************************************/
const HotplugSnifferIface = '<node> \ const HotplugSnifferIface = `
<interface name="org.gnome.Shell.HotplugSniffer"> \ <node>
<method name="SniffURI"> \ <interface name="org.gnome.Shell.HotplugSniffer">
<arg type="s" direction="in" /> \ <method name="SniffURI">
<arg type="as" direction="out" /> \ <arg type="s" direction="in" />
</method> \ <arg type="as" direction="out" />
</interface> \ </method>
</node>'; </interface>
</node>`;
const HotplugSnifferProxy = Gio.DBusProxy.makeProxyWrapper(HotplugSnifferIface); const HotplugSnifferProxy = Gio.DBusProxy.makeProxyWrapper(HotplugSnifferIface);
function HotplugSniffer() { function HotplugSniffer() {

View File

@ -43,22 +43,23 @@ const _DIALOG_ICON_SIZE = 48;
var GSM_SESSION_MANAGER_LOGOUT_FORCE = 2; var GSM_SESSION_MANAGER_LOGOUT_FORCE = 2;
const EndSessionDialogIface = '<node> \ const EndSessionDialogIface = `
<interface name="org.gnome.SessionManager.EndSessionDialog"> \ <node>
<method name="Open"> \ <interface name="org.gnome.SessionManager.EndSessionDialog">
<arg type="u" direction="in" /> \ <method name="Open">
<arg type="u" direction="in" /> \ <arg type="u" direction="in" />
<arg type="u" direction="in" /> \ <arg type="u" direction="in" />
<arg type="ao" direction="in" /> \ <arg type="u" direction="in" />
</method> \ <arg type="ao" direction="in" />
<method name="Close" /> \ </method>
<signal name="ConfirmedLogout" /> \ <method name="Close" />
<signal name="ConfirmedReboot" /> \ <signal name="ConfirmedLogout" />
<signal name="ConfirmedShutdown" /> \ <signal name="ConfirmedReboot" />
<signal name="Canceled" /> \ <signal name="ConfirmedShutdown" />
<signal name="Closed" /> \ <signal name="Canceled" />
</interface> \ <signal name="Closed" />
</node>'; </interface>
</node>`;
const logoutDialogContent = { const logoutDialogContent = {
subjectWithUser: C_("title", "Log Out %s"), subjectWithUser: C_("title", "Log Out %s"),
@ -168,39 +169,42 @@ const DialogContent = {
var MAX_USERS_IN_SESSION_DIALOG = 5; var MAX_USERS_IN_SESSION_DIALOG = 5;
const LogindSessionIface = '<node> \ const LogindSessionIface = `
<interface name="org.freedesktop.login1.Session"> \ <node>
<property name="Id" type="s" access="read"/> \ <interface name="org.freedesktop.login1.Session">
<property name="Remote" type="b" access="read"/> \ <property name="Id" type="s" access="read"/>
<property name="Class" type="s" access="read"/> \ <property name="Remote" type="b" access="read"/>
<property name="Type" type="s" access="read"/> \ <property name="Class" type="s" access="read"/>
<property name="State" type="s" access="read"/> \ <property name="Type" type="s" access="read"/>
</interface> \ <property name="State" type="s" access="read"/>
</node>'; </interface>
</node>`;
const LogindSession = Gio.DBusProxy.makeProxyWrapper(LogindSessionIface); const LogindSession = Gio.DBusProxy.makeProxyWrapper(LogindSessionIface);
const PkOfflineIface = '<node> \ const PkOfflineIface = `
<interface name="org.freedesktop.PackageKit.Offline"> \ <node>
<property name="UpdatePrepared" type="b" access="read"/> \ <interface name="org.freedesktop.PackageKit.Offline">
<property name="UpdateTriggered" type="b" access="read"/> \ <property name="UpdatePrepared" type="b" access="read"/>
<property name="UpgradePrepared" type="b" access="read"/> \ <property name="UpdateTriggered" type="b" access="read"/>
<property name="UpgradeTriggered" type="b" access="read"/> \ <property name="UpgradePrepared" type="b" access="read"/>
<property name="PreparedUpgrade" type="a{sv}" access="read"/> \ <property name="UpgradeTriggered" type="b" access="read"/>
<method name="Trigger"> \ <property name="PreparedUpgrade" type="a{sv}" access="read"/>
<arg type="s" name="action" direction="in"/> \ <method name="Trigger">
</method> \ <arg type="s" name="action" direction="in"/>
<method name="Cancel"/> \ </method>
</interface> \ <method name="Cancel"/>
</node>'; </interface>
</node>`;
const PkOfflineProxy = Gio.DBusProxy.makeProxyWrapper(PkOfflineIface); const PkOfflineProxy = Gio.DBusProxy.makeProxyWrapper(PkOfflineIface);
const UPowerIface = '<node> \ const UPowerIface = `
<interface name="org.freedesktop.UPower"> \ <node>
<property name="OnBattery" type="b" access="read"/> \ <interface name="org.freedesktop.UPower">
</interface> \ <property name="OnBattery" type="b" access="read"/>
</node>'; </interface>
</node>`;
const UPowerProxy = Gio.DBusProxy.makeProxyWrapper(UPowerIface); const UPowerProxy = Gio.DBusProxy.makeProxyWrapper(UPowerIface);

View File

@ -9,89 +9,91 @@ const ZOOM_SERVICE_PATH = '/org/gnome/Magnifier/ZoomRegion';
// Subset of gnome-mag's Magnifier dbus interface -- to be expanded. See: // Subset of gnome-mag's Magnifier dbus interface -- to be expanded. See:
// http://git.gnome.org/browse/gnome-mag/tree/xml/...Magnifier.xml // http://git.gnome.org/browse/gnome-mag/tree/xml/...Magnifier.xml
const MagnifierIface = '<node> \ const MagnifierIface = `
<interface name="org.gnome.Magnifier"> \ <node>
<method name="setActive"> \ <interface name="org.gnome.Magnifier">
<arg type="b" direction="in" /> \ <method name="setActive">
</method> \ <arg type="b" direction="in" />
<method name="isActive"> \ </method>
<arg type="b" direction="out" /> \ <method name="isActive">
</method> \ <arg type="b" direction="out" />
<method name="showCursor" /> \ </method>
<method name="hideCursor" /> \ <method name="showCursor" />
<method name="createZoomRegion"> \ <method name="hideCursor" />
<arg type="d" direction="in" /> \ <method name="createZoomRegion">
<arg type="d" direction="in" /> \ <arg type="d" direction="in" />
<arg type="ai" direction="in" /> \ <arg type="d" direction="in" />
<arg type="ai" direction="in" /> \ <arg type="ai" direction="in" />
<arg type="o" direction="out" /> \ <arg type="ai" direction="in" />
</method> \ <arg type="o" direction="out" />
<method name="addZoomRegion"> \ </method>
<arg type="o" direction="in" /> \ <method name="addZoomRegion">
<arg type="b" direction="out" /> \ <arg type="o" direction="in" />
</method> \ <arg type="b" direction="out" />
<method name="getZoomRegions"> \ </method>
<arg type="ao" direction="out" /> \ <method name="getZoomRegions">
</method> \ <arg type="ao" direction="out" />
<method name="clearAllZoomRegions" /> \ </method>
<method name="fullScreenCapable"> \ <method name="clearAllZoomRegions" />
<arg type="b" direction="out" /> \ <method name="fullScreenCapable">
</method> \ <arg type="b" direction="out" />
<method name="setCrosswireSize"> \ </method>
<arg type="i" direction="in" /> \ <method name="setCrosswireSize">
</method> \ <arg type="i" direction="in" />
<method name="getCrosswireSize"> \ </method>
<arg type="i" direction="out" /> \ <method name="getCrosswireSize">
</method> \ <arg type="i" direction="out" />
<method name="setCrosswireLength"> \ </method>
<arg type="i" direction="in" /> \ <method name="setCrosswireLength">
</method> \ <arg type="i" direction="in" />
<method name="getCrosswireLength"> \ </method>
<arg type="i" direction="out" /> \ <method name="getCrosswireLength">
</method> \ <arg type="i" direction="out" />
<method name="setCrosswireClip"> \ </method>
<arg type="b" direction="in" /> \ <method name="setCrosswireClip">
</method> \ <arg type="b" direction="in" />
<method name="getCrosswireClip"> \ </method>
<arg type="b" direction="out" /> \ <method name="getCrosswireClip">
</method> \ <arg type="b" direction="out" />
<method name="setCrosswireColor"> \ </method>
<arg type="u" direction="in" /> \ <method name="setCrosswireColor">
</method> \ <arg type="u" direction="in" />
<method name="getCrosswireColor"> \ </method>
<arg type="u" direction="out" /> \ <method name="getCrosswireColor">
</method> \ <arg type="u" direction="out" />
</interface> \ </method>
</node>'; </interface>
</node>`;
// Subset of gnome-mag's ZoomRegion dbus interface -- to be expanded. See: // Subset of gnome-mag's ZoomRegion dbus interface -- to be expanded. See:
// http://git.gnome.org/browse/gnome-mag/tree/xml/...ZoomRegion.xml // http://git.gnome.org/browse/gnome-mag/tree/xml/...ZoomRegion.xml
const ZoomRegionIface = '<node> \ const ZoomRegionIface = `
<interface name="org.gnome.Magnifier.ZoomRegion"> \ <node>
<method name="setMagFactor"> \ <interface name="org.gnome.Magnifier.ZoomRegion">
<arg type="d" direction="in" /> \ <method name="setMagFactor">
<arg type="d" direction="in" /> \ <arg type="d" direction="in" />
</method> \ <arg type="d" direction="in" />
<method name="getMagFactor"> \ </method>
<arg type="d" direction="out" /> \ <method name="getMagFactor">
<arg type="d" direction="out" /> \ <arg type="d" direction="out" />
</method> \ <arg type="d" direction="out" />
<method name="setRoi"> \ </method>
<arg type="ai" direction="in" /> \ <method name="setRoi">
</method> \ <arg type="ai" direction="in" />
<method name="getRoi"> \ </method>
<arg type="ai" direction="out" /> \ <method name="getRoi">
</method> \ <arg type="ai" direction="out" />
<method name="shiftContentsTo"> \ </method>
<arg type="i" direction="in" /> \ <method name="shiftContentsTo">
<arg type="i" direction="in" /> \ <arg type="i" direction="in" />
<arg type="b" direction="out" /> \ <arg type="i" direction="in" />
</method> \ <arg type="b" direction="out" />
<method name="moveResize"> \ </method>
<arg type="ai" direction="in" /> \ <method name="moveResize">
</method> \ <arg type="ai" direction="in" />
</interface> \ </method>
</node>'; </interface>
</node>`;
// For making unique ZoomRegion DBus proxy object paths of the form: // For making unique ZoomRegion DBus proxy object paths of the form:
// '/org/gnome/Magnifier/ZoomRegion/zoomer0', // '/org/gnome/Magnifier/ZoomRegion/zoomer0',

View File

@ -8,41 +8,44 @@ const Calendar = imports.ui.calendar;
const Main = imports.ui.main; const Main = imports.ui.main;
const MessageList = imports.ui.messageList; const MessageList = imports.ui.messageList;
const DBusIface = '<node> \ const DBusIface = `
<interface name="org.freedesktop.DBus"> \ <node>
<method name="ListNames"> \ <interface name="org.freedesktop.DBus">
<arg type="as" direction="out" name="names" /> \ <method name="ListNames">
</method> \ <arg type="as" direction="out" name="names" />
<signal name="NameOwnerChanged"> \ </method>
<arg type="s" direction="out" name="name" /> \ <signal name="NameOwnerChanged">
<arg type="s" direction="out" name="oldOwner" /> \ <arg type="s" direction="out" name="name" />
<arg type="s" direction="out" name="newOwner" /> \ <arg type="s" direction="out" name="oldOwner" />
</signal> \ <arg type="s" direction="out" name="newOwner" />
</interface> \ </signal>
</node>'; </interface>
</node>`;
const DBusProxy = Gio.DBusProxy.makeProxyWrapper(DBusIface); const DBusProxy = Gio.DBusProxy.makeProxyWrapper(DBusIface);
const MprisIface = '<node> \ const MprisIface = `
<interface name="org.mpris.MediaPlayer2"> \ <node>
<method name="Raise" /> \ <interface name="org.mpris.MediaPlayer2">
<property name="CanRaise" type="b" access="read" /> \ <method name="Raise" />
<property name="DesktopEntry" type="s" access="read" /> \ <property name="CanRaise" type="b" access="read" />
</interface> \ <property name="DesktopEntry" type="s" access="read" />
</node>'; </interface>
</node>`;
const MprisProxy = Gio.DBusProxy.makeProxyWrapper(MprisIface); const MprisProxy = Gio.DBusProxy.makeProxyWrapper(MprisIface);
const MprisPlayerIface = '<node> \ const MprisPlayerIface = `
<interface name="org.mpris.MediaPlayer2.Player"> \ <node>
<method name="PlayPause" /> \ <interface name="org.mpris.MediaPlayer2.Player">
<method name="Next" /> \ <method name="PlayPause" />
<method name="Previous" /> \ <method name="Next" />
<property name="CanGoNext" type="b" access="read" /> \ <method name="Previous" />
<property name="CanGoPrevious" type="b" access="read" /> \ <property name="CanGoNext" type="b" access="read" />
<property name="CanPlay" type="b" access="read" /> \ <property name="CanGoPrevious" type="b" access="read" />
<property name="Metadata" type="a{sv}" access="read" /> \ <property name="CanPlay" type="b" access="read" />
<property name="PlaybackStatus" type="s" access="read" /> \ <property name="Metadata" type="a{sv}" access="read" />
</interface> \ <property name="PlaybackStatus" type="s" access="read" />
</node>'; </interface>
</node>`;
const MprisPlayerProxy = Gio.DBusProxy.makeProxyWrapper(MprisPlayerIface); const MprisPlayerProxy = Gio.DBusProxy.makeProxyWrapper(MprisPlayerIface);
const MPRIS_PLAYER_PREFIX = 'org.mpris.MediaPlayer2.'; const MPRIS_PLAYER_PREFIX = 'org.mpris.MediaPlayer2.';

View File

@ -17,55 +17,57 @@ const Params = imports.misc.params;
const Util = imports.misc.util; const Util = imports.misc.util;
// Should really be defined in Gio.js // Should really be defined in Gio.js
const BusIface = '<node> \ const BusIface = `
<interface name="org.freedesktop.DBus"> \ <node>
<method name="GetConnectionUnixProcessID"> \ <interface name="org.freedesktop.DBus">
<arg type="s" direction="in" /> \ <method name="GetConnectionUnixProcessID">
<arg type="u" direction="out" /> \ <arg type="s" direction="in" />
</method> \ <arg type="u" direction="out" />
</interface> \ </method>
</node>'; </interface>
</node>`;
var BusProxy = Gio.DBusProxy.makeProxyWrapper(BusIface); var BusProxy = Gio.DBusProxy.makeProxyWrapper(BusIface);
function Bus() { function Bus() {
return new BusProxy(Gio.DBus.session, 'org.freedesktop.DBus', '/org/freedesktop/DBus'); return new BusProxy(Gio.DBus.session, 'org.freedesktop.DBus', '/org/freedesktop/DBus');
} }
const FdoNotificationsIface = '<node> \ const FdoNotificationsIface = `
<interface name="org.freedesktop.Notifications"> \ <node>
<method name="Notify"> \ <interface name="org.freedesktop.Notifications">
<arg type="s" direction="in"/> \ <method name="Notify">
<arg type="u" 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="s" direction="in"/> \ <arg type="s" direction="in"/>
<arg type="as" direction="in"/> \ <arg type="s" direction="in"/>
<arg type="a{sv}" direction="in"/> \ <arg type="as" direction="in"/>
<arg type="i" direction="in"/> \ <arg type="a{sv}" direction="in"/>
<arg type="u" direction="out"/> \ <arg type="i" direction="in"/>
</method> \ <arg type="u" direction="out"/>
<method name="CloseNotification"> \ </method>
<arg type="u" direction="in"/> \ <method name="CloseNotification">
</method> \ <arg type="u" direction="in"/>
<method name="GetCapabilities"> \ </method>
<arg type="as" direction="out"/> \ <method name="GetCapabilities">
</method> \ <arg type="as" direction="out"/>
<method name="GetServerInformation"> \ </method>
<arg type="s" direction="out"/> \ <method name="GetServerInformation">
<arg type="s" direction="out"/> \ <arg type="s" direction="out"/>
<arg type="s" direction="out"/> \ <arg type="s" direction="out"/>
<arg type="s" direction="out"/> \ <arg type="s" direction="out"/>
</method> \ <arg type="s" direction="out"/>
<signal name="NotificationClosed"> \ </method>
<arg type="u"/> \ <signal name="NotificationClosed">
<arg type="u"/> \ <arg type="u"/>
</signal> \ <arg type="u"/>
<signal name="ActionInvoked"> \ </signal>
<arg type="u"/> \ <signal name="ActionInvoked">
<arg type="s"/> \ <arg type="u"/>
</signal> \ <arg type="s"/>
</interface> \ </signal>
</node>'; </interface>
</node>`;
var NotificationClosedReason = { var NotificationClosedReason = {
EXPIRED: 1, EXPIRED: 1,
@ -654,18 +656,19 @@ var GtkNotificationDaemonNotification = new Lang.Class({
}, },
}); });
const FdoApplicationIface = '<node> \ const FdoApplicationIface = `
<interface name="org.freedesktop.Application"> \ <node>
<method name="ActivateAction"> \ <interface name="org.freedesktop.Application">
<arg type="s" direction="in" /> \ <method name="ActivateAction">
<arg type="av" direction="in" /> \ <arg type="s" direction="in" />
<arg type="a{sv}" direction="in" /> \ <arg type="av" direction="in" />
</method> \ <arg type="a{sv}" direction="in" />
<method name="Activate"> \ </method>
<arg type="a{sv}" direction="in" /> \ <method name="Activate">
</method> \ <arg type="a{sv}" direction="in" />
</interface> \ </method>
</node>'; </interface>
</node>`;
const FdoApplicationProxy = Gio.DBusProxy.makeProxyWrapper(FdoApplicationIface); const FdoApplicationProxy = Gio.DBusProxy.makeProxyWrapper(FdoApplicationIface);
function objectPathFromAppId(appId) { function objectPathFromAppId(appId) {
@ -774,19 +777,20 @@ var GtkNotificationDaemonAppSource = new Lang.Class({
}, },
}); });
const GtkNotificationsIface = '<node> \ const GtkNotificationsIface = `
<interface name="org.gtk.Notifications"> \ <node>
<method name="AddNotification"> \ <interface name="org.gtk.Notifications">
<arg type="s" direction="in" /> \ <method name="AddNotification">
<arg type="s" direction="in" /> \ <arg type="s" direction="in" />
<arg type="a{sv}" direction="in" /> \ <arg type="s" direction="in" />
</method> \ <arg type="a{sv}" direction="in" />
<method name="RemoveNotification"> \ </method>
<arg type="s" direction="in" /> \ <method name="RemoveNotification">
<arg type="s" direction="in" /> \ <arg type="s" direction="in" />
</method> \ <arg type="s" direction="in" />
</interface> \ </method>
</node>'; </interface>
</node>`;
var GtkNotificationDaemon = new Lang.Class({ var GtkNotificationDaemon = new Lang.Class({
Name: 'GtkNotificationDaemon', Name: 'GtkNotificationDaemon',

View File

@ -962,14 +962,15 @@ var PadOsd = new Lang.Class({
}); });
Signals.addSignalMethods(PadOsd.prototype); Signals.addSignalMethods(PadOsd.prototype);
const PadOsdIface = '<node> \ const PadOsdIface = `
<interface name="org.gnome.Shell.Wacom.PadOsd"> \ <node>
<method name="Show"> \ <interface name="org.gnome.Shell.Wacom.PadOsd">
<arg name="device_node" direction="in" type="o"/> \ <method name="Show">
<arg name="edition_mode" direction="in" type="b"/> \ <arg name="device_node" direction="in" type="o"/>
</method> \ <arg name="edition_mode" direction="in" type="b"/>
</interface> \ </method>
</node>'; </interface>
</node>`;
var PadOsdService = new Lang.Class({ var PadOsdService = new Lang.Class({
Name: 'PadOsdService', Name: 'PadOsdService',

View File

@ -12,53 +12,55 @@ const Search = imports.ui.search;
const KEY_FILE_GROUP = 'Shell Search Provider'; const KEY_FILE_GROUP = 'Shell Search Provider';
const SearchProviderIface = '<node> \ const SearchProviderIface = `
<interface name="org.gnome.Shell.SearchProvider"> \ <node>
<method name="GetInitialResultSet"> \ <interface name="org.gnome.Shell.SearchProvider">
<arg type="as" direction="in" /> \ <method name="GetInitialResultSet">
<arg type="as" direction="out" /> \ <arg type="as" direction="in" />
</method> \ <arg type="as" direction="out" />
<method name="GetSubsearchResultSet"> \ </method>
<arg type="as" direction="in" /> \ <method name="GetSubsearchResultSet">
<arg type="as" direction="in" /> \ <arg type="as" direction="in" />
<arg type="as" direction="out" /> \ <arg type="as" direction="in" />
</method> \ <arg type="as" direction="out" />
<method name="GetResultMetas"> \ </method>
<arg type="as" direction="in" /> \ <method name="GetResultMetas">
<arg type="aa{sv}" direction="out" /> \ <arg type="as" direction="in" />
</method> \ <arg type="aa{sv}" direction="out" />
<method name="ActivateResult"> \ </method>
<arg type="s" direction="in" /> \ <method name="ActivateResult">
</method> \ <arg type="s" direction="in" />
</interface> \ </method>
</node>'; </interface>
</node>`;
const SearchProvider2Iface = '<node> \ const SearchProvider2Iface = `
<interface name="org.gnome.Shell.SearchProvider2"> \ <node>
<method name="GetInitialResultSet"> \ <interface name="org.gnome.Shell.SearchProvider2">
<arg type="as" direction="in" /> \ <method name="GetInitialResultSet">
<arg type="as" direction="out" /> \ <arg type="as" direction="in" />
</method> \ <arg type="as" direction="out" />
<method name="GetSubsearchResultSet"> \ </method>
<arg type="as" direction="in" /> \ <method name="GetSubsearchResultSet">
<arg type="as" direction="in" /> \ <arg type="as" direction="in" />
<arg type="as" direction="out" /> \ <arg type="as" direction="in" />
</method> \ <arg type="as" direction="out" />
<method name="GetResultMetas"> \ </method>
<arg type="as" direction="in" /> \ <method name="GetResultMetas">
<arg type="aa{sv}" direction="out" /> \ <arg type="as" direction="in" />
</method> \ <arg type="aa{sv}" direction="out" />
<method name="ActivateResult"> \ </method>
<arg type="s" direction="in" /> \ <method name="ActivateResult">
<arg type="as" direction="in" /> \ <arg type="s" direction="in" />
<arg type="u" direction="in" /> \ <arg type="as" direction="in" />
</method> \ <arg type="u" direction="in" />
<method name="LaunchSearch"> \ </method>
<arg type="as" direction="in" /> \ <method name="LaunchSearch">
<arg type="u" direction="in" /> \ <arg type="as" direction="in" />
</method> \ <arg type="u" direction="in" />
</interface> \ </method>
</node>'; </interface>
</node>`;
var SearchProviderProxyInfo = Gio.DBusInterfaceInfo.new_for_xml(SearchProviderIface); var SearchProviderProxyInfo = Gio.DBusInterfaceInfo.new_for_xml(SearchProviderIface);
var SearchProvider2ProxyInfo = Gio.DBusInterfaceInfo.new_for_xml(SearchProvider2Iface); var SearchProvider2ProxyInfo = Gio.DBusInterfaceInfo.new_for_xml(SearchProvider2Iface);

View File

@ -8,29 +8,30 @@ const Signals = imports.signals;
const Main = imports.ui.main; const Main = imports.ui.main;
const ScreencastIface = '<node> \ const ScreencastIface = `
<interface name="org.gnome.Shell.Screencast"> \ <node>
<method name="Screencast"> \ <interface name="org.gnome.Shell.Screencast">
<arg type="s" direction="in" name="file_template"/> \ <method name="Screencast">
<arg type="a{sv}" direction="in" name="options"/> \ <arg type="s" direction="in" name="file_template"/>
<arg type="b" direction="out" name="success"/> \ <arg type="a{sv}" direction="in" name="options"/>
<arg type="s" direction="out" name="filename_used"/> \ <arg type="b" direction="out" name="success"/>
</method> \ <arg type="s" direction="out" name="filename_used"/>
<method name="ScreencastArea"> \ </method>
<arg type="i" direction="in" name="x"/> \ <method name="ScreencastArea">
<arg type="i" direction="in" name="y"/> \ <arg type="i" direction="in" name="x"/>
<arg type="i" direction="in" name="width"/> \ <arg type="i" direction="in" name="y"/>
<arg type="i" direction="in" name="height"/> \ <arg type="i" direction="in" name="width"/>
<arg type="s" direction="in" name="file_template"/> \ <arg type="i" direction="in" name="height"/>
<arg type="a{sv}" direction="in" name="options"/> \ <arg type="s" direction="in" name="file_template"/>
<arg type="b" direction="out" name="success"/> \ <arg type="a{sv}" direction="in" name="options"/>
<arg type="s" direction="out" name="filename_used"/> \ <arg type="b" direction="out" name="success"/>
</method> \ <arg type="s" direction="out" name="filename_used"/>
<method name="StopScreencast"> \ </method>
<arg type="b" direction="out" name="success"/> \ <method name="StopScreencast">
</method> \ <arg type="b" direction="out" name="success"/>
</interface> \ </method>
</node>'; </interface>
</node>`;
var ScreencastService = new Lang.Class({ var ScreencastService = new Lang.Class({
Name: 'ScreencastService', Name: 'ScreencastService',

View File

@ -16,50 +16,51 @@ const Lightbox = imports.ui.lightbox;
const Main = imports.ui.main; const Main = imports.ui.main;
const Tweener = imports.ui.tweener; const Tweener = imports.ui.tweener;
const ScreenshotIface = '<node> \ const ScreenshotIface = `
<interface name="org.gnome.Shell.Screenshot"> \ <node>
<method name="ScreenshotArea"> \ <interface name="org.gnome.Shell.Screenshot">
<arg type="i" direction="in" name="x"/> \ <method name="ScreenshotArea">
<arg type="i" direction="in" name="y"/> \ <arg type="i" direction="in" name="x"/>
<arg type="i" direction="in" name="width"/> \ <arg type="i" direction="in" name="y"/>
<arg type="i" direction="in" name="height"/> \ <arg type="i" direction="in" name="width"/>
<arg type="b" direction="in" name="flash"/> \ <arg type="i" direction="in" name="height"/>
<arg type="s" direction="in" name="filename"/> \ <arg type="b" direction="in" name="flash"/>
<arg type="b" direction="out" name="success"/> \ <arg type="s" direction="in" name="filename"/>
<arg type="s" direction="out" name="filename_used"/> \ <arg type="b" direction="out" name="success"/>
</method> \ <arg type="s" direction="out" name="filename_used"/>
<method name="ScreenshotWindow"> \ </method>
<arg type="b" direction="in" name="include_frame"/> \ <method name="ScreenshotWindow">
<arg type="b" direction="in" name="include_cursor"/> \ <arg type="b" direction="in" name="include_frame"/>
<arg type="b" direction="in" name="flash"/> \ <arg type="b" direction="in" name="include_cursor"/>
<arg type="s" direction="in" name="filename"/> \ <arg type="b" direction="in" name="flash"/>
<arg type="b" direction="out" name="success"/> \ <arg type="s" direction="in" name="filename"/>
<arg type="s" direction="out" name="filename_used"/> \ <arg type="b" direction="out" name="success"/>
</method> \ <arg type="s" direction="out" name="filename_used"/>
<method name="Screenshot"> \ </method>
<arg type="b" direction="in" name="include_cursor"/> \ <method name="Screenshot">
<arg type="b" direction="in" name="flash"/> \ <arg type="b" direction="in" name="include_cursor"/>
<arg type="s" direction="in" name="filename"/> \ <arg type="b" direction="in" name="flash"/>
<arg type="b" direction="out" name="success"/> \ <arg type="s" direction="in" name="filename"/>
<arg type="s" direction="out" name="filename_used"/> \ <arg type="b" direction="out" name="success"/>
</method> \ <arg type="s" direction="out" name="filename_used"/>
<method name="SelectArea"> \ </method>
<arg type="i" direction="out" name="x"/> \ <method name="SelectArea">
<arg type="i" direction="out" name="y"/> \ <arg type="i" direction="out" name="x"/>
<arg type="i" direction="out" name="width"/> \ <arg type="i" direction="out" name="y"/>
<arg type="i" direction="out" name="height"/> \ <arg type="i" direction="out" name="width"/>
</method> \ <arg type="i" direction="out" name="height"/>
<method name="FlashArea"> \ </method>
<arg type="i" direction="in" name="x"/> \ <method name="FlashArea">
<arg type="i" direction="in" name="y"/> \ <arg type="i" direction="in" name="x"/>
<arg type="i" direction="in" name="width"/> \ <arg type="i" direction="in" name="y"/>
<arg type="i" direction="in" name="height"/> \ <arg type="i" direction="in" name="width"/>
</method> \ <arg type="i" direction="in" name="height"/>
<method name="PickColor"> \ </method>
<arg type="a{sv}" direction="out" name="result"/> \ <method name="PickColor">
</method> \ <arg type="a{sv}" direction="out" name="result"/>
</interface> \ </method>
</node>'; </interface>
</node>`;
var ScreenshotService = new Lang.Class({ var ScreenshotService = new Lang.Class({
Name: 'ScreenshotService', Name: 'ScreenshotService',

View File

@ -68,19 +68,20 @@ function waitLeisure() {
return callback => { cb = callback; }; return callback => { cb = callback; };
} }
const PerfHelperIface = '<node> \ const PerfHelperIface = `
<interface name="org.gnome.Shell.PerfHelper"> \ <node>
<method name="CreateWindow"> \ <interface name="org.gnome.Shell.PerfHelper">
<arg type="i" direction="in" /> \ <method name="CreateWindow">
<arg type="i" direction="in" /> \ <arg type="i" direction="in" />
<arg type="b" direction="in" /> \ <arg type="i" direction="in" />
<arg type="b" direction="in" /> \ <arg type="b" direction="in" />
<arg type="b" direction="in" /> \ <arg type="b" direction="in" />
</method> \ <arg type="b" direction="in" />
<method name="WaitWindows" /> \ </method>
<method name="DestroyWindows" /> \ <method name="WaitWindows" />
</interface> \ <method name="DestroyWindows" />
</node>'; </interface>
</node>`;
var PerfHelperProxy = Gio.DBusProxy.makeProxyWrapper(PerfHelperIface); var PerfHelperProxy = Gio.DBusProxy.makeProxyWrapper(PerfHelperIface);
function PerfHelper() { function PerfHelper() {

View File

@ -14,70 +14,72 @@ const Main = imports.ui.main;
const Screenshot = imports.ui.screenshot; const Screenshot = imports.ui.screenshot;
const ViewSelector = imports.ui.viewSelector; const ViewSelector = imports.ui.viewSelector;
const GnomeShellIface = '<node> \ const GnomeShellIface = `
<interface name="org.gnome.Shell"> \ <node>
<method name="Eval"> \ <interface name="org.gnome.Shell">
<arg type="s" direction="in" name="script" /> \ <method name="Eval">
<arg type="b" direction="out" name="success" /> \ <arg type="s" direction="in" name="script" />
<arg type="s" direction="out" name="result" /> \ <arg type="b" direction="out" name="success" />
</method> \ <arg type="s" direction="out" name="result" />
<method name="FocusSearch"/> \ </method>
<method name="ShowOSD"> \ <method name="FocusSearch"/>
<arg type="a{sv}" direction="in" name="params"/> \ <method name="ShowOSD">
</method> \ <arg type="a{sv}" direction="in" name="params"/>
<method name="ShowMonitorLabels"> \ </method>
<arg type="a{uv}" direction="in" name="params" /> \ <method name="ShowMonitorLabels">
</method> \ <arg type="a{uv}" direction="in" name="params" />
<method name="ShowMonitorLabels2"> \ </method>
<arg type="a{sv}" direction="in" name="params" /> \ <method name="ShowMonitorLabels2">
</method> \ <arg type="a{sv}" direction="in" name="params" />
<method name="HideMonitorLabels" /> \ </method>
<method name="FocusApp"> \ <method name="HideMonitorLabels" />
<arg type="s" direction="in" name="id"/> \ <method name="FocusApp">
</method> \ <arg type="s" direction="in" name="id"/>
<method name="ShowApplications" /> \ </method>
<method name="GrabAccelerator"> \ <method name="ShowApplications" />
<arg type="s" direction="in" name="accelerator"/> \ <method name="GrabAccelerator">
<arg type="u" direction="in" name="flags"/> \ <arg type="s" direction="in" name="accelerator"/>
<arg type="u" direction="out" name="action"/> \ <arg type="u" direction="in" name="flags"/>
</method> \ <arg type="u" direction="out" name="action"/>
<method name="GrabAccelerators"> \ </method>
<arg type="a(su)" direction="in" name="accelerators"/> \ <method name="GrabAccelerators">
<arg type="au" direction="out" name="actions"/> \ <arg type="a(su)" direction="in" name="accelerators"/>
</method> \ <arg type="au" direction="out" name="actions"/>
<method name="UngrabAccelerator"> \ </method>
<arg type="u" direction="in" name="action"/> \ <method name="UngrabAccelerator">
<arg type="b" direction="out" name="success"/> \ <arg type="u" direction="in" name="action"/>
</method> \ <arg type="b" direction="out" name="success"/>
<signal name="AcceleratorActivated"> \ </method>
<arg name="action" type="u" /> \ <signal name="AcceleratorActivated">
<arg name="parameters" type="a{sv}" /> \ <arg name="action" type="u" />
</signal> \ <arg name="parameters" type="a{sv}" />
<property name="Mode" type="s" access="read" /> \ </signal>
<property name="OverviewActive" type="b" access="readwrite" /> \ <property name="Mode" type="s" access="read" />
<property name="ShellVersion" type="s" access="read" /> \ <property name="OverviewActive" type="b" access="readwrite" />
</interface> \ <property name="ShellVersion" type="s" access="read" />
</node>'; </interface>
</node>`;
const ScreenSaverIface = '<node> \ const ScreenSaverIface = `
<interface name="org.gnome.ScreenSaver"> \ <node>
<method name="Lock"> \ <interface name="org.gnome.ScreenSaver">
</method> \ <method name="Lock">
<method name="GetActive"> \ </method>
<arg name="active" direction="out" type="b" /> \ <method name="GetActive">
</method> \ <arg name="active" direction="out" type="b" />
<method name="SetActive"> \ </method>
<arg name="value" direction="in" type="b" /> \ <method name="SetActive">
</method> \ <arg name="value" direction="in" type="b" />
<method name="GetActiveTime"> \ </method>
<arg name="value" direction="out" type="u" /> \ <method name="GetActiveTime">
</method> \ <arg name="value" direction="out" type="u" />
<signal name="ActiveChanged"> \ </method>
<arg name="new_value" type="b" /> \ <signal name="ActiveChanged">
</signal> \ <arg name="new_value" type="b" />
<signal name="WakeUpScreen" /> \ </signal>
</interface> \ <signal name="WakeUpScreen" />
</node>'; </interface>
</node>`;
var GnomeShell = new Lang.Class({ var GnomeShell = new Lang.Class({
Name: 'GnomeShellDBus', Name: 'GnomeShellDBus',
@ -293,43 +295,44 @@ var GnomeShell = new Lang.Class({
ShellVersion: Config.PACKAGE_VERSION ShellVersion: Config.PACKAGE_VERSION
}); });
const GnomeShellExtensionsIface = '<node> \ const GnomeShellExtensionsIface = `
<interface name="org.gnome.Shell.Extensions"> \ <node>
<method name="ListExtensions"> \ <interface name="org.gnome.Shell.Extensions">
<arg type="a{sa{sv}}" direction="out" name="extensions" /> \ <method name="ListExtensions">
</method> \ <arg type="a{sa{sv}}" direction="out" name="extensions" />
<method name="GetExtensionInfo"> \ </method>
<arg type="s" direction="in" name="extension" /> \ <method name="GetExtensionInfo">
<arg type="a{sv}" direction="out" name="info" /> \ <arg type="s" direction="in" name="extension" />
</method> \ <arg type="a{sv}" direction="out" name="info" />
<method name="GetExtensionErrors"> \ </method>
<arg type="s" direction="in" name="extension" /> \ <method name="GetExtensionErrors">
<arg type="as" direction="out" name="errors" /> \ <arg type="s" direction="in" name="extension" />
</method> \ <arg type="as" direction="out" name="errors" />
<signal name="ExtensionStatusChanged"> \ </method>
<arg type="s" name="uuid"/> \ <signal name="ExtensionStatusChanged">
<arg type="i" name="state"/> \ <arg type="s" name="uuid"/>
<arg type="s" name="error"/> \ <arg type="i" name="state"/>
</signal> \ <arg type="s" name="error"/>
<method name="InstallRemoteExtension"> \ </signal>
<arg type="s" direction="in" name="uuid"/> \ <method name="InstallRemoteExtension">
<arg type="s" direction="out" name="result"/> \ <arg type="s" direction="in" name="uuid"/>
</method> \ <arg type="s" direction="out" name="result"/>
<method name="UninstallExtension"> \ </method>
<arg type="s" direction="in" name="uuid"/> \ <method name="UninstallExtension">
<arg type="b" direction="out" name="success"/> \ <arg type="s" direction="in" name="uuid"/>
</method> \ <arg type="b" direction="out" name="success"/>
<method name="LaunchExtensionPrefs"> \ </method>
<arg type="s" direction="in" name="uuid"/> \ <method name="LaunchExtensionPrefs">
</method> \ <arg type="s" direction="in" name="uuid"/>
<method name="ReloadExtension"> \ </method>
<arg type="s" direction="in" name="uuid"/> \ <method name="ReloadExtension">
</method> \ <arg type="s" direction="in" name="uuid"/>
<method name="CheckForUpdates"> \ </method>
</method> \ <method name="CheckForUpdates">
<property name="ShellVersion" type="s" access="read" /> \ </method>
</interface> \ <property name="ShellVersion" type="s" access="read" />
</node>'; </interface>
</node>`;
var GnomeShellExtensions = new Lang.Class({ var GnomeShellExtensions = new Lang.Class({
Name: 'GnomeShellExtensionsDBus', Name: 'GnomeShellExtensionsDBus',

View File

@ -436,38 +436,39 @@ var ShellProcessesDialog = new Lang.Class({
}); });
Signals.addSignalMethods(ShellProcessesDialog.prototype); Signals.addSignalMethods(ShellProcessesDialog.prototype);
const GnomeShellMountOpIface = '<node> \ const GnomeShellMountOpIface = `
<interface name="org.Gtk.MountOperationHandler"> \ <node>
<method name="AskPassword"> \ <interface name="org.Gtk.MountOperationHandler">
<arg type="s" direction="in" name="object_id"/> \ <method name="AskPassword">
<arg type="s" direction="in" name="message"/> \ <arg type="s" direction="in" name="object_id"/>
<arg type="s" direction="in" name="icon_name"/> \ <arg type="s" direction="in" name="message"/>
<arg type="s" direction="in" name="default_user"/> \ <arg type="s" direction="in" name="icon_name"/>
<arg type="s" direction="in" name="default_domain"/> \ <arg type="s" direction="in" name="default_user"/>
<arg type="u" direction="in" name="flags"/> \ <arg type="s" direction="in" name="default_domain"/>
<arg type="u" direction="out" name="response"/> \ <arg type="u" direction="in" name="flags"/>
<arg type="a{sv}" direction="out" name="response_details"/> \ <arg type="u" direction="out" name="response"/>
</method> \ <arg type="a{sv}" direction="out" name="response_details"/>
<method name="AskQuestion"> \ </method>
<arg type="s" direction="in" name="object_id"/> \ <method name="AskQuestion">
<arg type="s" direction="in" name="message"/> \ <arg type="s" direction="in" name="object_id"/>
<arg type="s" direction="in" name="icon_name"/> \ <arg type="s" direction="in" name="message"/>
<arg type="as" direction="in" name="choices"/> \ <arg type="s" direction="in" name="icon_name"/>
<arg type="u" direction="out" name="response"/> \ <arg type="as" direction="in" name="choices"/>
<arg type="a{sv}" direction="out" name="response_details"/> \ <arg type="u" direction="out" name="response"/>
</method> \ <arg type="a{sv}" direction="out" name="response_details"/>
<method name="ShowProcesses"> \ </method>
<arg type="s" direction="in" name="object_id"/> \ <method name="ShowProcesses">
<arg type="s" direction="in" name="message"/> \ <arg type="s" direction="in" name="object_id"/>
<arg type="s" direction="in" name="icon_name"/> \ <arg type="s" direction="in" name="message"/>
<arg type="ai" direction="in" name="application_pids"/> \ <arg type="s" direction="in" name="icon_name"/>
<arg type="as" direction="in" name="choices"/> \ <arg type="ai" direction="in" name="application_pids"/>
<arg type="u" direction="out" name="response"/> \ <arg type="as" direction="in" name="choices"/>
<arg type="a{sv}" direction="out" name="response_details"/> \ <arg type="u" direction="out" name="response"/>
</method> \ <arg type="a{sv}" direction="out" name="response_details"/>
<method name="Close"/> \ </method>
</interface> \ <method name="Close"/>
</node>'; </interface>
</node>`;
var ShellMountOperationType = { var ShellMountOperationType = {
NONE: 0, NONE: 0,

View File

@ -11,13 +11,14 @@ const PopupMenu = imports.ui.popupMenu;
const BUS_NAME = 'org.gnome.SettingsDaemon.Rfkill'; const BUS_NAME = 'org.gnome.SettingsDaemon.Rfkill';
const OBJECT_PATH = '/org/gnome/SettingsDaemon/Rfkill'; const OBJECT_PATH = '/org/gnome/SettingsDaemon/Rfkill';
const RfkillManagerInterface = '<node> \ const RfkillManagerInterface = `
<interface name="org.gnome.SettingsDaemon.Rfkill"> \ <node>
<property name="BluetoothAirplaneMode" type="b" access="readwrite" /> \ <interface name="org.gnome.SettingsDaemon.Rfkill">
<property name="BluetoothHasAirplaneMode" type="b" access="read" /> \ <property name="BluetoothAirplaneMode" type="b" access="readwrite" />
<property name="BluetoothHardwareAirplaneMode" type="b" access="readwrite" /> \ <property name="BluetoothHasAirplaneMode" type="b" access="read" />
</interface> \ <property name="BluetoothHardwareAirplaneMode" type="b" access="readwrite" />
</node>'; </interface>
</node>`;
const RfkillManagerProxy = Gio.DBusProxy.makeProxyWrapper(RfkillManagerInterface); const RfkillManagerProxy = Gio.DBusProxy.makeProxyWrapper(RfkillManagerInterface);

View File

@ -11,11 +11,12 @@ const Slider = imports.ui.slider;
const BUS_NAME = 'org.gnome.SettingsDaemon.Power'; const BUS_NAME = 'org.gnome.SettingsDaemon.Power';
const OBJECT_PATH = '/org/gnome/SettingsDaemon/Power'; const OBJECT_PATH = '/org/gnome/SettingsDaemon/Power';
const BrightnessInterface = '<node> \ const BrightnessInterface = `
<interface name="org.gnome.SettingsDaemon.Power.Screen"> \ <node>
<property name="Brightness" type="i" access="readwrite"/> \ <interface name="org.gnome.SettingsDaemon.Power.Screen">
</interface> \ <property name="Brightness" type="i" access="readwrite"/>
</node>'; </interface>
</node>`;
const BrightnessProxy = Gio.DBusProxy.makeProxyWrapper(BrightnessInterface); const BrightnessProxy = Gio.DBusProxy.makeProxyWrapper(BrightnessInterface);

View File

@ -40,29 +40,31 @@ function accuracyLevelToString(accuracyLevel) {
return 'NONE'; return 'NONE';
} }
var GeoclueIface = '<node> \ var GeoclueIface = `
<interface name="org.freedesktop.GeoClue2.Manager"> \ <node>
<property name="InUse" type="b" access="read"/> \ <interface name="org.freedesktop.GeoClue2.Manager">
<property name="AvailableAccuracyLevel" type="u" access="read"/> \ <property name="InUse" type="b" access="read"/>
<method name="AddAgent"> \ <property name="AvailableAccuracyLevel" type="u" access="read"/>
<arg name="id" type="s" direction="in"/> \ <method name="AddAgent">
</method> \ <arg name="id" type="s" direction="in"/>
</interface> \ </method>
</node>'; </interface>
</node>`;
const GeoclueManager = Gio.DBusProxy.makeProxyWrapper(GeoclueIface); const GeoclueManager = Gio.DBusProxy.makeProxyWrapper(GeoclueIface);
var AgentIface = '<node> \ var AgentIface = `
<interface name="org.freedesktop.GeoClue2.Agent"> \ <node>
<property name="MaxAccuracyLevel" type="u" access="read"/> \ <interface name="org.freedesktop.GeoClue2.Agent">
<method name="AuthorizeApp"> \ <property name="MaxAccuracyLevel" type="u" access="read"/>
<arg name="desktop_id" type="s" direction="in"/> \ <method name="AuthorizeApp">
<arg name="req_accuracy_level" type="u" direction="in"/> \ <arg name="desktop_id" type="s" direction="in"/>
<arg name="authorized" type="b" direction="out"/> \ <arg name="req_accuracy_level" type="u" direction="in"/>
<arg name="allowed_accuracy_level" type="u" direction="out"/> \ <arg name="authorized" type="b" direction="out"/>
</method> \ <arg name="allowed_accuracy_level" type="u" direction="out"/>
</interface> \ </method>
</node>'; </interface>
</node>`;
var Indicator = new Lang.Class({ var Indicator = new Lang.Class({
Name: 'LocationIndicator', Name: 'LocationIndicator',

View File

@ -51,25 +51,26 @@ var PortalHelperResult = {
RECHECK: 2 RECHECK: 2
}; };
const PortalHelperIface = '<node> \ const PortalHelperIface = `
<interface name="org.gnome.Shell.PortalHelper"> \ <node>
<method name="Authenticate"> \ <interface name="org.gnome.Shell.PortalHelper">
<arg type="o" direction="in" name="connection" /> \ <method name="Authenticate">
<arg type="s" direction="in" name="url" /> \ <arg type="o" direction="in" name="connection" />
<arg type="u" direction="in" name="timestamp" /> \ <arg type="s" direction="in" name="url" />
</method> \ <arg type="u" direction="in" name="timestamp" />
<method name="Close"> \ </method>
<arg type="o" direction="in" name="connection" /> \ <method name="Close">
</method> \ <arg type="o" direction="in" name="connection" />
<method name="Refresh"> \ </method>
<arg type="o" direction="in" name="connection" /> \ <method name="Refresh">
</method> \ <arg type="o" direction="in" name="connection" />
<signal name="Done"> \ </method>
<arg type="o" name="connection" /> \ <signal name="Done">
<arg type="u" name="result" /> \ <arg type="o" name="connection" />
</signal> \ <arg type="u" name="result" />
</interface> \ </signal>
</node>'; </interface>
</node>`;
const PortalHelperProxy = Gio.DBusProxy.makeProxyWrapper(PortalHelperIface); const PortalHelperProxy = Gio.DBusProxy.makeProxyWrapper(PortalHelperIface);
function signalToIcon(value) { function signalToIcon(value) {

View File

@ -10,12 +10,13 @@ const PopupMenu = imports.ui.popupMenu;
const BUS_NAME = 'org.gnome.SettingsDaemon.Color'; const BUS_NAME = 'org.gnome.SettingsDaemon.Color';
const OBJECT_PATH = '/org/gnome/SettingsDaemon/Color'; const OBJECT_PATH = '/org/gnome/SettingsDaemon/Color';
const ColorInterface = '<node> \ const ColorInterface = `
<interface name="org.gnome.SettingsDaemon.Color"> \ <node>
<property name="DisabledUntilTomorrow" type="b" access="readwrite"/> \ <interface name="org.gnome.SettingsDaemon.Color">
<property name="NightLightActive" type="b" access="read"/> \ <property name="DisabledUntilTomorrow" type="b" access="readwrite"/>
</interface> \ <property name="NightLightActive" type="b" access="read"/>
</node>'; </interface>
</node>`;
const ColorProxy = Gio.DBusProxy.makeProxyWrapper(ColorInterface); const ColorProxy = Gio.DBusProxy.makeProxyWrapper(ColorInterface);

View File

@ -13,17 +13,18 @@ const PopupMenu = imports.ui.popupMenu;
const BUS_NAME = 'org.freedesktop.UPower'; const BUS_NAME = 'org.freedesktop.UPower';
const OBJECT_PATH = '/org/freedesktop/UPower/devices/DisplayDevice'; const OBJECT_PATH = '/org/freedesktop/UPower/devices/DisplayDevice';
const DisplayDeviceInterface = '<node> \ const DisplayDeviceInterface = `
<interface name="org.freedesktop.UPower.Device"> \ <node>
<property name="Type" type="u" access="read"/> \ <interface name="org.freedesktop.UPower.Device">
<property name="State" type="u" access="read"/> \ <property name="Type" type="u" access="read"/>
<property name="Percentage" type="d" access="read"/> \ <property name="State" type="u" access="read"/>
<property name="TimeToEmpty" type="x" access="read"/> \ <property name="Percentage" type="d" access="read"/>
<property name="TimeToFull" type="x" access="read"/> \ <property name="TimeToEmpty" type="x" access="read"/>
<property name="IsPresent" type="b" access="read"/> \ <property name="TimeToFull" type="x" access="read"/>
<property name="IconName" type="s" access="read"/> \ <property name="IsPresent" type="b" access="read"/>
</interface> \ <property name="IconName" type="s" access="read"/>
</node>'; </interface>
</node>`;
const PowerManagerProxy = Gio.DBusProxy.makeProxyWrapper(DisplayDeviceInterface); const PowerManagerProxy = Gio.DBusProxy.makeProxyWrapper(DisplayDeviceInterface);

View File

@ -11,13 +11,14 @@ const PopupMenu = imports.ui.popupMenu;
const BUS_NAME = 'org.gnome.SettingsDaemon.Rfkill'; const BUS_NAME = 'org.gnome.SettingsDaemon.Rfkill';
const OBJECT_PATH = '/org/gnome/SettingsDaemon/Rfkill'; const OBJECT_PATH = '/org/gnome/SettingsDaemon/Rfkill';
const RfkillManagerInterface = '<node> \ const RfkillManagerInterface = `
<interface name="org.gnome.SettingsDaemon.Rfkill"> \ <node>
<property name="AirplaneMode" type="b" access="readwrite" /> \ <interface name="org.gnome.SettingsDaemon.Rfkill">
<property name="HardwareAirplaneMode" type="b" access="read" /> \ <property name="AirplaneMode" type="b" access="readwrite" />
<property name="ShouldShowAirplaneMode" type="b" access="read" /> \ <property name="HardwareAirplaneMode" type="b" access="read" />
</interface> \ <property name="ShouldShowAirplaneMode" type="b" access="read" />
</node>'; </interface>
</node>`;
const RfkillManagerProxy = Gio.DBusProxy.makeProxyWrapper(RfkillManagerInterface); const RfkillManagerProxy = Gio.DBusProxy.makeProxyWrapper(RfkillManagerInterface);

View File

@ -14,40 +14,42 @@ const PanelMenu = imports.ui.panelMenu;
/* Keep in sync with data/org.freedesktop.bolt.xml */ /* Keep in sync with data/org.freedesktop.bolt.xml */
const BoltClientInterface = '<node> \ const BoltClientInterface = `
<interface name="org.freedesktop.bolt1.Manager"> \ <node>
<property name="Probing" type="b" access="read"></property> \ <interface name="org.freedesktop.bolt1.Manager">
<property name="AuthMode" type="s" access="readwrite"></property> \ <property name="Probing" type="b" access="read"></property>
<method name="EnrollDevice"> \ <property name="AuthMode" type="s" access="readwrite"></property>
<arg type="s" name="uid" direction="in"> </arg> \ <method name="EnrollDevice">
<arg type="s" name="policy" direction="in"> </arg> \ <arg type="s" name="uid" direction="in"> </arg>
<arg type="s" name="flags" direction="in"> </arg> \ <arg type="s" name="policy" direction="in"> </arg>
<arg name="device" direction="out" type="o"> </arg> \ <arg type="s" name="flags" direction="in"> </arg>
</method> \ <arg name="device" direction="out" type="o"> </arg>
<signal name="DeviceAdded"> \ </method>
<arg name="device" type="o"> </arg> \ <signal name="DeviceAdded">
</signal> \ <arg name="device" type="o"> </arg>
</interface> \ </signal>
</node>'; </interface>
</node>`;
const BoltDeviceInterface = '<node> \ const BoltDeviceInterface = `
<interface name="org.freedesktop.bolt1.Device"> \ <node>
<property name="Uid" type="s" access="read"></property> \ <interface name="org.freedesktop.bolt1.Device">
<property name="Name" type="s" access="read"></property> \ <property name="Uid" type="s" access="read"></property>
<property name="Vendor" type="s" access="read"></property> \ <property name="Name" type="s" access="read"></property>
<property name="Type" type="s" access="read"></property> \ <property name="Vendor" type="s" access="read"></property>
<property name="Status" type="s" access="read"></property> \ <property name="Type" type="s" access="read"></property>
<property name="Parent" type="s" access="read"></property> \ <property name="Status" type="s" access="read"></property>
<property name="SysfsPath" type="s" access="read"></property> \ <property name="Parent" type="s" access="read"></property>
<property name="Stored" type="b" access="read"></property> \ <property name="SysfsPath" type="s" access="read"></property>
<property name="Policy" type="s" access="read"></property> \ <property name="Stored" type="b" access="read"></property>
<property name="Key" type="s" access="read"></property> \ <property name="Policy" type="s" access="read"></property>
<property name="Label" type="s" access="read"></property> \ <property name="Key" type="s" access="read"></property>
<property name="ConnectTime" type="t" access="read"></property> \ <property name="Label" type="s" access="read"></property>
<property name="AuthorizeTime" type="t" access="read"></property> \ <property name="ConnectTime" type="t" access="read"></property>
<property name="StoreTime" type="t" access="read"></property> \ <property name="AuthorizeTime" type="t" access="read"></property>
</interface> \ <property name="StoreTime" type="t" access="read"></property>
</node>'; </interface>
</node>`;
const BoltDeviceProxy = Gio.DBusProxy.makeProxyWrapper(BoltDeviceInterface); const BoltDeviceProxy = Gio.DBusProxy.makeProxyWrapper(BoltDeviceInterface);

View File

@ -42,19 +42,20 @@ var ONE_SECOND = 1000; // in ms
const GSD_WACOM_BUS_NAME = 'org.gnome.SettingsDaemon.Wacom'; const GSD_WACOM_BUS_NAME = 'org.gnome.SettingsDaemon.Wacom';
const GSD_WACOM_OBJECT_PATH = '/org/gnome/SettingsDaemon/Wacom'; const GSD_WACOM_OBJECT_PATH = '/org/gnome/SettingsDaemon/Wacom';
const GsdWacomIface = '<node name="/org/gnome/SettingsDaemon/Wacom"> \ const GsdWacomIface = `
<interface name="org.gnome.SettingsDaemon.Wacom"> \ <node name="/org/gnome/SettingsDaemon/Wacom">
<method name="SetGroupModeLED"> \ <interface name="org.gnome.SettingsDaemon.Wacom">
<arg name="device_path" direction="in" type="s"/> \ <method name="SetGroupModeLED">
<arg name="group" direction="in" type="u"/> \ <arg name="device_path" direction="in" type="s"/>
<arg name="mode" direction="in" type="u"/> \ <arg name="group" direction="in" type="u"/>
</method> \ <arg name="mode" direction="in" type="u"/>
<method name="SetOLEDLabels"> \ </method>
<arg name="device_path" direction="in" type="s"/> \ <method name="SetOLEDLabels">
<arg name="labels" direction="in" type="as"/> \ <arg name="device_path" direction="in" type="s"/>
</method> \ <arg name="labels" direction="in" type="as"/>
</interface> \ </method>
</node>'; </interface>
</node>`;
const GsdWacomProxy = Gio.DBusProxy.makeProxyWrapper(GsdWacomIface); const GsdWacomProxy = Gio.DBusProxy.makeProxyWrapper(GsdWacomIface);