]> rtime.felk.cvut.cz Git - sojka/lightdm.git/blob - src/x-server.h
Don't quit on SIGUSR1, SIGUSR2 or SIGHUP
[sojka/lightdm.git] / src / x-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 X_SERVER_H_
13 #define X_SERVER_H_
14
15 #include <glib-object.h>
16 #include "display-server.h"
17 #include "x-authority.h"
18
19 G_BEGIN_DECLS
20
21 #define X_SERVER_TYPE (x_server_get_type())
22 #define X_SERVER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), X_SERVER_TYPE, XServer))
23 #define X_SERVER_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST ((klass), X_SERVER_TYPE, XServerClass))
24 #define X_SERVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), X_SERVER_TYPE, XServerClass))
25 #define IS_X_SERVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), X_SERVER_TYPE))
26
27 typedef struct XServerPrivate XServerPrivate;
28
29 typedef struct
30 {
31     DisplayServer   parent_instance;
32     XServerPrivate *priv;
33 } XServer;
34
35 typedef struct
36 {
37     DisplayServerClass parent_class;
38 } XServerClass;
39
40 GType x_server_get_type (void);
41
42 void x_server_set_hostname (XServer *server, const gchar *hostname);
43
44 gchar *x_server_get_hostname (XServer *server);
45
46 void x_server_set_display_number (XServer *server, guint number);
47
48 guint x_server_get_display_number (XServer *server);
49
50 const gchar *x_server_get_address (XServer *server);
51
52 const gchar *x_server_get_authentication_name (XServer *server);
53
54 const guint8 *x_server_get_authentication_data (XServer *server);
55
56 gsize x_server_get_authentication_data_length (XServer *server);
57
58 void x_server_set_authority (XServer *server, XAuthority *authority);
59
60 XAuthority *x_server_get_authority (XServer *server);
61
62 G_END_DECLS
63
64 #endif /* X_SERVER_H_ */