]> rtime.felk.cvut.cz Git - sojka/lightdm.git/blob - src/vnc-server.h
Load all users only when really needed
[sojka/lightdm.git] / src / vnc-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 VNC_SERVER_H_
13 #define VNC_SERVER_H_
14
15 #include <glib-object.h>
16
17 G_BEGIN_DECLS
18
19 #define VNC_SERVER_TYPE (vnc_server_get_type())
20 #define VNC_SERVER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VNC_SERVER_TYPE, VNCServer));
21
22 #define VNC_SERVER_SIGNAL_NEW_CONNECTION "new-connection"
23
24 typedef struct VNCServerPrivate VNCServerPrivate;
25
26 typedef struct
27 {
28     GObject         parent_instance;
29     VNCServerPrivate *priv;
30 } VNCServer;
31
32 typedef struct
33 {
34     GObjectClass parent_class;
35
36     gboolean (*new_connection)(VNCServer *server, GSocket *socket);
37 } VNCServerClass;
38
39 GType vnc_server_get_type (void);
40
41 VNCServer *vnc_server_new (void);
42
43 void vnc_server_set_port (VNCServer *server, guint port);
44
45 guint vnc_server_get_port (VNCServer *server);
46
47 void vnc_server_set_listen_address (VNCServer *server, const gchar *listen_address);
48
49 const gchar *vnc_server_get_listen_address (VNCServer *server);
50
51 gboolean vnc_server_start (VNCServer *server);
52
53 G_END_DECLS
54
55 #endif /* VNC_SERVER_H_ */