]> rtime.felk.cvut.cz Git - sojka/lightdm.git/blob - src/display-server.h
Use everywhere instead of UPower and ConsoleKit - lock/unlock/suspend/hibernate....
[sojka/lightdm.git] / src / display-server.h
1 /*
2  * Copyright (C) 2010-2011 Robert Ancell.
3  * Author: Robert Ancell <robert.ancell@canonical.com>
4  * 
5  * This program is free software: you can redistribute it and/or modify it under
6  * the terms of the GNU General Public License as published by the Free Software
7  * Foundation, either version 3 of the License, or (at your option) any later
8  * version. See http://www.gnu.org/copyleft/gpl.html the full text of the
9  * license.
10  */
11
12 #ifndef DISPLAY_SERVER_H_
13 #define DISPLAY_SERVER_H_
14
15 #include <glib-object.h>
16
17 G_BEGIN_DECLS
18
19 #define DISPLAY_SERVER_TYPE (display_server_get_type())
20 #define DISPLAY_SERVER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DISPLAY_SERVER_TYPE, DisplayServer))
21 #define DISPLAY_SERVER_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST ((klass), DISPLAY_SERVER_TYPE, DisplayServerClass))
22 #define DISPLAY_SERVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DISPLAY_SERVER_TYPE, DisplayServerClass))
23
24 typedef struct DisplayServerPrivate DisplayServerPrivate;
25
26 typedef struct
27 {
28     GObject               parent_instance;
29     DisplayServerPrivate *priv;
30 } DisplayServer;
31
32 typedef struct
33 {
34     GObjectClass parent_class;
35
36     void (*ready)(DisplayServer *server);
37     void (*stopped)(DisplayServer *server);
38
39     gboolean (*start)(DisplayServer *server);
40     void (*stop)(DisplayServer *server);
41 } DisplayServerClass;
42
43 GType display_server_get_type (void);
44
45 void display_server_set_name (DisplayServer *server, const gchar *name);
46
47 const gchar *display_server_get_name (DisplayServer *server);
48
49 void display_server_set_start_local_sessions (DisplayServer *server, gboolean start_local_sessions);
50
51 gboolean display_server_get_start_local_sessions (DisplayServer *server);
52
53 gboolean display_server_start (DisplayServer *server);
54
55 void display_server_stop (DisplayServer *server);
56
57 gboolean display_server_get_is_stopped (DisplayServer *server);
58
59 G_END_DECLS
60
61 #endif /* DISPLAY_SERVER_H_ */