[Telepathy-commits] [telepathy-gabble/master] rename gabble-connection.h to connection.h

Dafydd Harries dafydd.harries at collabora.co.uk
Tue Aug 19 10:53:13 PDT 2008


20080714115804-c9803-1409d186eb2b363c7dab712f3fc046972cdf7c7d.gz
---
 src/Makefile.am                 |    2 +-
 src/bytestream-factory.c        |    2 +-
 src/bytestream-factory.h        |    2 +-
 src/bytestream-ibb.c            |    2 +-
 src/bytestream-iface.c          |    2 +-
 src/bytestream-muc.c            |    2 +-
 src/caps-hash.h                 |    2 +-
 src/conn-aliasing.c             |    2 +-
 src/conn-aliasing.h             |    2 +-
 src/conn-avatars.h              |    2 +-
 src/conn-olpc.c                 |    2 +-
 src/conn-olpc.h                 |    2 +-
 src/conn-presence.c             |    4 +-
 src/conn-presence.h             |    2 +-
 src/connection.h                |  200 +++++++++++++++++++++++++++++++++++++++
 src/disco.c                     |    2 +-
 src/gabble-connection-manager.c |    2 +-
 src/gabble-connection.c         |    4 +-
 src/gabble-connection.h         |  200 ---------------------------------------
 src/gabble-im-channel.c         |    2 +-
 src/gabble-media-channel.c      |    2 +-
 src/gabble-media-session.c      |    2 +-
 src/gabble-media-stream.c       |    2 +-
 src/gabble-muc-channel.c        |    2 +-
 src/gabble-register.c           |    2 +-
 src/gabble-register.h           |    2 +-
 src/gabble-roomlist-channel.c   |    2 +-
 src/gabble-roomlist-channel.h   |    2 +-
 src/gabble-roster-channel.c     |    2 +-
 src/im-factory.c                |    2 +-
 src/media-factory.c             |    2 +-
 src/muc-factory.c               |    2 +-
 src/presence.h                  |    2 +-
 src/private-tubes-factory.c     |    2 +-
 src/private-tubes-factory.h     |    2 +-
 src/pubsub.h                    |    2 +-
 src/request-pipeline.c          |    2 +-
 src/roster.c                    |    2 +-
 src/text-mixin.c                |    2 +-
 src/tube-dbus.c                 |    2 +-
 src/tube-dbus.h                 |    2 +-
 src/tube-iface.c                |    2 +-
 src/tube-stream.c               |    2 +-
 src/tube-stream.h               |    2 +-
 src/tubes-channel.c             |    2 +-
 src/util.c                      |    2 +-
 src/vcard-manager.c             |    2 +-
 tests/test-handles.c            |    2 +-
 tests/twisted/main-debug.c      |    2 +-
 49 files changed, 249 insertions(+), 249 deletions(-)
 create mode 100644 src/connection.h
 delete mode 100644 src/gabble-connection.h

diff --git a/src/Makefile.am b/src/Makefile.am
index 68b53a6..0ca8b08 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -51,7 +51,7 @@ libgabble_convenience_la_our_sources = \
     gabble-error.h \
     gabble-connection-manager.h \
     gabble-connection-manager.c \
-    gabble-connection.h \
+    connection.h \
     gabble-connection.c \
     gabble-im-channel.h \
     gabble-im-channel.c \
diff --git a/src/bytestream-factory.c b/src/bytestream-factory.c
index c085ba4..85cf1e7 100644
--- a/src/bytestream-factory.c
+++ b/src/bytestream-factory.c
@@ -34,7 +34,7 @@
 
 #include <telepathy-glib/interfaces.h>
 #include "debug.h"
-#include "gabble-connection.h"
+#include "connection.h"
 #include "bytestream-iface.h"
 #include "bytestream-ibb.h"
 #include "bytestream-muc.h"
diff --git a/src/bytestream-factory.h b/src/bytestream-factory.h
index 30bc5d3..66189ff 100644
--- a/src/bytestream-factory.h
+++ b/src/bytestream-factory.h
@@ -28,7 +28,7 @@
 #include "bytestream-iface.h"
 #include "bytestream-ibb.h"
 #include "bytestream-muc.h"
-#include "gabble-connection.h"
+#include "connection.h"
 
 G_BEGIN_DECLS
 
diff --git a/src/bytestream-ibb.c b/src/bytestream-ibb.c
index 2a0a213..971c562 100644
--- a/src/bytestream-ibb.c
+++ b/src/bytestream-ibb.c
@@ -39,7 +39,7 @@
 #include "bytestream-factory.h"
 #include "debug.h"
 #include "disco.h"
-#include "gabble-connection.h"
+#include "connection.h"
 #include "gabble-signals-marshal.h"
 #include "namespaces.h"
 #include "util.h"
diff --git a/src/bytestream-iface.c b/src/bytestream-iface.c
index a7bb4e2..02bea89 100644
--- a/src/bytestream-iface.c
+++ b/src/bytestream-iface.c
@@ -21,7 +21,7 @@
 
 #include <glib.h>
 
-#include "gabble-connection.h"
+#include "connection.h"
 
 gboolean
 gabble_bytestream_iface_initiate (GabbleBytestreamIface *self)
diff --git a/src/bytestream-muc.c b/src/bytestream-muc.c
index a0f26ca..876e4e1 100644
--- a/src/bytestream-muc.c
+++ b/src/bytestream-muc.c
@@ -39,7 +39,7 @@
 #include "bytestream-factory.h"
 #include "debug.h"
 #include "disco.h"
-#include "gabble-connection.h"
+#include "connection.h"
 #include "gabble-signals-marshal.h"
 #include "namespaces.h"
 #include "util.h"
diff --git a/src/caps-hash.h b/src/caps-hash.h
index 019710e..816238c 100644
--- a/src/caps-hash.h
+++ b/src/caps-hash.h
@@ -22,7 +22,7 @@
 #define __CAPS_HASH_H__
 
 #include <loudmouth/loudmouth.h>
-#include "gabble-connection.h"
+#include "connection.h"
 
 gchar *caps_hash_compute_from_lm_node (LmMessageNode *node);
 gchar *caps_hash_compute_from_self_presence (
diff --git a/src/conn-aliasing.c b/src/conn-aliasing.c
index b84d3a0..7d6bc07 100644
--- a/src/conn-aliasing.c
+++ b/src/conn-aliasing.c
@@ -22,7 +22,7 @@
 
 #include <telepathy-glib/svc-connection.h>
 
-#include "gabble-connection.h"
+#include "connection.h"
 #include "namespaces.h"
 #include "presence-cache.h"
 #include "pubsub.h"
diff --git a/src/conn-aliasing.h b/src/conn-aliasing.h
index a7c146c..1218542 100644
--- a/src/conn-aliasing.h
+++ b/src/conn-aliasing.h
@@ -23,7 +23,7 @@
 
 #include <glib.h>
 
-#include "gabble-connection.h"
+#include "connection.h"
 
 G_BEGIN_DECLS
 
diff --git a/src/conn-avatars.h b/src/conn-avatars.h
index b40e160..bba9813 100644
--- a/src/conn-avatars.h
+++ b/src/conn-avatars.h
@@ -21,7 +21,7 @@
 #ifndef __CONN_AVATARS_H__
 #define __CONN_AVATARS_H__
 
-#include "gabble-connection.h"
+#include "connection.h"
 
 G_BEGIN_DECLS
 
diff --git a/src/conn-olpc.c b/src/conn-olpc.c
index 90e0aa6..300f871 100644
--- a/src/conn-olpc.c
+++ b/src/conn-olpc.c
@@ -28,7 +28,7 @@
 #define DEBUG_FLAG GABBLE_DEBUG_OLPC
 
 #include "debug.h"
-#include "gabble-connection.h"
+#include "connection.h"
 #include "gabble-muc-channel.h"
 #include "presence-cache.h"
 #include "namespaces.h"
diff --git a/src/conn-olpc.h b/src/conn-olpc.h
index 41aa21d..081e9be 100644
--- a/src/conn-olpc.h
+++ b/src/conn-olpc.h
@@ -22,7 +22,7 @@
 
 #include <extensions/extensions.h>
 
-#include "gabble-connection.h"
+#include "connection.h"
 
 void
 olpc_buddy_info_iface_init (gpointer g_iface, gpointer iface_data);
diff --git a/src/conn-presence.c b/src/conn-presence.c
index ffa404f..27bf6ca 100644
--- a/src/conn-presence.c
+++ b/src/conn-presence.c
@@ -26,7 +26,7 @@
 #include <telepathy-glib/svc-connection.h>
 #include <telepathy-glib/util.h>
 
-#include "gabble-connection.h"
+#include "connection.h"
 #include "presence.h"
 #include "presence-cache.h"
 
@@ -42,7 +42,7 @@ static const TpPresenceStatusOptionalArgumentSpec gabble_status_arguments[] = {
 };
 
 
-/* order must match PresenceId enum in gabble-connection.h */
+/* order must match PresenceId enum in connection.h */
 /* in increasing order of presence */
 static const TpPresenceStatusSpec gabble_statuses[] = {
   { "offline", TP_CONNECTION_PRESENCE_TYPE_OFFLINE, TRUE,
diff --git a/src/conn-presence.h b/src/conn-presence.h
index d4c10d7..ba5f9df 100644
--- a/src/conn-presence.h
+++ b/src/conn-presence.h
@@ -23,7 +23,7 @@
 
 #include <glib.h>
 
-#include "gabble-connection.h"
+#include "connection.h"
 
 G_BEGIN_DECLS
 
diff --git a/src/connection.h b/src/connection.h
new file mode 100644
index 0000000..061fa2f
--- /dev/null
+++ b/src/connection.h
@@ -0,0 +1,200 @@
+/*
+ * gabble-connection.h - Header for GabbleConnection
+ * Copyright (C) 2005 Collabora Ltd.
+ * Copyright (C) 2005 Nokia Corporation
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#ifndef __GABBLE_CONNECTION_H__
+#define __GABBLE_CONNECTION_H__
+
+#include <dbus/dbus-glib.h>
+#include <glib-object.h>
+#include <loudmouth/loudmouth.h>
+#include <telepathy-glib/base-connection.h>
+#include <telepathy-glib/presence-mixin.h>
+
+#include "gabble-types.h"
+#include "gabble-error.h"
+#include "muc-factory.h"
+
+G_BEGIN_DECLS
+
+/* Default parameters for optional parameters */
+#define GABBLE_PARAMS_DEFAULT_RESOURCE                   "Telepathy"
+#define GABBLE_PARAMS_DEFAULT_HTTPS_PROXY_PORT           443
+#define GABBLE_PARAMS_DEFAULT_STUN_PORT                  3478
+
+/* order must match array of statuses in conn-presence.c */
+/* in increasing order of presence */
+typedef enum
+{
+  GABBLE_PRESENCE_OFFLINE = 0,
+  GABBLE_PRESENCE_HIDDEN,
+  GABBLE_PRESENCE_XA,
+  GABBLE_PRESENCE_AWAY,
+  GABBLE_PRESENCE_DND,
+  GABBLE_PRESENCE_AVAILABLE,
+  GABBLE_PRESENCE_CHAT,
+  NUM_GABBLE_PRESENCES
+} GabblePresenceId;
+
+typedef enum
+{
+  GABBLE_CONNECTION_FEATURES_NONE = 0,
+  GABBLE_CONNECTION_FEATURES_GOOGLE_JINGLE_INFO = 1 << 0,
+  GABBLE_CONNECTION_FEATURES_GOOGLE_ROSTER = 1 << 1,
+  GABBLE_CONNECTION_FEATURES_PRESENCE_INVISIBLE = 1 << 2,
+  GABBLE_CONNECTION_FEATURES_PRIVACY = 1 << 3,
+  GABBLE_CONNECTION_FEATURES_PEP = 1 << 4,
+} GabbleConnectionFeatures;
+
+typedef struct _GabbleConnectionClass GabbleConnectionClass;
+
+typedef LmHandlerResult (*GabbleConnectionMsgReplyFunc) (GabbleConnection *conn,
+                                                         LmMessage *sent_msg,
+                                                         LmMessage *reply_msg,
+                                                         GObject *object,
+                                                         gpointer user_data);
+
+/* must be in the same order as the list_handle_strings in
+ * gabble-connection.c */
+typedef enum
+{
+  GABBLE_LIST_HANDLE_PUBLISH = 1,
+  GABBLE_LIST_HANDLE_SUBSCRIBE,
+  GABBLE_LIST_HANDLE_KNOWN,
+  GABBLE_LIST_HANDLE_DENY
+} GabbleListHandle;
+
+typedef enum {
+    /* The JID could be a "global" JID, or a MUC room member. We'll assume
+     * that it's a global JID (and remove the resource) unless we've seen
+     * that JID in a MUC before.
+     */
+    GABBLE_JID_ANY = 0,
+    /* The JID is definitely global. Remove the resource. */
+    GABBLE_JID_GLOBAL,
+    /* The JID is definitely a room member. Assert that there is a "resource"
+     * (nickname) and don't remove it. */
+    GABBLE_JID_ROOM_MEMBER
+} GabbleNormalizeContactJIDMode;
+
+struct _GabbleConnectionClass {
+    TpBaseConnectionClass parent_class;
+    TpPresenceMixinClass presence_class;
+};
+
+struct _GabbleConnection {
+    TpBaseConnection parent;
+    TpPresenceMixin presence;
+
+    /* loudmouth connection */
+    LmConnection *lmconn;
+
+    /* channel factories borrowed from TpBaseConnection's list */
+    GabbleRoster *roster;
+    GabbleMucFactory *muc_factory;
+    GabblePrivateTubesFactory *private_tubes_factory;
+
+    /* DISCO! */
+    GabbleDisco *disco;
+
+    /* connection feature flags */
+    GabbleConnectionFeatures features;
+
+    /* presence */
+    GabblePresenceCache *presence_cache;
+    GabblePresence *self_presence;
+
+    /* IQ request pipeline helper, so simultaneous requests don't make
+     * servers hate us */
+    GabbleRequestPipeline *req_pipeline;
+
+    /* vCard lookup helper */
+    GabbleVCardManager *vcard_manager;
+
+    /* OLPC hash tables */
+    GHashTable *olpc_activities_info;
+    GHashTable *olpc_pep_activities;
+    GHashTable *olpc_invited_activities;
+
+    /* bytestream factory */
+    GabbleBytestreamFactory *bytestream_factory;
+
+    /* outstanding avatar requests */
+    GHashTable *avatar_requests;
+
+    gpointer priv;
+};
+
+typedef enum {
+    GABBLE_CONNECTION_ALIAS_NONE = 0,
+    GABBLE_CONNECTION_ALIAS_FROM_JID,
+    GABBLE_CONNECTION_ALIAS_FROM_VCARD,
+    GABBLE_CONNECTION_ALIAS_FROM_MUC_RESOURCE,
+    GABBLE_CONNECTION_ALIAS_FROM_CONNMGR,
+    GABBLE_CONNECTION_ALIAS_FROM_PRESENCE,
+    GABBLE_CONNECTION_ALIAS_FROM_ROSTER
+} GabbleConnectionAliasSource;
+
+GType gabble_connection_get_type (void);
+
+/* TYPE MACROS */
+#define GABBLE_TYPE_CONNECTION \
+  (gabble_connection_get_type ())
+#define GABBLE_CONNECTION(obj) \
+  (G_TYPE_CHECK_INSTANCE_CAST((obj), GABBLE_TYPE_CONNECTION, GabbleConnection))
+#define GABBLE_CONNECTION_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_CAST((klass), GABBLE_TYPE_CONNECTION, \
+                           GabbleConnectionClass))
+#define GABBLE_IS_CONNECTION(obj) \
+  (G_TYPE_CHECK_INSTANCE_TYPE((obj), GABBLE_TYPE_CONNECTION))
+#define GABBLE_IS_CONNECTION_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_TYPE((klass), GABBLE_TYPE_CONNECTION))
+#define GABBLE_CONNECTION_GET_CLASS(obj) \
+  (G_TYPE_INSTANCE_GET_CLASS ((obj), GABBLE_TYPE_CONNECTION, \
+                              GabbleConnectionClass))
+
+gboolean _gabble_connection_set_properties_from_account (
+    GabbleConnection *conn, const gchar *account, GError **error);
+gboolean _gabble_connection_send (GabbleConnection *conn, LmMessage *msg,
+    GError **error);
+gboolean _gabble_connection_send_with_reply (GabbleConnection *conn,
+    LmMessage *msg, GabbleConnectionMsgReplyFunc reply_func, GObject *object,
+    gpointer user_data, GError **error);
+void _gabble_connection_acknowledge_set_iq (GabbleConnection *conn,
+    LmMessage *iq);
+void _gabble_connection_send_iq_error (GabbleConnection *conn,
+    LmMessage *message, GabbleXmppError error, const gchar *errmsg);
+
+const char *_gabble_connection_find_conference_server (GabbleConnection *);
+gboolean _gabble_connection_signal_own_presence (GabbleConnection *,
+    GError **);
+
+void gabble_connection_ensure_capabilities (GabbleConnection *conn,
+    GabblePresenceCapabilities caps);
+
+/* extern only for the benefit of the unit tests */
+void _gabble_connection_create_handle_repos (TpBaseConnection *conn,
+    TpHandleRepoIface *repos[NUM_TP_HANDLE_TYPES]);
+
+/* For unit tests only */
+void gabble_connection_set_disco_reply_timeout (guint timeout);
+
+G_END_DECLS
+
+#endif /* #ifndef __GABBLE_CONNECTION_H__*/
diff --git a/src/disco.c b/src/disco.c
index b7dab2d..98cbdd4 100644
--- a/src/disco.c
+++ b/src/disco.c
@@ -33,7 +33,7 @@
 #define DEBUG_FLAG GABBLE_DEBUG_DISCO
 
 #include "debug.h"
-#include "gabble-connection.h"
+#include "connection.h"
 #include "gabble-error.h"
 #include "namespaces.h"
 #include <telepathy-glib/dbus.h>
diff --git a/src/gabble-connection-manager.c b/src/gabble-connection-manager.c
index fde9c01..98e3a58 100644
--- a/src/gabble-connection-manager.c
+++ b/src/gabble-connection-manager.c
@@ -26,7 +26,7 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include "gabble-connection.h"
+#include "connection.h"
 #include <telepathy-glib/dbus.h>
 #include <telepathy-glib/errors.h>
 
diff --git a/src/gabble-connection.c b/src/gabble-connection.c
index 38efb0c..b72e78d 100644
--- a/src/gabble-connection.c
+++ b/src/gabble-connection.c
@@ -20,7 +20,7 @@
 
 #include "config.h"
 
-#include "gabble-connection.h"
+#include "connection.h"
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -439,7 +439,7 @@ gabble_connection_get_unique_name (TpBaseConnection *self)
                           priv->resource);
 }
 
-/* must be in the same order as GabbleListHandle in gabble-connection.h */
+/* must be in the same order as GabbleListHandle in connection.h */
 static const char *list_handle_strings[] =
 {
     "publish",      /* GABBLE_LIST_HANDLE_PUBLISH */
diff --git a/src/gabble-connection.h b/src/gabble-connection.h
deleted file mode 100644
index 061fa2f..0000000
--- a/src/gabble-connection.h
+++ /dev/null
@@ -1,200 +0,0 @@
-/*
- * gabble-connection.h - Header for GabbleConnection
- * Copyright (C) 2005 Collabora Ltd.
- * Copyright (C) 2005 Nokia Corporation
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- */
-
-#ifndef __GABBLE_CONNECTION_H__
-#define __GABBLE_CONNECTION_H__
-
-#include <dbus/dbus-glib.h>
-#include <glib-object.h>
-#include <loudmouth/loudmouth.h>
-#include <telepathy-glib/base-connection.h>
-#include <telepathy-glib/presence-mixin.h>
-
-#include "gabble-types.h"
-#include "gabble-error.h"
-#include "muc-factory.h"
-
-G_BEGIN_DECLS
-
-/* Default parameters for optional parameters */
-#define GABBLE_PARAMS_DEFAULT_RESOURCE                   "Telepathy"
-#define GABBLE_PARAMS_DEFAULT_HTTPS_PROXY_PORT           443
-#define GABBLE_PARAMS_DEFAULT_STUN_PORT                  3478
-
-/* order must match array of statuses in conn-presence.c */
-/* in increasing order of presence */
-typedef enum
-{
-  GABBLE_PRESENCE_OFFLINE = 0,
-  GABBLE_PRESENCE_HIDDEN,
-  GABBLE_PRESENCE_XA,
-  GABBLE_PRESENCE_AWAY,
-  GABBLE_PRESENCE_DND,
-  GABBLE_PRESENCE_AVAILABLE,
-  GABBLE_PRESENCE_CHAT,
-  NUM_GABBLE_PRESENCES
-} GabblePresenceId;
-
-typedef enum
-{
-  GABBLE_CONNECTION_FEATURES_NONE = 0,
-  GABBLE_CONNECTION_FEATURES_GOOGLE_JINGLE_INFO = 1 << 0,
-  GABBLE_CONNECTION_FEATURES_GOOGLE_ROSTER = 1 << 1,
-  GABBLE_CONNECTION_FEATURES_PRESENCE_INVISIBLE = 1 << 2,
-  GABBLE_CONNECTION_FEATURES_PRIVACY = 1 << 3,
-  GABBLE_CONNECTION_FEATURES_PEP = 1 << 4,
-} GabbleConnectionFeatures;
-
-typedef struct _GabbleConnectionClass GabbleConnectionClass;
-
-typedef LmHandlerResult (*GabbleConnectionMsgReplyFunc) (GabbleConnection *conn,
-                                                         LmMessage *sent_msg,
-                                                         LmMessage *reply_msg,
-                                                         GObject *object,
-                                                         gpointer user_data);
-
-/* must be in the same order as the list_handle_strings in
- * gabble-connection.c */
-typedef enum
-{
-  GABBLE_LIST_HANDLE_PUBLISH = 1,
-  GABBLE_LIST_HANDLE_SUBSCRIBE,
-  GABBLE_LIST_HANDLE_KNOWN,
-  GABBLE_LIST_HANDLE_DENY
-} GabbleListHandle;
-
-typedef enum {
-    /* The JID could be a "global" JID, or a MUC room member. We'll assume
-     * that it's a global JID (and remove the resource) unless we've seen
-     * that JID in a MUC before.
-     */
-    GABBLE_JID_ANY = 0,
-    /* The JID is definitely global. Remove the resource. */
-    GABBLE_JID_GLOBAL,
-    /* The JID is definitely a room member. Assert that there is a "resource"
-     * (nickname) and don't remove it. */
-    GABBLE_JID_ROOM_MEMBER
-} GabbleNormalizeContactJIDMode;
-
-struct _GabbleConnectionClass {
-    TpBaseConnectionClass parent_class;
-    TpPresenceMixinClass presence_class;
-};
-
-struct _GabbleConnection {
-    TpBaseConnection parent;
-    TpPresenceMixin presence;
-
-    /* loudmouth connection */
-    LmConnection *lmconn;
-
-    /* channel factories borrowed from TpBaseConnection's list */
-    GabbleRoster *roster;
-    GabbleMucFactory *muc_factory;
-    GabblePrivateTubesFactory *private_tubes_factory;
-
-    /* DISCO! */
-    GabbleDisco *disco;
-
-    /* connection feature flags */
-    GabbleConnectionFeatures features;
-
-    /* presence */
-    GabblePresenceCache *presence_cache;
-    GabblePresence *self_presence;
-
-    /* IQ request pipeline helper, so simultaneous requests don't make
-     * servers hate us */
-    GabbleRequestPipeline *req_pipeline;
-
-    /* vCard lookup helper */
-    GabbleVCardManager *vcard_manager;
-
-    /* OLPC hash tables */
-    GHashTable *olpc_activities_info;
-    GHashTable *olpc_pep_activities;
-    GHashTable *olpc_invited_activities;
-
-    /* bytestream factory */
-    GabbleBytestreamFactory *bytestream_factory;
-
-    /* outstanding avatar requests */
-    GHashTable *avatar_requests;
-
-    gpointer priv;
-};
-
-typedef enum {
-    GABBLE_CONNECTION_ALIAS_NONE = 0,
-    GABBLE_CONNECTION_ALIAS_FROM_JID,
-    GABBLE_CONNECTION_ALIAS_FROM_VCARD,
-    GABBLE_CONNECTION_ALIAS_FROM_MUC_RESOURCE,
-    GABBLE_CONNECTION_ALIAS_FROM_CONNMGR,
-    GABBLE_CONNECTION_ALIAS_FROM_PRESENCE,
-    GABBLE_CONNECTION_ALIAS_FROM_ROSTER
-} GabbleConnectionAliasSource;
-
-GType gabble_connection_get_type (void);
-
-/* TYPE MACROS */
-#define GABBLE_TYPE_CONNECTION \
-  (gabble_connection_get_type ())
-#define GABBLE_CONNECTION(obj) \
-  (G_TYPE_CHECK_INSTANCE_CAST((obj), GABBLE_TYPE_CONNECTION, GabbleConnection))
-#define GABBLE_CONNECTION_CLASS(klass) \
-  (G_TYPE_CHECK_CLASS_CAST((klass), GABBLE_TYPE_CONNECTION, \
-                           GabbleConnectionClass))
-#define GABBLE_IS_CONNECTION(obj) \
-  (G_TYPE_CHECK_INSTANCE_TYPE((obj), GABBLE_TYPE_CONNECTION))
-#define GABBLE_IS_CONNECTION_CLASS(klass) \
-  (G_TYPE_CHECK_CLASS_TYPE((klass), GABBLE_TYPE_CONNECTION))
-#define GABBLE_CONNECTION_GET_CLASS(obj) \
-  (G_TYPE_INSTANCE_GET_CLASS ((obj), GABBLE_TYPE_CONNECTION, \
-                              GabbleConnectionClass))
-
-gboolean _gabble_connection_set_properties_from_account (
-    GabbleConnection *conn, const gchar *account, GError **error);
-gboolean _gabble_connection_send (GabbleConnection *conn, LmMessage *msg,
-    GError **error);
-gboolean _gabble_connection_send_with_reply (GabbleConnection *conn,
-    LmMessage *msg, GabbleConnectionMsgReplyFunc reply_func, GObject *object,
-    gpointer user_data, GError **error);
-void _gabble_connection_acknowledge_set_iq (GabbleConnection *conn,
-    LmMessage *iq);
-void _gabble_connection_send_iq_error (GabbleConnection *conn,
-    LmMessage *message, GabbleXmppError error, const gchar *errmsg);
-
-const char *_gabble_connection_find_conference_server (GabbleConnection *);
-gboolean _gabble_connection_signal_own_presence (GabbleConnection *,
-    GError **);
-
-void gabble_connection_ensure_capabilities (GabbleConnection *conn,
-    GabblePresenceCapabilities caps);
-
-/* extern only for the benefit of the unit tests */
-void _gabble_connection_create_handle_repos (TpBaseConnection *conn,
-    TpHandleRepoIface *repos[NUM_TP_HANDLE_TYPES]);
-
-/* For unit tests only */
-void gabble_connection_set_disco_reply_timeout (guint timeout);
-
-G_END_DECLS
-
-#endif /* #ifndef __GABBLE_CONNECTION_H__*/
diff --git a/src/gabble-im-channel.c b/src/gabble-im-channel.c
index 40ffa5d..b971a72 100644
--- a/src/gabble-im-channel.c
+++ b/src/gabble-im-channel.c
@@ -30,7 +30,7 @@
 
 #include "debug.h"
 #include "disco.h"
-#include "gabble-connection.h"
+#include "connection.h"
 #include "presence.h"
 #include "presence-cache.h"
 #include "roster.h"
diff --git a/src/gabble-media-channel.c b/src/gabble-media-channel.c
index 2b0ece9..63ef5a9 100644
--- a/src/gabble-media-channel.c
+++ b/src/gabble-media-channel.c
@@ -28,7 +28,7 @@
 #define DEBUG_FLAG GABBLE_DEBUG_MEDIA
 
 #include "debug.h"
-#include "gabble-connection.h"
+#include "connection.h"
 #include "gabble-media-session.h"
 #include "presence.h"
 #include "presence-cache.h"
diff --git a/src/gabble-media-session.c b/src/gabble-media-session.c
index 7db34c7..ac925ce 100644
--- a/src/gabble-media-session.c
+++ b/src/gabble-media-session.c
@@ -38,7 +38,7 @@
 #include <telepathy-glib/errors.h>
 #include <telepathy-glib/svc-media-interfaces.h>
 
-#include "gabble-connection.h"
+#include "connection.h"
 #include "gabble-media-channel.h"
 #include "gabble-media-stream.h"
 #include "presence-cache.h"
diff --git a/src/gabble-media-stream.c b/src/gabble-media-stream.c
index e7b8ce4..767d7b2 100644
--- a/src/gabble-media-stream.c
+++ b/src/gabble-media-stream.c
@@ -32,7 +32,7 @@
 #include "debug.h"
 #include "namespaces.h"
 
-#include "gabble-connection.h"
+#include "connection.h"
 #include "gabble-media-channel.h"
 #include "gabble-media-session.h"
 #include "gabble-media-session-enumtypes.h"
diff --git a/src/gabble-muc-channel.c b/src/gabble-muc-channel.c
index 05568bf..d97ed4e 100644
--- a/src/gabble-muc-channel.c
+++ b/src/gabble-muc-channel.c
@@ -37,7 +37,7 @@
 
 #include "debug.h"
 #include "disco.h"
-#include "gabble-connection.h"
+#include "connection.h"
 #include "gabble-error.h"
 #include "namespaces.h"
 #include "util.h"
diff --git a/src/gabble-register.c b/src/gabble-register.c
index e924511..58efa02 100644
--- a/src/gabble-register.c
+++ b/src/gabble-register.c
@@ -34,7 +34,7 @@
 #include <telepathy-glib/dbus.h>
 #include <telepathy-glib/errors.h>
 
-#include "gabble-connection.h"
+#include "connection.h"
 #include "gabble-error.h"
 #include "gabble-signals-marshal.h"
 #include "namespaces.h"
diff --git a/src/gabble-register.h b/src/gabble-register.h
index c6fc41c..e38e520 100644
--- a/src/gabble-register.h
+++ b/src/gabble-register.h
@@ -27,7 +27,7 @@
 
 #include <loudmouth/loudmouth.h>
 
-#include "gabble-connection.h"
+#include "connection.h"
 
 G_BEGIN_DECLS
 
diff --git a/src/gabble-roomlist-channel.c b/src/gabble-roomlist-channel.c
index 9b8126a..0cde47b 100644
--- a/src/gabble-roomlist-channel.c
+++ b/src/gabble-roomlist-channel.c
@@ -35,7 +35,7 @@
 #define DEBUG_FLAG GABBLE_DEBUG_ROOMLIST
 #include "debug.h"
 #include "disco.h"
-#include "gabble-connection.h"
+#include "connection.h"
 #include "namespaces.h"
 #include "util.h"
 
diff --git a/src/gabble-roomlist-channel.h b/src/gabble-roomlist-channel.h
index 9bd697c..1bf44c2 100644
--- a/src/gabble-roomlist-channel.h
+++ b/src/gabble-roomlist-channel.h
@@ -23,7 +23,7 @@
 
 #include <glib-object.h>
 
-#include "gabble-connection.h"
+#include "connection.h"
 
 G_BEGIN_DECLS
 
diff --git a/src/gabble-roster-channel.c b/src/gabble-roster-channel.c
index 909ce96..facd7f1 100644
--- a/src/gabble-roster-channel.c
+++ b/src/gabble-roster-channel.c
@@ -27,7 +27,7 @@
 #define DEBUG_FLAG GABBLE_DEBUG_ROSTER
 
 #include "debug.h"
-#include "gabble-connection.h"
+#include "connection.h"
 #include <telepathy-glib/group-mixin.h>
 #include "roster.h"
 #include <telepathy-glib/dbus.h>
diff --git a/src/im-factory.c b/src/im-factory.c
index 8c53326..f1dd014 100644
--- a/src/im-factory.c
+++ b/src/im-factory.c
@@ -36,7 +36,7 @@
 
 #include "debug.h"
 #include "disco.h"
-#include "gabble-connection.h"
+#include "connection.h"
 #include "gabble-im-channel.h"
 #include <telepathy-glib/interfaces.h>
 #include "text-mixin.h"
diff --git a/src/media-factory.c b/src/media-factory.c
index 2a33d75..03c6d19 100644
--- a/src/media-factory.c
+++ b/src/media-factory.c
@@ -35,7 +35,7 @@
 #define DEBUG_FLAG GABBLE_DEBUG_MEDIA
 
 #include "debug.h"
-#include "gabble-connection.h"
+#include "connection.h"
 #include "gabble-media-channel.h"
 #include "namespaces.h"
 #include <telepathy-glib/interfaces.h>
diff --git a/src/muc-factory.c b/src/muc-factory.c
index d1092f0..71d6ac4 100644
--- a/src/muc-factory.c
+++ b/src/muc-factory.c
@@ -37,7 +37,7 @@
 #include "debug.h"
 #include "disco.h"
 #include "extensions/extensions.h"
-#include "gabble-connection.h"
+#include "connection.h"
 #include "gabble-muc-channel.h"
 #include "gabble-roomlist-channel.h"
 #include "namespaces.h"
diff --git a/src/presence.h b/src/presence.h
index 8884007..26407b0 100644
--- a/src/presence.h
+++ b/src/presence.h
@@ -24,7 +24,7 @@
 
 #include <glib-object.h>
 
-#include "gabble-connection.h"
+#include "connection.h"
 #include "gabble-types.h"
 
 G_BEGIN_DECLS
diff --git a/src/private-tubes-factory.c b/src/private-tubes-factory.c
index 9eb0202..a3653d4 100644
--- a/src/private-tubes-factory.c
+++ b/src/private-tubes-factory.c
@@ -34,7 +34,7 @@
 
 #include "debug.h"
 #include "extensions/extensions.h"
-#include "gabble-connection.h"
+#include "connection.h"
 #include "tubes-channel.h"
 #include "namespaces.h"
 #include "util.h"
diff --git a/src/private-tubes-factory.h b/src/private-tubes-factory.h
index 1a1e73f..10b2dae 100644
--- a/src/private-tubes-factory.h
+++ b/src/private-tubes-factory.h
@@ -24,7 +24,7 @@
 #include <loudmouth/loudmouth.h>
 
 #include <telepathy-glib/base-connection.h>
-#include "gabble-connection.h"
+#include "connection.h"
 #include "bytestream-iface.h"
 #include "tubes-channel.h"
 
diff --git a/src/pubsub.h b/src/pubsub.h
index 84d0e59..ef7af1a 100644
--- a/src/pubsub.h
+++ b/src/pubsub.h
@@ -20,7 +20,7 @@
 #ifndef __PUBSUB_H__
 #define __PUBSUB_H__
 
-#include "gabble-connection.h"
+#include "connection.h"
 
 G_BEGIN_DECLS
 
diff --git a/src/request-pipeline.c b/src/request-pipeline.c
index 957d63e..6696df6 100644
--- a/src/request-pipeline.c
+++ b/src/request-pipeline.c
@@ -24,7 +24,7 @@
 
 #define DEBUG_FLAG GABBLE_DEBUG_PIPELINE
 #include "debug.h"
-#include "gabble-connection.h"
+#include "connection.h"
 
 #define DEFAULT_REQUEST_TIMEOUT 20000
 #define REQUEST_PIPELINE_SIZE 5
diff --git a/src/roster.c b/src/roster.c
index 5f35f7c..ecea65d 100644
--- a/src/roster.c
+++ b/src/roster.c
@@ -33,7 +33,7 @@
 
 #include "conn-aliasing.h"
 #include "debug.h"
-#include "gabble-connection.h"
+#include "connection.h"
 #include "gabble-roster-channel.h"
 #include "namespaces.h"
 #include "util.h"
diff --git a/src/text-mixin.c b/src/text-mixin.c
index ddb72ad..0cf54b5 100644
--- a/src/text-mixin.c
+++ b/src/text-mixin.c
@@ -37,7 +37,7 @@
 #define DEBUG_FLAG GABBLE_DEBUG_IM
 
 #include "debug.h"
-#include "gabble-connection.h"
+#include "connection.h"
 #include "namespaces.h"
 #include "roster.h"
 #include "util.h"
diff --git a/src/tube-dbus.c b/src/tube-dbus.c
index 2bec6f5..d395981 100644
--- a/src/tube-dbus.c
+++ b/src/tube-dbus.c
@@ -37,7 +37,7 @@
 #include "debug.h"
 #include "disco.h"
 #include "extensions/extensions.h"
-#include "gabble-connection.h"
+#include "connection.h"
 #include "namespaces.h"
 #include "util.h"
 #include "base64.h"
diff --git a/src/tube-dbus.h b/src/tube-dbus.h
index 3e7a078..a15c18f 100644
--- a/src/tube-dbus.h
+++ b/src/tube-dbus.h
@@ -22,7 +22,7 @@
 
 #include <glib-object.h>
 
-#include "gabble-connection.h"
+#include "connection.h"
 #include "bytestream-iface.h"
 
 G_BEGIN_DECLS
diff --git a/src/tube-iface.c b/src/tube-iface.c
index 13207c9..f615129 100644
--- a/src/tube-iface.c
+++ b/src/tube-iface.c
@@ -18,7 +18,7 @@
  */
 
 #include "tube-iface.h"
-#include "gabble-connection.h"
+#include "connection.h"
 #include "extensions/extensions.h"
 
 #include <glib.h>
diff --git a/src/tube-stream.c b/src/tube-stream.c
index 850bf92..b87a34b 100644
--- a/src/tube-stream.c
+++ b/src/tube-stream.c
@@ -40,7 +40,7 @@
 #include "debug.h"
 #include "disco.h"
 #include "extensions/extensions.h"
-#include "gabble-connection.h"
+#include "connection.h"
 #include "presence.h"
 #include "presence-cache.h"
 #include "namespaces.h"
diff --git a/src/tube-stream.h b/src/tube-stream.h
index 8fd4b8c..f73b4b6 100644
--- a/src/tube-stream.h
+++ b/src/tube-stream.h
@@ -24,7 +24,7 @@
 
 #include <telepathy-glib/enums.h>
 
-#include "gabble-connection.h"
+#include "connection.h"
 
 G_BEGIN_DECLS
 
diff --git a/src/tubes-channel.c b/src/tubes-channel.c
index fd84ff9..7acb8cd 100644
--- a/src/tubes-channel.c
+++ b/src/tubes-channel.c
@@ -43,7 +43,7 @@
 #define DEBUG_FLAG GABBLE_DEBUG_TUBES
 
 #include "debug.h"
-#include "gabble-connection.h"
+#include "connection.h"
 #include "presence.h"
 #include "presence-cache.h"
 #include "namespaces.h"
diff --git a/src/util.c b/src/util.c
index 5f4de49..183ac76 100644
--- a/src/util.c
+++ b/src/util.c
@@ -34,7 +34,7 @@
 #include "conn-aliasing.h"
 #include "sha1/sha1.h"
 #include "namespaces.h"
-#include "gabble-connection.h"
+#include "connection.h"
 #include "base64.h"
 
 #define DEBUG_FLAG GABBLE_DEBUG_JID
diff --git a/src/vcard-manager.c b/src/vcard-manager.c
index 1b34cf7..e4f3964 100644
--- a/src/vcard-manager.c
+++ b/src/vcard-manager.c
@@ -29,7 +29,7 @@
 
 #include "base64.h"
 #include "conn-aliasing.h"
-#include "gabble-connection.h"
+#include "connection.h"
 #include "namespaces.h"
 #include "request-pipeline.h"
 #include "util.h"
diff --git a/tests/test-handles.c b/tests/test-handles.c
index 8ebab08..299c16f 100644
--- a/tests/test-handles.c
+++ b/tests/test-handles.c
@@ -1,7 +1,7 @@
 #include <string.h>
 #include <glib.h>
 #include <glib-object.h>
-#include <gabble-connection.h>
+#include <connection.h>
 #include <telepathy-glib/enums.h>
 #include <telepathy-glib/interfaces.h>
 #include <telepathy-glib/errors.h>
diff --git a/tests/twisted/main-debug.c b/tests/twisted/main-debug.c
index 71c8b8f..95f7311 100644
--- a/tests/twisted/main-debug.c
+++ b/tests/twisted/main-debug.c
@@ -18,7 +18,7 @@
  */
 
 #include "gabble.h"
-#include "gabble-connection.h"
+#include "connection.h"
 
 int
 main (int argc,
-- 
1.5.6.3




More information about the Telepathy-commits mailing list