]> rtime.felk.cvut.cz Git - sojka/lightdm.git/blob - liblightdm-gobject/lightdm/session.h
Revert r2392 - it seems to have broken ABI in liblightdm-gobject
[sojka/lightdm.git] / liblightdm-gobject / lightdm / session.h
1 /*
2  * Copyright (C) 2010 Robert Ancell.
3  * Author: Robert Ancell <robert.ancell@canonical.com>
4  *
5  * This library is free software; you can redistribute it and/or modify it under
6  * the terms of the GNU Lesser General Public License as published by the Free
7  * Software Foundation; either version 2 or version 3 of the License.
8  * See http://www.gnu.org/copyleft/lgpl.html the full text of the license.
9  */
10
11 #ifndef LIGHTDM_SESSION_H_
12 #define LIGHTDM_SESSION_H_
13
14 #include <glib-object.h>
15
16 G_BEGIN_DECLS
17
18 #define LIGHTDM_TYPE_SESSION            (lightdm_session_get_type())
19 #define LIGHTDM_SESSION(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIGHTDM_TYPE_SESSION, LightDMSession));
20 #define LIGHTDM_SESSION_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), LIGHTDM_TYPE_SESSION, LightDMSessionClass))
21 #define LIGHTDM_IS_SESSION(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIGHTDM_TYPE_SESSION))
22 #define LIGHTDM_IS_SESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIGHTDM_TYPE_SESSION))
23 #define LIGHTDM_SESSION_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), LIGHTDM_TYPE_SESSION, LightDMSessionClass))
24
25 typedef struct
26 {
27     GObject parent_instance;
28 } LightDMSession;
29
30 typedef struct
31 {
32     GObjectClass parent_class;
33
34     /* Reserved */
35     void (*reserved1) (void);
36     void (*reserved2) (void);
37     void (*reserved3) (void);
38     void (*reserved4) (void);
39     void (*reserved5) (void);
40     void (*reserved6) (void);
41 } LightDMSessionClass;
42
43 #ifdef GLIB_VERSION_2_44
44 typedef LightDMSession *LightDMSession_autoptr;
45 static inline void glib_autoptr_cleanup_LightDMSession (LightDMSession **_ptr)
46 {
47     glib_autoptr_cleanup_GObject ((GObject **) _ptr);
48 }
49 #endif
50
51 GType lightdm_session_get_type (void);
52
53 GList *lightdm_get_sessions (void);
54
55 GList *lightdm_get_remote_sessions (void);
56
57 const gchar *lightdm_session_get_key (LightDMSession *session);
58
59 const gchar *lightdm_session_get_session_type (LightDMSession *session);
60
61 const gchar *lightdm_session_get_name (LightDMSession *session);
62
63 const gchar *lightdm_session_get_comment (LightDMSession *session);
64
65 G_END_DECLS
66
67 #endif /* LIGHTDM_SESSION_H_ */