1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
|
#ifndef XDMCP_CLIENT_H_
#define XDMCP_CLIENT_H_
#include <glib-object.h>
#include <gio/gio.h>
#define XDMCP_VERSION 1
#define XDMCP_PORT 177
#define XDMCP_CLIENT_SIGNAL_WILLING "willing"
#define XDMCP_CLIENT_SIGNAL_UNWILLING "unwilling"
#define XDMCP_CLIENT_SIGNAL_ACCEPT "accept"
#define XDMCP_CLIENT_SIGNAL_DECLINE "decline"
#define XDMCP_CLIENT_SIGNAL_FAILED "failed"
typedef struct
{
gchar *authentication_name;
gchar *hostname;
gchar *status;
} XDMCPWilling;
typedef struct
{
gchar *hostname;
gchar *status;
} XDMCPUnwilling;
typedef struct
{
guint32 session_id;
gchar *authentication_name;
guint16 authentication_data_length;
guint8 *authentication_data;
gchar *authorization_name;
guint16 authorization_data_length;
guint8 *authorization_data;
} XDMCPAccept;
typedef struct
{
gchar *status;
gchar *authentication_name;
guint16 authentication_data_length;
guint8 *authentication_data;
} XDMCPDecline;
typedef struct
{
guint32 session_id;
gchar *status;
} XDMCPFailed;
typedef struct XDMCPClientPrivate XDMCPClientPrivate;
typedef struct
{
GObject parent_instance;
XDMCPClientPrivate *priv;
} XDMCPClient;
typedef struct
{
GObjectClass parent_class;
void (*willing)(XDMCPClient *client, XDMCPWilling *message);
void (*unwilling)(XDMCPClient *client, XDMCPUnwilling *message);
void (*accept)(XDMCPClient *client, XDMCPAccept *message);
void (*decline)(XDMCPClient *client, XDMCPDecline *message);
void (*failed)(XDMCPClient *client, XDMCPFailed *message);
} XDMCPClientClass;
GType xdmcp_client_get_type (void);
XDMCPClient *xdmcp_client_new (void);
void xdmcp_client_set_hostname (XDMCPClient *client, const gchar *hostname);
void xdmcp_client_set_port (XDMCPClient *client, guint16 port);
gboolean xdmcp_client_start (XDMCPClient *client);
GInetAddress *xdmcp_client_get_local_address (XDMCPClient *client);
void xdmcp_client_send_query (XDMCPClient *client, gchar **authentication_names);
void xdmcp_client_send_broadcast_query (XDMCPClient *client, gchar **authentication_names);
void xdmcp_client_send_indirect_query (XDMCPClient *client, gchar **authentication_names);
void xdmcp_client_send_request (XDMCPClient *client,
guint16 display_number,
GInetAddress **addresses,
const gchar *authentication_name,
const guint8 *authentication_data, guint16 authentication_data_length,
gchar **authorization_names, const gchar *mfid);
void xdmcp_client_send_manage (XDMCPClient *client, guint32 session_id, guint16 display_number, const gchar *display_class);
G_END_DECLS
#endif /* XDMCP_CLIENT_H_ */
|