2
* Copyright 2013 Canonical Ltd.
5
* Charles Kerr <charles.kerr@canonical.com>
7
* This program is free software: you can redistribute it and/or modify it
8
* under the terms of the GNU General Public License version 3, as published
9
* by the Free Software Foundation.
11
* This program is distributed in the hope that it will be useful, but
12
* WITHOUT ANY WARRANTY; without even the implied warranties of
13
* MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
14
* PURPOSE. See the GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License along
17
* with this program. If not, see <http://www.gnu.org/licenses/>.
24
#include <glib-object.h>
28
#define INDICATOR_TYPE_SESSION_GUEST (indicator_session_guest_get_type())
29
#define INDICATOR_SESSION_GUEST(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), INDICATOR_TYPE_SESSION_GUEST, IndicatorSessionGuest))
30
#define INDICATOR_SESSION_GUEST_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), INDICATOR_TYPE_SESSION_GUEST, IndicatorSessionGuestClass))
31
#define INDICATOR_SESSION_GUEST_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), INDICATOR_TYPE_SESSION_GUEST, IndicatorSessionGuestClass))
32
#define INDICATOR_IS_SESSION_GUEST(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), INDICATOR_TYPE_SESSION_GUEST))
34
typedef struct _IndicatorSessionGuest IndicatorSessionGuest;
35
typedef struct _IndicatorSessionGuestClass IndicatorSessionGuestClass;
37
GType indicator_session_guest_get_type (void);
40
* A base class for getting state information about the system's guest user.
41
* Use backend.h's get_backend() to get an instance.
43
struct _IndicatorSessionGuest
50
#define INDICATOR_SESSION_GUEST_PROPERTY_ALLOWED "guest-is-allowed"
51
#define INDICATOR_SESSION_GUEST_PROPERTY_LOGGED_IN "guest-is-logged-in"
52
#define INDICATOR_SESSION_GUEST_PROPERTY_ACTIVE "guest-is-active-session"
54
struct _IndicatorSessionGuestClass
56
GObjectClass parent_class;
58
/* virtual functions */
59
gboolean (* is_allowed) (IndicatorSessionGuest * self);
60
gboolean (* is_logged_in) (IndicatorSessionGuest * self);
61
gboolean (* is_active) (IndicatorSessionGuest * self);
62
void (* switch_to_guest) (IndicatorSessionGuest * self);
65
gboolean indicator_session_guest_is_allowed (IndicatorSessionGuest * self);
66
gboolean indicator_session_guest_is_logged_in (IndicatorSessionGuest * self);
67
gboolean indicator_session_guest_is_active (IndicatorSessionGuest * self);
69
void indicator_session_guest_switch_to_guest (IndicatorSessionGuest * self);
72
* Emit 'notify' signals for the corresponding properties.
73
* These functions should only be called by IndicatorSessionGuest implementations.
75
void indicator_session_guest_notify_allowed (IndicatorSessionGuest * self);
76
void indicator_session_guest_notify_logged_in (IndicatorSessionGuest * self);
77
void indicator_session_guest_notify_active (IndicatorSessionGuest * self);