Back to index

indicator-session  12.10.0
users-service-dbus.h
Go to the documentation of this file.
00001 /*
00002  * Copyright 2009 Canonical Ltd.
00003  *
00004  * Authors:
00005  *     Cody Russell <crussell@canonical.com>
00006  *     Charles Kerr <charles.kerr@canonical.com>
00007  *
00008  * This program is free software: you can redistribute it and/or modify it
00009  * under the terms of the GNU General Public License version 3, as published
00010  * by the Free Software Foundation.
00011  *
00012  * This program is distributed in the hope that it will be useful, but
00013  * WITHOUT ANY WARRANTY; without even the implied warranties of
00014  * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
00015  * PURPOSE.  See the GNU General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU General Public License along
00018  * with this program.  If not, see <http://www.gnu.org/licenses/>.
00019  */
00020 
00021 #ifndef __USERS_SERVICE_DBUS_H__
00022 #define __USERS_SERVICE_DBUS_H__
00023 
00024 #include <glib.h>
00025 #include <glib-object.h>
00026 
00027 #include "dbus-user.h" /* for AccountsUser */
00028 
00029 G_BEGIN_DECLS
00030 
00031 #define USERS_SERVICE_DBUS_TYPE  (users_service_dbus_get_type ())
00032 #define USERS_SERVICE_DBUS(o)    (G_TYPE_CHECK_INSTANCE_CAST ((o), USERS_SERVICE_DBUS_TYPE, UsersServiceDbus))
00033 #define IS_USERS_SERVICE_DBUS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), USERS_SERVICE_DBUS_TYPE))
00034 
00035 typedef struct _UsersServiceDbus        UsersServiceDbus;
00036 typedef struct _UsersServiceDbusClass   UsersServiceDbusClass;
00037 typedef struct _UsersServiceDbusPrivate UsersServiceDbusPrivate;
00038 
00063 struct _UsersServiceDbus
00064 {
00065   /*< private >*/
00066   GObject parent;
00067   UsersServiceDbusPrivate * priv;
00068 };
00069 
00070 struct _UsersServiceDbusClass
00071 {
00072   GObjectClass parent_class;
00073 
00074   /* Signals */
00075   void (* user_list_changed)       (UsersServiceDbus*, gpointer);
00076   void (* user_logged_in_changed)  (UsersServiceDbus*, AccountsUser*, gpointer);
00077   void (* guest_logged_in_changed) (UsersServiceDbus*, gpointer);
00078 };
00079 
00080 GType     users_service_dbus_get_type               (void) G_GNUC_CONST;
00081 
00082 GList   * users_service_dbus_get_user_list          (UsersServiceDbus * self);
00083 
00084 gboolean  users_service_dbus_is_guest_logged_in     (UsersServiceDbus * self);
00085 gboolean  users_service_dbus_is_user_logged_in      (UsersServiceDbus * self,
00086                                                      AccountsUser     * user);
00087 
00088 void      users_service_dbus_show_greeter           (UsersServiceDbus * self);
00089 gboolean  users_service_dbus_guest_session_enabled  (UsersServiceDbus * self);
00090 gboolean  users_service_dbus_can_activate_session   (UsersServiceDbus * self);
00091 void      users_service_dbus_activate_guest_session (UsersServiceDbus * self);
00092 void      users_service_dbus_activate_user_session  (UsersServiceDbus * self,
00093                                                      AccountsUser     * user);
00094 
00095 G_END_DECLS
00096 
00097 #endif