]> rtime.felk.cvut.cz Git - sojka/lightdm.git/blob - src/x-server.h
Releasing 1.20.0
[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     guint (*get_display_number) (XServer *server);
39 } XServerClass;
40
41 GType x_server_get_type (void);
42
43 void x_server_set_hostname (XServer *server, const gchar *hostname);
44
45 gchar *x_server_get_hostname (XServer *server);
46
47 guint x_server_get_display_number (XServer *server);
48
49 const gchar *x_server_get_address (XServer *server);
50
51 const gchar *x_server_get_authentication_name (XServer *server);
52
53 const guint8 *x_server_get_authentication_data (XServer *server);
54
55 gsize x_server_get_authentication_data_length (XServer *server);
56
57 void x_server_set_authority (XServer *server, XAuthority *authority);
58
59 XAuthority *x_server_get_authority (XServer *server);
60
61 G_END_DECLS
62
63 #endif /* X_SERVER_H_ */