Hide IdleServerConnectionState
Will Thompson
11 years ago
51 | 51 |
PROP_TLS_MANAGER
|
52 | 52 |
};
|
53 | 53 |
|
|
54 |
typedef enum {
|
|
55 |
SERVER_CONNECTION_STATE_NOT_CONNECTED,
|
|
56 |
SERVER_CONNECTION_STATE_CONNECTING,
|
|
57 |
SERVER_CONNECTION_STATE_CONNECTED
|
|
58 |
} IdleServerConnectionState;
|
|
59 |
|
54 | 60 |
struct _IdleServerConnectionPrivate {
|
55 | 61 |
gchar *host;
|
56 | 62 |
guint16 port;
|
|
598 | 604 |
return !g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT(result), error);
|
599 | 605 |
}
|
600 | 606 |
|
601 | |
IdleServerConnectionState idle_server_connection_get_state(IdleServerConnection *conn) {
|
602 | |
IdleServerConnectionPrivate *priv = IDLE_SERVER_CONNECTION_GET_PRIVATE(conn);
|
603 | |
return priv->state;
|
|
607 |
gboolean idle_server_connection_is_connected(IdleServerConnection *conn) {
|
|
608 |
IdleServerConnectionPrivate *priv = IDLE_SERVER_CONNECTION_GET_PRIVATE(conn);
|
|
609 |
|
|
610 |
return priv->state == SERVER_CONNECTION_STATE_CONNECTED;
|
604 | 611 |
}
|
605 | 612 |
|
606 | 613 |
void idle_server_connection_set_tls(IdleServerConnection *conn, gboolean tls) {
|
28 | 28 |
|
29 | 29 |
typedef struct _IdleServerConnection IdleServerConnection;
|
30 | 30 |
typedef struct _IdleServerConnectionClass IdleServerConnectionClass;
|
31 | |
|
32 | |
typedef enum {
|
33 | |
SERVER_CONNECTION_STATE_NOT_CONNECTED,
|
34 | |
SERVER_CONNECTION_STATE_CONNECTING,
|
35 | |
SERVER_CONNECTION_STATE_CONNECTED
|
36 | |
} IdleServerConnectionState;
|
37 | 31 |
|
38 | 32 |
typedef enum {
|
39 | 33 |
SERVER_CONNECTION_STATE_REASON_ERROR,
|
|
76 | 70 |
gboolean idle_server_connection_disconnect_finish(IdleServerConnection *conn, GAsyncResult *result, GError **error);
|
77 | 71 |
void idle_server_connection_send_async(IdleServerConnection *conn, const gchar *cmd, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data);
|
78 | 72 |
gboolean idle_server_connection_send_finish(IdleServerConnection *conn, GAsyncResult *result, GError **error);
|
79 | |
IdleServerConnectionState idle_server_connection_get_state(IdleServerConnection *conn);
|
|
73 |
gboolean idle_server_connection_is_connected(IdleServerConnection *conn);
|
80 | 74 |
void idle_server_connection_set_tls(IdleServerConnection *conn, gboolean tls);
|
81 | 75 |
|
82 | 76 |
G_END_DECLS
|