summaryrefslogtreecommitdiff
path: root/src/idle-server-connection.h
diff options
context:
space:
mode:
authorDebarshi Ray <rishi@gnu.org>2011-08-10 10:33:44 +0200
committerDebarshi Ray <rishi@gnu.org>2011-09-29 08:45:54 +0300
commit211cd6aba3a87b3e20d2782c73e5bd5cd54e3359 (patch)
treeb890204a127e0f98cd3b8a229bd8bb3442d325d8 /src/idle-server-connection.h
parent973d2c173af909fa702e63c7d9fbe627512a58f4 (diff)
downloadtelepathy-idle-211cd6aba3a87b3e20d2782c73e5bd5cd54e3359.tar.gz
Get rid of IdleServerConnectionIface and IdleSSLServerConnection
Thanks to GIO IdleServerConnection can now handle both encrypted and unencrypted connections. One can use idle_server_connection_set_tls to choose among the two. Fixes: https://bugs.freedesktop.org/37145
Diffstat (limited to 'src/idle-server-connection.h')
-rw-r--r--src/idle-server-connection.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/idle-server-connection.h b/src/idle-server-connection.h
index d5124e4..9402ab9 100644
--- a/src/idle-server-connection.h
+++ b/src/idle-server-connection.h
@@ -3,6 +3,7 @@
*
* Copyright (C) 2006-2007 Collabora Limited
* Copyright (C) 2006-2007 Nokia Corporation
+ * Copyright (C) 2011 Debarshi Ray <rishi@gnu.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
@@ -28,6 +29,17 @@ G_BEGIN_DECLS
typedef struct _IdleServerConnection IdleServerConnection;
typedef struct _IdleServerConnectionClass IdleServerConnectionClass;
+typedef enum {
+ SERVER_CONNECTION_STATE_NOT_CONNECTED,
+ SERVER_CONNECTION_STATE_CONNECTING,
+ SERVER_CONNECTION_STATE_CONNECTED
+} IdleServerConnectionState;
+
+typedef enum {
+ SERVER_CONNECTION_STATE_REASON_ERROR,
+ SERVER_CONNECTION_STATE_REASON_REQUESTED
+} IdleServerConnectionStateReason;
+
struct _IdleServerConnection {
GObject parent;
};
@@ -56,6 +68,13 @@ GType idle_server_connection_get_type(void);
#define IDLE_SERVER_CONNECTION_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS((obj), IDLE_TYPE_SERVER_CONNECTION, IdleServerConnectionClass))
+gboolean idle_server_connection_connect(IdleServerConnection *conn, GError **error);
+gboolean idle_server_connection_disconnect(IdleServerConnection *conn, GError **error);
+gboolean idle_server_connection_disconnect_full(IdleServerConnection *conn, GError **error, guint reason);
+gboolean idle_server_connection_send(IdleServerConnection *conn, const gchar *cmd, GError **error);
+IdleServerConnectionState idle_server_connection_get_state(IdleServerConnection *conn);
+void idle_server_connection_set_tls(IdleServerConnection *conn, gboolean tls);
+
G_END_DECLS
#endif