summaryrefslogtreecommitdiff
path: root/gabble
diff options
context:
space:
mode:
authorJonny Lamb <jonny.lamb@collabora.co.uk>2012-02-01 16:07:06 -0500
committerJonny Lamb <jonny.lamb@collabora.co.uk>2012-02-01 16:07:06 -0500
commit1d41beb99b03f828fd204e6e18fa7499360937b9 (patch)
tree10046273dae8333e0855041e05dadfe848122460 /gabble
parenta687785628216f8f73c699096e9aae4a07b811c6 (diff)
Revert "Merge remote-tracking branch 'siraj/windows-compile-fix'"
Diffstat (limited to 'gabble')
-rw-r--r--gabble/Makefile.am2
-rw-r--r--gabble/connection.h88
-rw-r--r--gabble/gabble.h2
-rw-r--r--gabble/plugin-connection.h132
-rw-r--r--gabble/plugin.h8
-rw-r--r--gabble/telepathy-gabble-uninstalled.pc.in1
-rw-r--r--gabble/telepathy-gabble.pc.in1
7 files changed, 93 insertions, 141 deletions
diff --git a/gabble/Makefile.am b/gabble/Makefile.am
index 26b874889..f42c837d0 100644
--- a/gabble/Makefile.am
+++ b/gabble/Makefile.am
@@ -8,7 +8,7 @@ gabbleinclude_HEADERS = \
capabilities-set.h \
caps-channel-manager.h \
caps-hash.h \
- plugin-connection.h \
+ connection.h \
error.h \
gabble.h \
namespaces.h \
diff --git a/gabble/connection.h b/gabble/connection.h
new file mode 100644
index 000000000..1d7dccad9
--- /dev/null
+++ b/gabble/connection.h
@@ -0,0 +1,88 @@
+/*
+ * connection.h - connection API available to telepathy-gabble plugins
+ * Copyright © 2010 Collabora Ltd.
+ * Copyright © 2010 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_PLUGINS_CONNECTION_H
+#define GABBLE_PLUGINS_CONNECTION_H
+
+#include <telepathy-glib/base-connection.h>
+#include <telepathy-glib/base-contact-list.h>
+
+#include <gabble/capabilities-set.h>
+#include <gabble/types.h>
+
+#include <wocky/wocky-xep-0115-capabilities.h>
+
+G_BEGIN_DECLS
+
+#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))
+
+typedef struct _GabbleConnectionClass GabbleConnectionClass;
+
+GType gabble_connection_get_type (void);
+
+void gabble_connection_update_sidecar_capabilities (
+ GabbleConnection *connection,
+ const GabbleCapabilitySet *add_set,
+ const GabbleCapabilitySet *remove_set);
+gchar *gabble_connection_add_sidecar_own_caps (
+ GabbleConnection *connection,
+ const GabbleCapabilitySet *cap_set,
+ const GPtrArray *identities) G_GNUC_WARN_UNUSED_RESULT;
+gchar *gabble_connection_add_sidecar_own_caps_full (
+ GabbleConnection *connection,
+ const GabbleCapabilitySet *cap_set,
+ const GPtrArray *identities,
+ GPtrArray *data_forms) G_GNUC_WARN_UNUSED_RESULT;
+
+WockySession *gabble_connection_get_session (
+ GabbleConnection *connection);
+
+gchar *gabble_connection_get_full_jid (GabbleConnection *conn);
+
+const gchar * gabble_connection_get_jid_for_caps (GabbleConnection *conn,
+ WockyXep0115Capabilities *caps);
+
+const gchar * gabble_connection_pick_best_resource_for_caps (
+ GabbleConnection *connection,
+ const gchar *jid,
+ GabbleCapabilitySetPredicate predicate,
+ gconstpointer user_data);
+
+TpBaseContactList * gabble_connection_get_contact_list (
+ GabbleConnection *connection);
+
+WockyXep0115Capabilities * gabble_connection_get_caps (
+ GabbleConnection *connection, TpHandle handle);
+
+G_END_DECLS
+
+#endif
diff --git a/gabble/gabble.h b/gabble/gabble.h
index 4465c3428..8393ae8c7 100644
--- a/gabble/gabble.h
+++ b/gabble/gabble.h
@@ -28,7 +28,7 @@
#include <gabble/capabilities-set.h>
#include <gabble/caps-channel-manager.h>
#include <gabble/caps-hash.h>
-#include <gabble/plugin-connection.h>
+#include <gabble/connection.h>
#include <gabble/error.h>
#include <gabble/namespaces.h>
#include <gabble/plugin.h>
diff --git a/gabble/plugin-connection.h b/gabble/plugin-connection.h
deleted file mode 100644
index e80e13410..000000000
--- a/gabble/plugin-connection.h
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * plugin-connection.h — Connection API available to telepathy-gabble plugins
- * Copyright © 2012 Collabora Ltd.
- *
- * 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_PLUGIN_CONNECTION_H
-#define GABBLE_PLUGIN_CONNECTION_H
-
-#include <glib-object.h>
-
-#include <telepathy-glib/base-connection.h>
-#include <telepathy-glib/base-contact-list.h>
-
-#include <gabble/capabilities-set.h>
-#include <gabble/types.h>
-
-#include <wocky/wocky-xep-0115-capabilities.h>
-
-G_BEGIN_DECLS
-
-typedef struct _GabblePluginConnection GabblePluginConnection;
-typedef struct _GabblePluginConnectionInterface GabblePluginConnectionInterface;
-
-#define GABBLE_TYPE_PLUGIN_CONNECTION (gabble_plugin_connection_get_type ())
-#define GABBLE_PLUGIN_CONNECTION(o) \
- (G_TYPE_CHECK_INSTANCE_CAST ((o), GABBLE_TYPE_PLUGIN_CONNECTION, \
- GabblePluginConnection))
-#define GABBLE_IS_PLUGIN_CONNECTION(o) \
- (G_TYPE_CHECK_INSTANCE_TYPE ((o), GABBLE_TYPE_PLUGIN_CONNECTION))
-#define GABBLE_PLUGIN_CONNECTION_GET_IFACE(o) \
- (G_TYPE_INSTANCE_GET_INTERFACE ((o), GABBLE_TYPE_PLUGIN_CONNECTION, \
- GabblePluginConnectionInterface))
-
-GType gabble_plugin_connection_get_type (void) G_GNUC_CONST;
-
-typedef gchar * (*GabblePluginConnectionAddSidecarCapsFunc) (
- GabblePluginConnection *connection_service,
- const GabbleCapabilitySet *cap_set,
- const GPtrArray *identities);
-
-typedef gchar * (*GabblePluginConnectionAddSidecarCapsFullFunc) (
- GabblePluginConnection *plugin_connection,
- const GabbleCapabilitySet *cap_set,
- const GPtrArray *identities,
- GPtrArray *data_forms);
-
-typedef WockySession * (*GabblePluginConnectionGetSessionFunc) (
- GabblePluginConnection *plugin_connection);
-
-typedef gchar *(*GabblePluginConnectionGetFullJidFunc) (
- GabblePluginConnection *plugin_connection);
-
-typedef const gchar * (*GabblePluginConnectionGetJidForCapsFunc) (
- GabblePluginConnection *plugin_connection,
- WockyXep0115Capabilities *caps);
-
-typedef const gchar* (*GabblePluginConnectionPickBestResourceForCaps) (
- GabblePluginConnection *plugin_connection,
- const gchar *jid,
- GabbleCapabilitySetPredicate predicate,
- gconstpointer user_data);
-
-typedef TpBaseContactList * (*GabblePluginConnectionGetContactList) (
- GabblePluginConnection *plugin_connection);
-
-typedef WockyXep0115Capabilities * (*GabblePluginConnectionGetCaps) (
- GabblePluginConnection *plugin_connection,
- TpHandle handle);
-
-struct _GabblePluginConnectionInterface
-{
- GTypeInterface parent;
- GabblePluginConnectionAddSidecarCapsFunc add_sidecar_own_caps;
- GabblePluginConnectionAddSidecarCapsFullFunc add_sidecar_own_caps_full;
- GabblePluginConnectionGetSessionFunc get_session;
- GabblePluginConnectionGetFullJidFunc get_full_jid;
- GabblePluginConnectionGetJidForCapsFunc get_jid_for_caps;
- GabblePluginConnectionPickBestResourceForCaps pick_best_resource_for_caps;
- GabblePluginConnectionGetContactList get_contact_list;
- GabblePluginConnectionGetCaps get_caps;
-};
-
-gchar *gabble_plugin_connection_add_sidecar_own_caps (
- GabblePluginConnection *plugin_service,
- const GabbleCapabilitySet *cap_set,
- const GPtrArray *identities);
-
-gchar *gabble_plugin_connection_add_sidecar_own_caps_full (
- GabblePluginConnection *plugin_connection,
- const GabbleCapabilitySet *cap_set,
- const GPtrArray *identities,
- GPtrArray *data_forms) G_GNUC_WARN_UNUSED_RESULT;
-
-WockySession *gabble_plugin_connection_get_session (
- GabblePluginConnection *plugin_connection);
-
-gchar *gabble_plugin_connection_get_full_jid (GabblePluginConnection *conn);
-
-const gchar *gabble_plugin_connection_get_jid_for_caps (
- GabblePluginConnection *plugin_connection,
- WockyXep0115Capabilities *caps);
-
-const gchar *gabble_plugin_connection_pick_best_resource_for_caps (
- GabblePluginConnection *plugin_connection,
- const gchar *jid,
- GabbleCapabilitySetPredicate predicate,
- gconstpointer user_data);
-
-TpBaseContactList *gabble_plugin_connection_get_contact_list (
- GabblePluginConnection *plugin_connection);
-
-WockyXep0115Capabilities *gabble_plugin_connection_get_caps (
- GabblePluginConnection *plugin_connection,
- TpHandle handle);
-
-G_END_DECLS
-
-#endif
diff --git a/gabble/plugin.h b/gabble/plugin.h
index 35621200c..ffb888c29 100644
--- a/gabble/plugin.h
+++ b/gabble/plugin.h
@@ -28,7 +28,7 @@
#include <telepathy-glib/presence-mixin.h>
#include <wocky/wocky-session.h>
-#include <gabble/plugin-connection.h>
+#include <gabble/connection.h>
#include <gabble/sidecar.h>
#include <gabble/types.h>
@@ -48,7 +48,7 @@ typedef struct _GabblePluginInterface GabblePluginInterface;
typedef void (*GabblePluginCreateSidecarImpl) (
GabblePlugin *plugin,
const gchar *sidecar_interface,
- GabblePluginConnection *plugin_connection,
+ GabbleConnection *connection,
WockySession *session,
GAsyncReadyCallback callback,
gpointer user_data);
@@ -58,7 +58,6 @@ typedef void (*GabblePluginCreateSidecarImpl) (
* not have a free function. */
typedef GPtrArray * (*GabblePluginCreateChannelManagersImpl) (
GabblePlugin *plugin,
- GabblePluginConnection *plugin_connection,
TpBaseConnection *connection);
typedef GabbleSidecar * (*GabblePluginCreateSidecarFinishImpl) (
@@ -134,7 +133,7 @@ gboolean gabble_plugin_implements_sidecar (
void gabble_plugin_create_sidecar_async (
GabblePlugin *plugin,
const gchar *sidecar_interface,
- GabblePluginConnection *plugin_connection,
+ GabbleConnection *connection,
WockySession *session,
GAsyncReadyCallback callback,
gpointer user_data);
@@ -156,7 +155,6 @@ const gchar *gabble_plugin_presence_status_for_privacy_list (
const gchar *list_name);
GPtrArray * gabble_plugin_create_channel_managers (GabblePlugin *plugin,
- GabblePluginConnection *plugin_connection,
TpBaseConnection *connection);
/**
diff --git a/gabble/telepathy-gabble-uninstalled.pc.in b/gabble/telepathy-gabble-uninstalled.pc.in
index c4b1847ba..72aa5d1aa 100644
--- a/gabble/telepathy-gabble-uninstalled.pc.in
+++ b/gabble/telepathy-gabble-uninstalled.pc.in
@@ -12,5 +12,4 @@ Description: XMPP backend for the Telepathy framework
Version: @VERSION@
Requires: pkg-config >= 0.21
Requires.private: glib-2.0 >= 2.16, gobject-2.0 >= 2.16, gio-2.0, telepathy-glib >= 0.7.37
-Libs: ${abs_top_builddir}/src/libgabble-plugins.la
Cflags: -I${abs_top_srcdir} -I${abs_top_srcdir}/lib/ext/wocky
diff --git a/gabble/telepathy-gabble.pc.in b/gabble/telepathy-gabble.pc.in
index 40644ad30..d566118ac 100644
--- a/gabble/telepathy-gabble.pc.in
+++ b/gabble/telepathy-gabble.pc.in
@@ -12,5 +12,4 @@ Description: XMPP backend for the Telepathy framework
Version: @VERSION@
Requires: pkg-config >= 0.21
Requires.private: glib-2.0 >= 2.16, gobject-2.0 >= 2.16, gio-2.0, telepathy-glib >= 0.7.37
-Libs: -L${libdir} -lgabble-plugins
Cflags: -I${includedir}/telepathy-gabble-0