aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCody Russell <crussell@canonical.com>2009-09-23 18:00:35 -0500
committerCody Russell <crussell@canonical.com>2009-09-23 18:00:35 -0500
commit8888a1aa1b4ca13be5028561f4b0adf21d392719 (patch)
tree97727c1998f26c7389ad585899ddf06ca9000b2a /src
parent9a6f594c7f63158a7b93adff62b1f9c62aed967f (diff)
downloadayatana-indicator-session-8888a1aa1b4ca13be5028561f4b0adf21d392719.tar.gz
ayatana-indicator-session-8888a1aa1b4ca13be5028561f4b0adf21d392719.tar.bz2
ayatana-indicator-session-8888a1aa1b4ca13be5028561f4b0adf21d392719.zip
move stuff around
Diffstat (limited to 'src')
-rw-r--r--src/users-service-dbus.c166
-rw-r--r--src/users-service.c42
2 files changed, 104 insertions, 104 deletions
diff --git a/src/users-service-dbus.c b/src/users-service-dbus.c
index 15da3d2..fac689d 100644
--- a/src/users-service-dbus.c
+++ b/src/users-service-dbus.c
@@ -883,22 +883,6 @@ users_loaded (DBusGProxy *proxy,
}
}
-gint
-users_service_dbus_get_user_count (UsersServiceDbus *self)
-{
- UsersServiceDbusPrivate *priv = USERS_SERVICE_DBUS_GET_PRIVATE (self);
-
- return priv->count;
-}
-
-GList *
-users_service_dbus_get_user_list (UsersServiceDbus *self)
-{
- UsersServiceDbusPrivate *priv = USERS_SERVICE_DBUS_GET_PRIVATE (self);
-
- return g_hash_table_get_values (priv->users);
-}
-
static gboolean
session_is_login_window (UsersServiceDbus *self,
const char *ssid)
@@ -1085,73 +1069,6 @@ start_new_user_session (UsersServiceDbus *self,
return TRUE;
}
-gboolean
-users_service_dbus_activate_user_session (UsersServiceDbus *self,
- UserData *user)
-{
- UsersServiceDbusPrivate *priv = USERS_SERVICE_DBUS_GET_PRIVATE (self);
- DBusMessage *message = NULL;
- DBusMessage *reply = NULL;
- DBusError error;
- gchar *ssid;
-
- dbus_error_init (&error);
-
- if (!priv->seat)
- priv->seat = get_seat (self);
-
- ssid = get_session_for_user (self, user);
-
- if (!ssid)
- {
- return start_new_user_session (self, user);
- }
-
- if (!(message = dbus_message_new_method_call ("org.freedesktop.ConsoleKit",
- priv->seat,
- "org.freedesktop.ConsoleKit.Seat",
- "ActivateSession")))
- {
- g_warning ("failed to create new message");
- return FALSE;
- }
-
- if (!dbus_message_append_args (message,
- DBUS_TYPE_OBJECT_PATH,
- &ssid,
- DBUS_TYPE_INVALID))
- {
- g_warning ("failed to append args");
- return FALSE;
- }
-
- if (!(reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (priv->system_bus),
- message,
- -1,
- &error)))
- {
- if (dbus_error_is_set (&error))
- {
- g_warning ("Failed to send message: %s", error.message);
- dbus_error_free (&error);
-
- return FALSE;
- }
- }
-
- if (message)
- {
- dbus_message_unref (message);
- }
-
- if (reply)
- {
- dbus_message_unref (reply);
- }
-
- return TRUE;
-}
-
static void
user_added (DBusGProxy *proxy,
guint uid,
@@ -1279,3 +1196,86 @@ _users_service_server_get_users_info (UsersServiceDbus *service,
{
return TRUE;
}
+
+gint
+users_service_dbus_get_user_count (UsersServiceDbus *self)
+{
+ UsersServiceDbusPrivate *priv = USERS_SERVICE_DBUS_GET_PRIVATE (self);
+
+ return priv->count;
+}
+
+GList *
+users_service_dbus_get_user_list (UsersServiceDbus *self)
+{
+ UsersServiceDbusPrivate *priv = USERS_SERVICE_DBUS_GET_PRIVATE (self);
+
+ return g_hash_table_get_values (priv->users);
+}
+
+gboolean
+users_service_dbus_activate_user_session (UsersServiceDbus *self,
+ UserData *user)
+{
+ UsersServiceDbusPrivate *priv = USERS_SERVICE_DBUS_GET_PRIVATE (self);
+ DBusMessage *message = NULL;
+ DBusMessage *reply = NULL;
+ DBusError error;
+ gchar *ssid;
+
+ dbus_error_init (&error);
+
+ if (!priv->seat)
+ priv->seat = get_seat (self);
+
+ ssid = get_session_for_user (self, user);
+
+ if (!ssid)
+ {
+ return start_new_user_session (self, user);
+ }
+
+ if (!(message = dbus_message_new_method_call ("org.freedesktop.ConsoleKit",
+ priv->seat,
+ "org.freedesktop.ConsoleKit.Seat",
+ "ActivateSession")))
+ {
+ g_warning ("failed to create new message");
+ return FALSE;
+ }
+
+ if (!dbus_message_append_args (message,
+ DBUS_TYPE_OBJECT_PATH,
+ &ssid,
+ DBUS_TYPE_INVALID))
+ {
+ g_warning ("failed to append args");
+ return FALSE;
+ }
+
+ if (!(reply = dbus_connection_send_with_reply_and_block (dbus_g_connection_get_connection (priv->system_bus),
+ message,
+ -1,
+ &error)))
+ {
+ if (dbus_error_is_set (&error))
+ {
+ g_warning ("Failed to send message: %s", error.message);
+ dbus_error_free (&error);
+
+ return FALSE;
+ }
+ }
+
+ if (message)
+ {
+ dbus_message_unref (message);
+ }
+
+ if (reply)
+ {
+ dbus_message_unref (reply);
+ }
+
+ return TRUE;
+}
diff --git a/src/users-service.c b/src/users-service.c
index 9fd123f..9884a56 100644
--- a/src/users-service.c
+++ b/src/users-service.c
@@ -1,25 +1,25 @@
/*
-A small wrapper utility to load indicators and put them as menu items
-into the gnome-panel using it's applet interface.
-
-Copyright 2009 Canonical Ltd.
-
-Authors:
- Ted Gould <ted@canonical.com>
- Cody Russell <crussell@canonical.com>
-
-This program is free software: you can redistribute it and/or modify it
-under the terms of the GNU General Public License version 3, as published
-by the Free Software Foundation.
-
-This program is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranties of
-MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
-PURPOSE. See the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along
-with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
+ * A small wrapper utility to load indicators and put them as menu items
+ * into the gnome-panel using it's applet interface.
+ *
+ * Copyright 2009 Canonical Ltd.
+ *
+ * Authors:
+ * Ted Gould <ted@canonical.com>
+ * Cody Russell <crussell@canonical.com>
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 3, as published
+ * by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranties of
+ * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
+ * PURPOSE. See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ *with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#include <config.h>