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
25 {
26     GObject parent_instance;
27 } VNCServer;
28 
29 typedef struct
30 {
31     GObjectClass parent_class;
32 
33     gboolean (*new_connection)(VNCServer *server, GSocket *socket);
34 } VNCServerClass;
35 
36 GType vnc_server_get_type (void);
37 
38 VNCServer *vnc_server_new (void);
39 
40 void vnc_server_set_port (VNCServer *server, guint port);
41 
42 guint vnc_server_get_port (VNCServer *server);
43 
44 void vnc_server_set_listen_address (VNCServer *server, const gchar *listen_address);
45 
46 const gchar *vnc_server_get_listen_address (VNCServer *server);
47 
48 gboolean vnc_server_start (VNCServer *server);
49 
50 G_END_DECLS
51 
52 #endif /* VNC_SERVER_H_ */
53