summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnome-settings-daemon/Makefile.am18
-rw-r--r--gnome-settings-daemon/gnome-settings-session.c19
-rw-r--r--gnome-settings-daemon/gnome-settings-session.h3
-rw-r--r--gnome-settings-daemon/main.c2
-rw-r--r--gnome-settings-daemon/org.gnome.SessionManager.xml451
-rw-r--r--plugins/color/gsd-color-x11.c2
-rw-r--r--plugins/media-keys/gsd-media-keys-manager.c2
-rw-r--r--plugins/power/gsd-power-manager.c10
-rw-r--r--plugins/screensaver-proxy/gsd-screensaver-proxy-manager.c8
-rw-r--r--plugins/updates/gsd-updates-manager.c6
-rw-r--r--plugins/updates/gsd-updates-refresh.c6
11 files changed, 496 insertions, 31 deletions
diff --git a/gnome-settings-daemon/Makefile.am b/gnome-settings-daemon/Makefile.am
index 7cb28051..c0d749e3 100644
--- a/gnome-settings-daemon/Makefile.am
+++ b/gnome-settings-daemon/Makefile.am
@@ -1,4 +1,5 @@
NULL =
+BUILT_SOURCES = $(NULL)
AM_CPPFLAGS = \
-DDATADIR=\""$(datadir)"\" \
@@ -18,7 +19,20 @@ privlib_LTLIBRARIES = \
libgsd.la \
$(NULL)
+session_manager_dbus_built_sources = gsd-session-manager-glue.c gsd-session-manager-glue.h
+BUILT_SOURCES += $(session_manager_dbus_built_sources)
+
+$(session_manager_dbus_built_sources) : Makefile.am org.gnome.SessionManager.xml
+ gdbus-codegen \
+ --interface-prefix org.gnome.SessionManager. \
+ --generate-c-code gsd-session-manager-glue \
+ --c-namespace Gsd \
+ --annotate "org.gnome.SessionManager" \
+ "org.gtk.GDBus.C.Name" SessionManager \
+ $(srcdir)/org.gnome.SessionManager.xml
+
libgsd_la_SOURCES = \
+ $(session_manager_dbus_built_sources) \
gnome-settings-profile.c \
gnome-settings-profile.h \
gnome-settings-session.c \
@@ -53,7 +67,9 @@ gsd_SCRIPTS = \
gnome-settings-daemon-localeexec
EXTRA_DIST = \
- gnome-settings-daemon-localeexec.in
+ gnome-settings-daemon-localeexec.in \
+ org.gnome.SessionManager.xml \
+ $(NULL)
gnome-settings-daemon-localeexec: gnome-settings-daemon-localeexec.in
$(AM_V_GEN) sed -e "s|\@libexecdir\@|$(libexecdir)|" -e "s|\@prefix\@|$(prefix)|" $< > $@.tmp && mv $@.tmp $@
diff --git a/gnome-settings-daemon/gnome-settings-session.c b/gnome-settings-daemon/gnome-settings-session.c
index a9efeded..0d883a5d 100644
--- a/gnome-settings-daemon/gnome-settings-session.c
+++ b/gnome-settings-daemon/gnome-settings-session.c
@@ -31,25 +31,22 @@
#define GNOME_SESSION_DBUS_NAME "org.gnome.SessionManager"
#define GNOME_SESSION_DBUS_OBJECT "/org/gnome/SessionManager"
-#define GNOME_SESSION_DBUS_INTERFACE "org.gnome.SessionManager"
-GDBusProxy *
+GsdSessionManager *
gnome_settings_session_get_session_proxy (void)
{
- static GDBusProxy *session_proxy;
+ static GsdSessionManager *session_proxy;
GError *error = NULL;
if (session_proxy != NULL) {
g_object_ref (session_proxy);
} else {
- session_proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION,
- G_DBUS_PROXY_FLAGS_NONE,
- NULL,
- GNOME_SESSION_DBUS_NAME,
- GNOME_SESSION_DBUS_OBJECT,
- GNOME_SESSION_DBUS_INTERFACE,
- NULL,
- &error);
+ session_proxy = gsd_session_manager_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION,
+ G_DBUS_PROXY_FLAGS_NONE,
+ GNOME_SESSION_DBUS_NAME,
+ GNOME_SESSION_DBUS_OBJECT,
+ NULL,
+ &error);
if (error) {
g_warning ("Failed to connect to the session manager: %s", error->message);
g_error_free (error);
diff --git a/gnome-settings-daemon/gnome-settings-session.h b/gnome-settings-daemon/gnome-settings-session.h
index 0c9a1b79..857479fd 100644
--- a/gnome-settings-daemon/gnome-settings-session.h
+++ b/gnome-settings-daemon/gnome-settings-session.h
@@ -23,10 +23,11 @@
#define __GNOME_SETTINGS_SESSION_H
#include <glib-object.h>
+#include "gsd-session-manager-glue.h"
G_BEGIN_DECLS
-GDBusProxy *gnome_settings_session_get_session_proxy (void);
+GsdSessionManager *gnome_settings_session_get_session_proxy (void);
G_END_DECLS
diff --git a/gnome-settings-daemon/main.c b/gnome-settings-daemon/main.c
index 353b5587..56cd5e88 100644
--- a/gnome-settings-daemon/main.c
+++ b/gnome-settings-daemon/main.c
@@ -341,7 +341,7 @@ name_acquired_handler (GDBusConnection *connection,
{
GDBusProxy *proxy;
- proxy = gnome_settings_session_get_session_proxy ();
+ proxy = G_DBUS_PROXY (gnome_settings_session_get_session_proxy ());
/* Always call this first, as Setenv can only be called before
any client registers */
set_locale (proxy);
diff --git a/gnome-settings-daemon/org.gnome.SessionManager.xml b/gnome-settings-daemon/org.gnome.SessionManager.xml
new file mode 100644
index 00000000..eb69180b
--- /dev/null
+++ b/gnome-settings-daemon/org.gnome.SessionManager.xml
@@ -0,0 +1,451 @@
+<?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 xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
+ <interface name="org.gnome.SessionManager">
+
+ <!-- Initialization phase interfaces -->
+
+ <method name="Setenv">
+ <arg name="variable" type="s" direction="in">
+ <doc:doc>
+ <doc:summary>The variable name</doc:summary>
+ </doc:doc>
+ </arg>
+ <arg name="value" type="s" direction="in">
+ <doc:doc>
+ <doc:summary>The value</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description>
+ <doc:para>Adds the variable name to the application launch environment with the specified value. May only be used during the Session Manager initialization phase.</doc:para>
+ </doc:description>
+ </doc:doc>
+ </method>
+
+ <method name="GetLocale">
+ <arg name="category" type="i" direction="in">
+ <doc:doc>
+ <doc:summary>The locale category</doc:summary>
+ </doc:doc>
+ </arg>
+ <arg name="value" type="s" direction="out">
+ <doc:doc>
+ <doc:summary>The value</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description>
+ <doc:para>Reads the current state of the specific locale category.</doc:para>
+ </doc:description>
+ </doc:doc>
+ </method>
+
+ <method name="InitializationError">
+ <arg name="message" type="s" direction="in">
+ <doc:doc>
+ <doc:summary>The error message</doc:summary>
+ </doc:doc>
+ </arg>
+ <arg name="fatal" type="b" direction="in">
+ <doc:doc>
+ <doc:summary>Whether the error should be treated as fatal</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description>
+ <doc:para>May be used by applications launched during the Session Manager initialization phase to indicate there was a problem.</doc:para>
+ </doc:description>
+ </doc:doc>
+ </method>
+
+ <!-- Running phase interfaces -->
+
+ <method name="RegisterClient">
+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
+ <arg type="s" name="app_id" direction="in">
+ <doc:doc>
+ <doc:summary>The application identifier</doc:summary>
+ </doc:doc>
+ </arg>
+ <arg type="s" name="client_startup_id" direction="in">
+ <doc:doc>
+ <doc:summary>Client startup identifier</doc:summary>
+ </doc:doc>
+ </arg>
+ <arg type="o" name="client_id" direction="out">
+ <doc:doc>
+ <doc:summary>The object path of the newly registered client</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description>
+ <doc:para>Register the caller as a Session Management client.</doc:para>
+ </doc:description>
+ </doc:doc>
+ </method>
+
+ <method name="UnregisterClient">
+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
+ <arg type="o" name="client_id" direction="in">
+ <doc:doc>
+ <doc:summary>The object path of the client</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description>
+ <doc:para>Unregister the specified client from Session Management.</doc:para>
+ </doc:description>
+ </doc:doc>
+ </method>
+
+ <method name="Inhibit">
+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
+ <arg type="s" name="app_id" direction="in">
+ <doc:doc>
+ <doc:summary>The application identifier</doc:summary>
+ </doc:doc>
+ </arg>
+ <arg type="u" name="toplevel_xid" direction="in">
+ <doc:doc>
+ <doc:summary>The toplevel X window identifier</doc:summary>
+ </doc:doc>
+ </arg>
+ <arg type="s" name="reason" direction="in">
+ <doc:doc>
+ <doc:summary>The reason for the inhibit</doc:summary>
+ </doc:doc>
+ </arg>
+ <arg type="u" name="flags" direction="in">
+ <doc:doc>
+ <doc:summary>Flags that specify what should be inhibited</doc:summary>
+ </doc:doc>
+ </arg>
+ <arg type="u" name="inhibit_cookie" direction="out">
+ <doc:doc>
+ <doc:summary>The cookie</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:summary>
+ Proactively indicates that the calling application is performing an action that should not be interrupted and sets a reason to be displayed to the user when an interruption is about to take placea.
+ </doc:summary>
+ <doc:description>
+ <doc:para>Applications should invoke this method when they begin an operation that
+ should not be interrupted, such as creating a CD or DVD. The types of actions
+ that may be blocked are specified by the flags parameter. When the application
+ completes the operation it should call <doc:ref type="method" to="org.gnome.SessionManager.Uninhibit">Uninhibit()</doc:ref>
+ or disconnect from the session bus.
+ </doc:para>
+ <doc:para>
+ Applications should not expect that they will always be able to block the
+ action. In most cases, users will be given the option to force the action
+ to take place.
+ </doc:para>
+ <doc:para>
+ Reasons should be short and to the point.
+ </doc:para>
+ <doc:para>
+ The flags parameter must include at least one of the following:
+ <doc:list>
+ <doc:item>
+ <doc:term>1</doc:term>
+ <doc:definition>Inhibit logging out</doc:definition>
+ </doc:item>
+ <doc:item>
+ <doc:term>2</doc:term>
+ <doc:definition>Inhibit user switching</doc:definition>
+ </doc:item>
+ <doc:item>
+ <doc:term>4</doc:term>
+ <doc:definition>Inhibit suspending the session or computer</doc:definition>
+ </doc:item>
+ <doc:item>
+ <doc:term>8</doc:term>
+ <doc:definition>Inhibit the session being marked as idle</doc:definition>
+ </doc:item>
+ <doc:item>
+ <doc:term>16</doc:term>
+ <doc:definition>Inhibit auto-mounting removable media for the session</doc:definition>
+ </doc:item>
+ </doc:list>
+ Values for flags may be bitwise or'ed together.
+ </doc:para>
+ <doc:para>
+ The returned cookie is used to uniquely identify this request. It should be used
+ as an argument to <doc:ref type="method" to="org.gnome.SessionManager.Uninhibit">Uninhibit()</doc:ref> in
+ order to remove the request.
+ </doc:para>
+ </doc:description>
+ </doc:doc>
+ </method>
+
+ <method name="Uninhibit">
+ <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
+ <arg type="u" name="inhibit_cookie" direction="in">
+ <doc:doc>
+ <doc:summary>The cookie</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description>
+ <doc:para>Cancel a previous call to <doc:ref type="method" to="org.gnome.SessionManager.Inhibit">Inhibit()</doc:ref> identified by the cookie.</doc:para>
+ </doc:description>
+ </doc:doc>
+ </method>
+
+ <method name="IsInhibited">
+ <arg type="u" name="flags" direction="in">
+ <doc:doc>
+ <doc:summary>Flags that spefify what should be inhibited</doc:summary>
+ </doc:doc>
+ </arg>
+ <arg type="b" name="is_inhibited" direction="out">
+ <doc:doc>
+ <doc:summary>Returns TRUE if any of the operations in the bitfield flags are inhibited</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description>
+ <doc:para>Determine if operation(s) specified by the flags
+ are currently inhibited. Flags are same as those accepted
+ by the
+ <doc:ref type="method" to="org.gnome.SessionManager.Inhibit">Inhibit()</doc:ref>
+ method.</doc:para>
+ </doc:description>
+ </doc:doc>
+ </method>
+
+ <method name="GetClients">
+ <arg name="clients" direction="out" type="ao">
+ <doc:doc>
+ <doc:summary>an array of client IDs</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description>
+ <doc:para>This gets a list of all the <doc:ref type="interface" to="org.gnome.SessionManager.Client">Clients</doc:ref>
+ that are currently known to the session manager.</doc:para>
+ <doc:para>Each Client ID is an D-Bus object path for the object that implements the
+ <doc:ref type="interface" to="org.gnome.SessionManager.Client">Client</doc:ref> interface.</doc:para>
+ </doc:description>
+ <doc:seealso><doc:ref type="interface" to="org.gnome.SessionManager.Client">org.gnome.SessionManager.Client</doc:ref></doc:seealso>
+ </doc:doc>
+ </method>
+
+ <method name="GetInhibitors">
+ <arg name="inhibitors" direction="out" type="ao">
+ <doc:doc>
+ <doc:summary>an array of inhibitor IDs</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description>
+ <doc:para>This gets a list of all the <doc:ref type="interface" to="org.gnome.SessionManager.Inhibitor">Inhibitors</doc:ref>
+ that are currently known to the session manager.</doc:para>
+ <doc:para>Each Inhibitor ID is an D-Bus object path for the object that implements the
+ <doc:ref type="interface" to="org.gnome.SessionManager.Inhibitor">Inhibitor</doc:ref> interface.</doc:para>
+ </doc:description>
+ <doc:seealso><doc:ref type="interface" to="org.gnome.SessionManager.Inhibitor">org.gnome.SessionManager.Inhibitor</doc:ref></doc:seealso>
+ </doc:doc>
+ </method>
+
+
+ <method name="IsAutostartConditionHandled">
+ <arg name="condition" direction="in" type="s">
+ <doc:doc>
+ <doc:summary>The autostart condition string</doc:summary>
+ </doc:doc>
+ </arg>
+ <arg name="handled" direction="out" type="b">
+ <doc:doc>
+ <doc:summary>True if condition is handled, false otherwise</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description>
+ <doc:para>Allows the caller to determine whether the session manager is
+ handling changes to the specified autostart condition.</doc:para>
+ </doc:description>
+ </doc:doc>
+ </method>
+
+ <method name="Shutdown">
+ <doc:doc>
+ <doc:description>
+ <doc:para>Request a shutdown dialog.</doc:para>
+ </doc:description>
+ </doc:doc>
+ </method>
+
+ <method name="Reboot">
+ <doc:doc>
+ <doc:description>
+ <doc:para>Request a reboot dialog.</doc:para>
+ </doc:description>
+ </doc:doc>
+ </method>
+
+ <method name="CanShutdown">
+ <arg name="is_available" direction="out" type="b">
+ <doc:doc>
+ <doc:summary>True if shutdown is available to the user, false otherwise</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description>
+ <doc:para>Allows the caller to determine whether or not it's okay to show
+ a shutdown option in the UI</doc:para>
+ </doc:description>
+ </doc:doc>
+ </method>
+
+ <method name="Logout">
+ <arg name="mode" type="u" direction="in">
+ <doc:doc>
+ <doc:summary>The type of logout that is being requested</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description>
+ <doc:para>Request a logout dialog</doc:para>
+ <doc:para>
+ Allowed values for the mode parameter are:
+ <doc:list>
+ <doc:item>
+ <doc:term>0</doc:term>
+ <doc:definition>Normal.</doc:definition>
+ </doc:item>
+ <doc:item>
+ <doc:term>1</doc:term>
+ <doc:definition>No confirmation inferface should be shown.</doc:definition>
+ </doc:item>
+ <doc:item>
+ <doc:term>2</doc:term>
+ <doc:definition>Forcefully logout. No confirmation will be shown and any inhibitors will be ignored.</doc:definition>
+ </doc:item>
+ </doc:list>
+ Values for flags may be bitwise or'ed together.
+ </doc:para>
+ </doc:description>
+ </doc:doc>
+ </method>
+
+ <method name="IsSessionRunning">
+ <arg name="running" direction="out" type="b">
+ <doc:doc>
+ <doc:summary>True if the session has entered the Running phase, false otherwise</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description>
+ <doc:para>Allows the caller to determine whether the session manager
+ has entered the Running phase, in case the client missed the
+ SessionRunning signal.</doc:para>
+ </doc:description>
+ </doc:doc>
+ </method>
+
+ <!-- Signals -->
+
+ <signal name="ClientAdded">
+ <arg name="id" type="o">
+ <doc:doc>
+ <doc:summary>The object path for the added client</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description>
+ <doc:para>Emitted when a client has been added to the session manager.
+ </doc:para>
+ </doc:description>
+ </doc:doc>
+ </signal>
+ <signal name="ClientRemoved">
+ <arg name="id" type="o">
+ <doc:doc>
+ <doc:summary>The object path for the removed client</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description>
+ <doc:para>Emitted when a client has been removed from the session manager.
+ </doc:para>
+ </doc:description>
+ </doc:doc>
+ </signal>
+
+ <signal name="InhibitorAdded">
+ <arg name="id" type="o">
+ <doc:doc>
+ <doc:summary>The object path for the added inhibitor</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description>
+ <doc:para>Emitted when an inhibitor has been added to the session manager.
+ </doc:para>
+ </doc:description>
+ </doc:doc>
+ </signal>
+ <signal name="InhibitorRemoved">
+ <arg name="id" type="o">
+ <doc:doc>
+ <doc:summary>The object path for the removed inhibitor</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description>
+ <doc:para>Emitted when an inhibitor has been removed from the session manager.
+ </doc:para>
+ </doc:description>
+ </doc:doc>
+ </signal>
+
+ <signal name="SessionRunning">
+ <doc:doc>
+ <doc:description>
+ <doc:para>Indicates the session has entered the Running phase.</doc:para>
+ </doc:description>
+ </doc:doc>
+ </signal>
+
+ <signal name="SessionOver">
+ <doc:doc>
+ <doc:description>
+ <doc:para>Indicates the session is about to end.</doc:para>
+ </doc:description>
+ </doc:doc>
+ </signal>
+
+ <!-- Properties -->
+
+ <property name="SessionName" type="s" access="read">
+ <doc:doc>
+ <doc:description>
+ <doc:para>The name of the session that has been loaded.</doc:para>
+ </doc:description>
+ </doc:doc>
+ </property>
+
+ <property name="SessionIsActive" type="b" access="read">
+ <doc:doc>
+ <doc:description>
+ <doc:para>If true, the session is currently in the
+ foreground and available for user input.</doc:para>
+ </doc:description>
+ </doc:doc>
+ </property>
+
+ <property name="InhibitedActions" type="u" access="read">
+ <doc:doc>
+ <doc:description>
+ <doc:para>A bitmask of flags to indicate which actions
+ are inhibited. See the Inhibit() function's description
+ for a list of possible values.</doc:para>
+ </doc:description>
+ </doc:doc>
+ </property>
+
+ </interface>
+</node>
diff --git a/plugins/color/gsd-color-x11.c b/plugins/color/gsd-color-x11.c
index 6e5fd79b..08b3e291 100644
--- a/plugins/color/gsd-color-x11.c
+++ b/plugins/color/gsd-color-x11.c
@@ -42,7 +42,7 @@
struct GsdColorX11Private
{
- GDBusProxy *session;
+ GsdSessionManager *session;
CdClient *client;
GnomeRRScreen *x11_screen;
GHashTable *edid_cache;
diff --git a/plugins/media-keys/gsd-media-keys-manager.c b/plugins/media-keys/gsd-media-keys-manager.c
index 78f6c5f0..d288f33b 100644
--- a/plugins/media-keys/gsd-media-keys-manager.c
+++ b/plugins/media-keys/gsd-media-keys-manager.c
@@ -845,7 +845,7 @@ gnome_session_shutdown (GsdMediaKeysManager *manager)
GVariant *variant;
GDBusProxy *proxy;
- proxy = gnome_settings_session_get_session_proxy ();
+ proxy = G_DBUS_PROXY (gnome_settings_session_get_session_proxy ());
variant = g_dbus_proxy_call_sync (proxy,
"Shutdown",
NULL,
diff --git a/plugins/power/gsd-power-manager.c b/plugins/power/gsd-power-manager.c
index 3e934512..5d1fe38d 100644
--- a/plugins/power/gsd-power-manager.c
+++ b/plugins/power/gsd-power-manager.c
@@ -136,7 +136,7 @@ typedef enum {
struct GsdPowerManagerPrivate
{
/* D-Bus */
- GDBusProxy *session;
+ GsdSessionManager *session;
guint name_id;
GDBusNodeInfo *introspection_data;
GDBusConnection *connection;
@@ -1794,7 +1794,7 @@ gnome_session_shutdown_cb (GObject *source_object,
static void
gnome_session_shutdown (GsdPowerManager *manager)
{
- g_dbus_proxy_call (manager->priv->session,
+ g_dbus_proxy_call (G_DBUS_PROXY (manager->priv->session),
"Shutdown",
NULL,
G_DBUS_CALL_FLAGS_NONE,
@@ -1826,7 +1826,7 @@ static void
gnome_session_logout (GsdPowerManager *manager,
guint logout_mode)
{
- g_dbus_proxy_call (manager->priv->session,
+ g_dbus_proxy_call (G_DBUS_PROXY (manager->priv->session),
"Logout",
g_variant_new ("(u)", logout_mode),
G_DBUS_CALL_FLAGS_NONE,
@@ -2349,7 +2349,7 @@ is_session_active (GsdPowerManager *manager)
GVariant *variant;
gboolean is_session_active = FALSE;
- variant = g_dbus_proxy_get_cached_property (manager->priv->session,
+ variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (manager->priv->session),
"SessionIsActive");
if (variant) {
is_session_active = g_variant_get_boolean (variant);
@@ -2512,7 +2512,7 @@ idle_is_session_inhibited (GsdPowerManager *manager,
if (manager->priv->session == NULL)
return FALSE;
- variant = g_dbus_proxy_get_cached_property (manager->priv->session,
+ variant = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (manager->priv->session),
"InhibitedActions");
if (!variant)
return FALSE;
diff --git a/plugins/screensaver-proxy/gsd-screensaver-proxy-manager.c b/plugins/screensaver-proxy/gsd-screensaver-proxy-manager.c
index d1e1ffc6..3532cb49 100644
--- a/plugins/screensaver-proxy/gsd-screensaver-proxy-manager.c
+++ b/plugins/screensaver-proxy/gsd-screensaver-proxy-manager.c
@@ -92,7 +92,7 @@ static const gchar introspection_xml[] =
struct GsdScreensaverProxyManagerPrivate
{
- GDBusProxy *session;
+ GsdSessionManager *session;
GDBusConnection *connection;
GCancellable *bus_cancellable;
GDBusNodeInfo *introspection_data;
@@ -126,7 +126,7 @@ name_vanished_cb (GDBusConnection *connection,
if (g_strcmp0 (sender, name) == 0) {
guint cookie = GPOINTER_TO_UINT (cookie_ptr);
- g_dbus_proxy_call_sync (manager->priv->session,
+ g_dbus_proxy_call_sync (G_DBUS_PROXY (manager->priv->session),
"Uninhibit",
g_variant_new ("(u)", cookie),
G_DBUS_CALL_FLAGS_NONE,
@@ -170,7 +170,7 @@ handle_method_call (GDBusConnection *connection,
g_variant_get (parameters,
"(ss)", &app_id, &reason);
- ret = g_dbus_proxy_call_sync (manager->priv->session,
+ ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (G_DBUS_PROXY (manager->priv->session)),
"Inhibit",
g_variant_new ("(susu)",
app_id, 0, reason, GSM_INHIBITOR_FLAG_IDLE),
@@ -199,7 +199,7 @@ handle_method_call (GDBusConnection *connection,
guint cookie;
g_variant_get (parameters, "(u)", &cookie);
- g_dbus_proxy_call_sync (manager->priv->session,
+ g_dbus_proxy_call_sync (G_DBUS_PROXY (manager->priv->session),
"Uninhibit",
parameters,
G_DBUS_CALL_FLAGS_NONE,
diff --git a/plugins/updates/gsd-updates-manager.c b/plugins/updates/gsd-updates-manager.c
index dc60e120..32332239 100644
--- a/plugins/updates/gsd-updates-manager.c
+++ b/plugins/updates/gsd-updates-manager.c
@@ -61,7 +61,7 @@ struct GsdUpdatesManagerPrivate
PkControl *control;
PkTask *task;
guint inhibit_cookie;
- GDBusProxy *proxy_session;
+ GsdSessionManager *proxy_session;
guint update_viewer_watcher_id;
GVolumeMonitor *volume_monitor;
guint failed_get_updates_count;
@@ -972,7 +972,7 @@ session_inhibit (GsdUpdatesManager *manager)
/* TRANSLATORS: the reason why we've inhibited it */
reason = _("A transaction that cannot be interrupted is running");
- retval = g_dbus_proxy_call_sync (manager->priv->proxy_session,
+ retval = g_dbus_proxy_call_sync (G_DBUS_PROXY (manager->priv->proxy_session),
"Inhibit",
g_variant_new ("(susu)",
"gnome-settings-daemon", /* app-id */
@@ -1009,7 +1009,7 @@ session_uninhibit (GsdUpdatesManager *manager)
g_warning ("not locked");
goto out;
}
- retval = g_dbus_proxy_call_sync (manager->priv->proxy_session,
+ retval = g_dbus_proxy_call_sync (G_DBUS_PROXY (manager->priv->proxy_session),
"Uninhibit",
g_variant_new ("(u)",
manager->priv->inhibit_cookie),
diff --git a/plugins/updates/gsd-updates-refresh.c b/plugins/updates/gsd-updates-refresh.c
index ebd566f9..665543b7 100644
--- a/plugins/updates/gsd-updates-refresh.c
+++ b/plugins/updates/gsd-updates-refresh.c
@@ -64,7 +64,7 @@ struct GsdUpdatesRefreshPrivate
guint periodic_id;
UpClient *client;
GSettings *settings;
- GDBusProxy *proxy_session;
+ GsdSessionManager *proxy_session;
PkControl *control;
};
@@ -508,11 +508,11 @@ gsd_updates_refresh_init (GsdUpdatesRefresh *refresh)
refresh->priv->proxy_session =
gnome_settings_session_get_session_proxy ();
if (refresh->priv->proxy_session != NULL) {
- g_signal_connect (refresh->priv->proxy_session,
+ g_signal_connect (G_DBUS_PROXY (refresh->priv->proxy_session),
"g-signal",
G_CALLBACK (session_presence_signal_cb),
refresh);
- status = g_dbus_proxy_get_cached_property (refresh->priv->proxy_session,
+ status = g_dbus_proxy_get_cached_property (G_DBUS_PROXY (refresh->priv->proxy_session),
"status");
if (status) {
g_variant_get (status, "u", &status_code);