gnome-session r4875 - in branches/dbus_based: . gnome-session
- From: mccann svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-session r4875 - in branches/dbus_based: . gnome-session
- Date: Tue, 29 Jul 2008 16:43:34 +0000 (UTC)
Author: mccann
Date: Tue Jul 29 16:43:34 2008
New Revision: 4875
URL: http://svn.gnome.org/viewvc/gnome-session?rev=4875&view=rev
Log:
2008-07-29 William Jon McCann <jmccann redhat com>
* gnome-session/gsm-client.c (gsm_client_set_status),
(gsm_client_set_property), (gsm_client_get_property),
(gsm_client_class_init), (gsm_client_peek_status),
(gsm_client_get_status):
* gnome-session/gsm-client.h:
* gnome-session/gsm-client.xml:
* gnome-session/gsm-inhibitor.xml:
Make status uint. Add some more exported methods to Client.
Modified:
branches/dbus_based/ChangeLog
branches/dbus_based/gnome-session/gsm-client.c
branches/dbus_based/gnome-session/gsm-client.h
branches/dbus_based/gnome-session/gsm-client.xml
branches/dbus_based/gnome-session/gsm-inhibitor.xml
Modified: branches/dbus_based/gnome-session/gsm-client.c
==============================================================================
--- branches/dbus_based/gnome-session/gsm-client.c (original)
+++ branches/dbus_based/gnome-session/gsm-client.c Tue Jul 29 16:43:34 2008
@@ -36,7 +36,7 @@
char *id;
char *startup_id;
char *app_id;
- int status;
+ guint status;
DBusGConnection *connection;
};
@@ -140,7 +140,7 @@
void
gsm_client_set_status (GsmClient *client,
- int status)
+ guint status)
{
g_return_if_fail (GSM_IS_CLIENT (client));
if (client->priv->status != status) {
@@ -191,7 +191,7 @@
gsm_client_set_app_id (self, g_value_get_string (value));
break;
case PROP_STATUS:
- gsm_client_set_status (self, g_value_get_int (value));
+ gsm_client_set_status (self, g_value_get_uint (value));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -217,7 +217,7 @@
g_value_set_string (value, self->priv->app_id);
break;
case PROP_STATUS:
- g_value_set_int (value, self->priv->status);
+ g_value_set_uint (value, self->priv->status);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -283,13 +283,13 @@
G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
g_object_class_install_property (object_class,
PROP_STATUS,
- g_param_spec_int ("status",
- "status",
- "status",
- -1,
- G_MAXINT,
- GSM_CLIENT_UNREGISTERED,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+ g_param_spec_uint ("status",
+ "status",
+ "status",
+ -1,
+ G_MAXINT,
+ GSM_CLIENT_UNREGISTERED,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
g_type_class_add_private (klass, sizeof (GsmClientPrivate));
@@ -321,6 +321,14 @@
}
guint
+gsm_client_peek_status (GsmClient *client)
+{
+ g_return_val_if_fail (GSM_IS_CLIENT (client), GSM_CLIENT_UNREGISTERED);
+
+ return client->priv->status;
+}
+
+guint
gsm_client_peek_restart_style_hint (GsmClient *client)
{
g_return_val_if_fail (GSM_IS_CLIENT (client), GSM_CLIENT_RESTART_NEVER);
@@ -328,7 +336,6 @@
return GSM_CLIENT_GET_CLASS (client)->impl_get_restart_style_hint (client);
}
-
gboolean
gsm_client_get_startup_id (GsmClient *client,
char **id,
@@ -365,6 +372,18 @@
return TRUE;
}
+gboolean
+gsm_client_get_status (GsmClient *client,
+ guint *status,
+ GError **error)
+{
+ g_return_val_if_fail (GSM_IS_CLIENT (client), GSM_CLIENT_RESTART_NEVER);
+
+ *status = client->priv->status;
+
+ return TRUE;
+}
+
char *
gsm_client_get_app_name (GsmClient *client)
{
Modified: branches/dbus_based/gnome-session/gsm-client.h
==============================================================================
--- branches/dbus_based/gnome-session/gsm-client.h (original)
+++ branches/dbus_based/gnome-session/gsm-client.h Tue Jul 29 16:43:34 2008
@@ -85,7 +85,7 @@
GError **error);
};
-GType gsm_client_get_type (void) G_GNUC_CONST;
+GType gsm_client_get_type (void) G_GNUC_CONST;
const char *gsm_client_peek_id (GsmClient *client);
@@ -100,7 +100,7 @@
void gsm_client_set_app_id (GsmClient *client,
const char *app_id);
void gsm_client_set_status (GsmClient *client,
- int status);
+ guint status);
void gsm_client_end_session (GsmClient *client,
guint flags);
Modified: branches/dbus_based/gnome-session/gsm-client.xml
==============================================================================
--- branches/dbus_based/gnome-session/gsm-client.xml (original)
+++ branches/dbus_based/gnome-session/gsm-client.xml Tue Jul 29 16:43:34 2008
@@ -2,6 +2,55 @@
<!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.Client">
+ <method name="GetAppId">
+ <arg type="s" name="app_id" direction="out">
+ <doc:doc>
+ <doc:summary>The identifier for the associated application</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description>
+ <doc:para>Return the application ID associated with this client.</doc:para>
+ </doc:description>
+ </doc:doc>
+ </method>
+ <method name="GetStartupId">
+ <arg type="s" name="startup_id" direction="out">
+ <doc:doc>
+ <doc:summary>The startup identifier</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description>
+ <doc:para>Return the startup ID associated with this client.</doc:para>
+ </doc:description>
+ </doc:doc>
+ </method>
+ <method name="GetRestartStyleHint">
+ <arg type="u" name="hint" direction="out">
+ <doc:doc>
+ <doc:summary>The restart style hint</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description>
+ <doc:para>Return the restart style hint for this client.</doc:para>
+ </doc:description>
+ </doc:doc>
+ </method>
+ <method name="GetStatus">
+ <arg type="u" name="status" direction="out">
+ <doc:doc>
+ <doc:summary>The client status</doc:summary>
+ </doc:doc>
+ </arg>
+ <doc:doc>
+ <doc:description>
+ <doc:para>Return the status of this client.</doc:para>
+ </doc:description>
+ </doc:doc>
+ </method>
+
<property name="app-id" type="s" access="read">
<doc:doc>
<doc:description>
@@ -16,5 +65,19 @@
</doc:description>
</doc:doc>
</property>
+ <property name="restart-style-hint" type="u" access="read">
+ <doc:doc>
+ <doc:description>
+ <doc:para>The restart style hint for the client</doc:para>
+ </doc:description>
+ </doc:doc>
+ </property>
+ <property name="status" type="u" access="read">
+ <doc:doc>
+ <doc:description>
+ <doc:para>The status of the client</doc:para>
+ </doc:description>
+ </doc:doc>
+ </property>
</interface>
</node>
Modified: branches/dbus_based/gnome-session/gsm-inhibitor.xml
==============================================================================
--- branches/dbus_based/gnome-session/gsm-inhibitor.xml (original)
+++ branches/dbus_based/gnome-session/gsm-inhibitor.xml Tue Jul 29 16:43:34 2008
@@ -70,7 +70,7 @@
</doc:description>
</doc:doc>
</property>
- <property name="client-id" type="s" access="read">
+ <property name="client-id" type="o" access="read">
<doc:doc>
<doc:description>
<doc:para>The session management client object path associated with the inhibit.</doc:para>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]