diff options
author | Jonny Lamb <jonny.lamb@collabora.co.uk> | 2011-09-01 14:19:52 +0100 |
---|---|---|
committer | Jonny Lamb <jonny.lamb@collabora.co.uk> | 2011-09-01 14:19:52 +0100 |
commit | 587da15932d178ad289e81b039dcabb4e90984c5 (patch) | |
tree | 02272e729d66f92caf9ee4ed96c5b2c3daf48f07 /src | |
parent | 1afd2d8e2fab78542467b2f36f08fc6e84523f91 (diff) |
gabble: add capabilities.h and caps-channel-manager.h as public API
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 4 | ||||
-rw-r--r-- | src/auth-manager.c | 2 | ||||
-rw-r--r-- | src/capabilities.c | 2 | ||||
-rw-r--r-- | src/capabilities.h | 73 | ||||
-rw-r--r-- | src/caps-channel-manager.c | 2 | ||||
-rw-r--r-- | src/caps-channel-manager.h | 107 | ||||
-rw-r--r-- | src/caps-hash.c | 2 | ||||
-rw-r--r-- | src/connection.c | 4 | ||||
-rw-r--r-- | src/connection.h | 2 | ||||
-rw-r--r-- | src/ft-manager.c | 2 | ||||
-rw-r--r-- | src/im-factory.c | 2 | ||||
-rw-r--r-- | src/jingle-session.c | 2 | ||||
-rw-r--r-- | src/legacy-caps.h | 2 | ||||
-rw-r--r-- | src/media-factory.c | 2 | ||||
-rw-r--r-- | src/muc-factory.c | 2 | ||||
-rw-r--r-- | src/presence-cache.c | 4 | ||||
-rw-r--r-- | src/presence.c | 2 | ||||
-rw-r--r-- | src/presence.h | 2 | ||||
-rw-r--r-- | src/private-tubes-factory.c | 3 | ||||
-rw-r--r-- | src/roomlist-manager.c | 2 | ||||
-rw-r--r-- | src/roster.c | 2 | ||||
-rw-r--r-- | src/search-manager.c | 2 | ||||
-rw-r--r-- | src/server-tls-manager.c | 2 |
23 files changed, 24 insertions, 205 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 00f802a1..99367f1c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -44,12 +44,12 @@ libgabble_convenience_la_SOURCES = \ call-stream.h \ call-stream.c \ $(top_srcdir)/gabble/capabilities-set.h \ - capabilities.h \ + $(top_srcdir)/gabble/capabilities.h \ capabilities.c \ $(top_srcdir)/gabble/caps-hash.h \ caps-hash.h \ caps-hash.c \ - caps-channel-manager.h \ + $(top_srcdir)/gabble/caps-channel-manager.h \ caps-channel-manager.c \ conn-aliasing.h \ conn-aliasing.c \ diff --git a/src/auth-manager.c b/src/auth-manager.c index a9424854..d9638eed 100644 --- a/src/auth-manager.c +++ b/src/auth-manager.c @@ -28,7 +28,7 @@ #define DEBUG_FLAG GABBLE_DEBUG_AUTH -#include "caps-channel-manager.h" +#include "gabble/caps-channel-manager.h" #include "server-sasl-channel.h" #include "connection.h" #include "debug.h" diff --git a/src/capabilities.c b/src/capabilities.c index b3ef11e8..d0b36e78 100644 --- a/src/capabilities.c +++ b/src/capabilities.c @@ -19,7 +19,7 @@ */ #include "config.h" -#include "capabilities.h" +#include "gabble/capabilities.h" #include <stdlib.h> #include <string.h> diff --git a/src/capabilities.h b/src/capabilities.h deleted file mode 100644 index 811f1137..00000000 --- a/src/capabilities.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - * capabilities.h - Connection.Interface.Capabilities constants and utilities - * 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_CAPABILITIES__H__ -#define __GABBLE_CAPABILITIES__H__ - -#include <glib-object.h> - -#include "gabble/capabilities-set.h" - -/* Pseudo-capabilities for buggy or strange implementations, represented as - * strings starting with a character not allowed in XML (the ASCII beep :-) */ -#define QUIRK_PREFIX_CHAR '\x07' -#define QUIRK_PREFIX "\x07" -/* Gabble 0.7.x with 16 <= x < 29 omits @creator on <content/> */ -#define QUIRK_OMITS_CONTENT_CREATORS "\x07omits-content-creators" -/* The Google Webmail client doesn't support some features */ -#define QUIRK_GOOGLE_WEBMAIL_CLIENT "\x07google-webmail-client" - -/* Some useful capability sets for Jingle etc. */ -const GabbleCapabilitySet *gabble_capabilities_get_legacy (void); -const GabbleCapabilitySet *gabble_capabilities_get_any_audio (void); -const GabbleCapabilitySet *gabble_capabilities_get_any_video (void); -const GabbleCapabilitySet *gabble_capabilities_get_any_audio_video (void); -const GabbleCapabilitySet *gabble_capabilities_get_any_google_av (void); -const GabbleCapabilitySet *gabble_capabilities_get_any_jingle_av (void); -const GabbleCapabilitySet *gabble_capabilities_get_any_transport (void); -const GabbleCapabilitySet *gabble_capabilities_get_geoloc_notify (void); -const GabbleCapabilitySet *gabble_capabilities_get_olpc_notify (void); - -/* XEP-0115 version 1.3: - * - * "The names of the feature bundles MUST NOT be used for semantic purposes: - * they are merely opaque identifiers" - * - * However, some old Jabber clients (e.g. Gabble 0.2) and various Google - * clients require the bundle names "voice-v1" and "video-v1". We keep these - * names for compatibility. - */ -#define BUNDLE_SHARE_V1 "share-v1" -#define BUNDLE_VOICE_V1 "voice-v1" -#define BUNDLE_VIDEO_V1 "video-v1" -#define BUNDLE_PMUC_V1 "pmuc-v1" - -const GabbleCapabilitySet *gabble_capabilities_get_bundle_share_v1 (void); -const GabbleCapabilitySet *gabble_capabilities_get_bundle_voice_v1 (void); -const GabbleCapabilitySet *gabble_capabilities_get_bundle_video_v1 (void); - -/* Return the capabilities we always have */ -const GabbleCapabilitySet *gabble_capabilities_get_fixed_caps (void); - -void gabble_capabilities_init (gpointer conn); -void gabble_capabilities_finalize (gpointer conn); - -#endif /* __GABBLE_CAPABILITIES__H__ */ - diff --git a/src/caps-channel-manager.c b/src/caps-channel-manager.c index 65005009..a7f8880d 100644 --- a/src/caps-channel-manager.c +++ b/src/caps-channel-manager.c @@ -21,7 +21,7 @@ */ #include "config.h" -#include "caps-channel-manager.h" +#include "gabble/caps-channel-manager.h" #include <telepathy-glib/dbus.h> #include <telepathy-glib/channel-manager.h> diff --git a/src/caps-channel-manager.h b/src/caps-channel-manager.h deleted file mode 100644 index 9442476a..00000000 --- a/src/caps-channel-manager.h +++ /dev/null @@ -1,107 +0,0 @@ -/* - * caps-channel-manager.h - interface holding capabilities functions for - * channel managers - * - * Copyright (C) 2008 Collabora Ltd. - * Copyright (C) 2008 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_CAPS_CHANNEL_MANAGER_H -#define GABBLE_CAPS_CHANNEL_MANAGER_H - -#include <glib-object.h> -#include <telepathy-glib/exportable-channel.h> -#include <telepathy-glib/handle.h> - -#include "capabilities.h" - -G_BEGIN_DECLS - -#define GABBLE_TYPE_CAPS_CHANNEL_MANAGER \ - (gabble_caps_channel_manager_get_type ()) - -#define GABBLE_CAPS_CHANNEL_MANAGER(obj) \ - (G_TYPE_CHECK_INSTANCE_CAST ((obj), \ - GABBLE_TYPE_CAPS_CHANNEL_MANAGER, GabbleCapsChannelManager)) - -#define GABBLE_IS_CAPS_CHANNEL_MANAGER(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \ - GABBLE_TYPE_CAPS_CHANNEL_MANAGER)) - -#define GABBLE_CAPS_CHANNEL_MANAGER_GET_INTERFACE(obj) \ - (G_TYPE_INSTANCE_GET_INTERFACE ((obj), \ - GABBLE_TYPE_CAPS_CHANNEL_MANAGER, GabbleCapsChannelManagerInterface)) - -typedef struct _GabbleCapsChannelManager GabbleCapsChannelManager; -typedef struct _GabbleCapsChannelManagerInterface GabbleCapsChannelManagerInterface; - -/* virtual methods */ - -typedef void (*GabbleCapsChannelManagerGetContactCapsFunc) ( - GabbleCapsChannelManager *manager, - TpHandle handle, - const GabbleCapabilitySet *caps, - GPtrArray *arr); - -typedef void (*GabbleCapsChannelManagerResetCapsFunc) ( - GabbleCapsChannelManager *manager); - -typedef void (*GabbleCapsChannelManagerAddCapFunc) ( - GabbleCapsChannelManager *manager, - GHashTable *cap, - GabbleCapabilitySet *cap_set); - -typedef void (*GabbleCapsChannelManagerRepresentClientFunc) ( - GabbleCapsChannelManager *manager, - const gchar *client_name, - const GPtrArray *filters, - const gchar * const *cap_tokens, - GabbleCapabilitySet *cap_set, - GPtrArray *data_forms); - -void gabble_caps_channel_manager_reset_capabilities ( - GabbleCapsChannelManager *caps_manager); - -void gabble_caps_channel_manager_get_contact_capabilities ( - GabbleCapsChannelManager *caps_manager, - TpHandle handle, - const GabbleCapabilitySet *caps, - GPtrArray *arr); - -void gabble_caps_channel_manager_represent_client ( - GabbleCapsChannelManager *caps_manager, - const gchar *client_name, - const GPtrArray *filters, - const gchar * const *cap_tokens, - GabbleCapabilitySet *cap_set, - GPtrArray *data_forms); - -struct _GabbleCapsChannelManagerInterface { - GTypeInterface parent; - - GabbleCapsChannelManagerResetCapsFunc reset_caps; - GabbleCapsChannelManagerGetContactCapsFunc get_contact_caps; - GabbleCapsChannelManagerRepresentClientFunc represent_client; - - gpointer priv; -}; - -GType gabble_caps_channel_manager_get_type (void); - -G_END_DECLS - -#endif diff --git a/src/caps-hash.c b/src/caps-hash.c index c2bbb598..1518748e 100644 --- a/src/caps-hash.c +++ b/src/caps-hash.c @@ -35,7 +35,7 @@ #define DEBUG_FLAG GABBLE_DEBUG_PRESENCE #include "base64.h" -#include "capabilities.h" +#include "gabble/capabilities.h" #include "debug.h" #include "namespaces.h" #include "presence-cache.h" diff --git a/src/connection.c b/src/connection.c index e1404603..486ed841 100644 --- a/src/connection.c +++ b/src/connection.c @@ -51,8 +51,8 @@ #define DEBUG_FLAG GABBLE_DEBUG_CONNECTION #include "bytestream-factory.h" -#include "capabilities.h" -#include "caps-channel-manager.h" +#include "gabble/capabilities.h" +#include "gabble/caps-channel-manager.h" #include "caps-hash.h" #include "auth-manager.h" #include "conn-aliasing.h" diff --git a/src/connection.h b/src/connection.h index 109f2d4f..b548243f 100644 --- a/src/connection.h +++ b/src/connection.h @@ -34,7 +34,7 @@ #include <wocky/wocky-pep-service.h> #include "gabble/connection.h" -#include "capabilities.h" +#include "gabble/capabilities.h" #include "error.h" #include "ft-manager.h" #include "jingle-factory.h" diff --git a/src/ft-manager.c b/src/ft-manager.c index 11006afc..b79881ac 100644 --- a/src/ft-manager.c +++ b/src/ft-manager.c @@ -30,7 +30,7 @@ #include "jingle-session.h" #include "jingle-share.h" -#include "caps-channel-manager.h" +#include "gabble/caps-channel-manager.h" #include "connection.h" #include "ft-manager.h" #include "error.h" diff --git a/src/im-factory.c b/src/im-factory.c index 08f19f6c..be518b27 100644 --- a/src/im-factory.c +++ b/src/im-factory.c @@ -36,7 +36,7 @@ #include "extensions/extensions.h" -#include "caps-channel-manager.h" +#include "gabble/caps-channel-manager.h" #include "connection.h" #include "debug.h" #include "disco.h" diff --git a/src/jingle-session.c b/src/jingle-session.c index f20c2d63..2981e3e8 100644 --- a/src/jingle-session.c +++ b/src/jingle-session.c @@ -30,7 +30,7 @@ #define DEBUG_FLAG GABBLE_DEBUG_MEDIA -#include "capabilities.h" +#include "gabble/capabilities.h" #include "connection.h" #include "conn-presence.h" #include "debug.h" diff --git a/src/legacy-caps.h b/src/legacy-caps.h index 080ac3b0..e2de46c3 100644 --- a/src/legacy-caps.h +++ b/src/legacy-caps.h @@ -23,7 +23,7 @@ #include <glib-object.h> -#include "capabilities.h" +#include "gabble/capabilities.h" typedef void (*TypeFlagsToCapsFunc) (guint typeflags, GabbleCapabilitySet *caps); typedef guint (*CapsToTypeFlagsFunc) (const GabbleCapabilitySet *caps); diff --git a/src/media-factory.c b/src/media-factory.c index 0c0b6c2d..e8ec9908 100644 --- a/src/media-factory.c +++ b/src/media-factory.c @@ -36,7 +36,7 @@ #define DEBUG_FLAG GABBLE_DEBUG_MEDIA -#include "caps-channel-manager.h" +#include "gabble/caps-channel-manager.h" #include "connection.h" #include "debug.h" #include "jingle-factory.h" diff --git a/src/muc-factory.c b/src/muc-factory.c index 1feb21a1..554b1504 100644 --- a/src/muc-factory.c +++ b/src/muc-factory.c @@ -36,7 +36,7 @@ #define DEBUG_FLAG GABBLE_DEBUG_MUC -#include "caps-channel-manager.h" +#include "gabble/caps-channel-manager.h" #include "connection.h" #include "conn-olpc.h" #include "debug.h" diff --git a/src/presence-cache.c b/src/presence-cache.c index e3d9970d..8917df39 100644 --- a/src/presence-cache.c +++ b/src/presence-cache.c @@ -46,8 +46,8 @@ #define DEBUG_FLAG GABBLE_DEBUG_PRESENCE -#include "capabilities.h" -#include "caps-channel-manager.h" +#include "gabble/capabilities.h" +#include "gabble/caps-channel-manager.h" #include "conn-presence.h" #include "debug.h" #include "disco.h" diff --git a/src/presence.c b/src/presence.c index 1f95529c..8be1998f 100644 --- a/src/presence.c +++ b/src/presence.c @@ -25,7 +25,7 @@ #include <telepathy-glib/channel-manager.h> #include <wocky/wocky-utils.h> -#include "capabilities.h" +#include "gabble/capabilities.h" #include "conn-presence.h" #include "presence-cache.h" #include "namespaces.h" diff --git a/src/presence.h b/src/presence.h index 5406bd84..50d6945a 100644 --- a/src/presence.h +++ b/src/presence.h @@ -24,7 +24,7 @@ #include <glib-object.h> -#include "capabilities.h" +#include "gabble/capabilities.h" #include "connection.h" #include "types.h" diff --git a/src/private-tubes-factory.c b/src/private-tubes-factory.c index b2b3200f..52c10a84 100644 --- a/src/private-tubes-factory.c +++ b/src/private-tubes-factory.c @@ -36,8 +36,7 @@ #define DEBUG_FLAG GABBLE_DEBUG_TUBES -#include "caps-channel-manager.h" -#include "capabilities.h" +#include "gabble/caps-channel-manager.h" #include "connection.h" #include "debug.h" #include "muc-channel.h" diff --git a/src/roomlist-manager.c b/src/roomlist-manager.c index 76abee68..5f38a102 100644 --- a/src/roomlist-manager.c +++ b/src/roomlist-manager.c @@ -33,7 +33,7 @@ #define DEBUG_FLAG GABBLE_DEBUG_MUC -#include "caps-channel-manager.h" +#include "gabble/caps-channel-manager.h" #include "connection.h" #include "debug.h" #include "namespaces.h" diff --git a/src/roster.c b/src/roster.c index 48d2461f..7c712a2b 100644 --- a/src/roster.c +++ b/src/roster.c @@ -37,7 +37,7 @@ #define DEBUG_FLAG GABBLE_DEBUG_ROSTER -#include "caps-channel-manager.h" +#include "gabble/caps-channel-manager.h" #include "conn-aliasing.h" #include "conn-presence.h" #include "conn-util.h" diff --git a/src/search-manager.c b/src/search-manager.c index d3c1fa57..fec4b74d 100644 --- a/src/search-manager.c +++ b/src/search-manager.c @@ -29,7 +29,7 @@ #define DEBUG_FLAG GABBLE_DEBUG_SEARCH -#include "caps-channel-manager.h" +#include "gabble/caps-channel-manager.h" #include "connection.h" #include "debug.h" #include "disco.h" diff --git a/src/server-tls-manager.c b/src/server-tls-manager.c index 62ab8865..48364512 100644 --- a/src/server-tls-manager.c +++ b/src/server-tls-manager.c @@ -23,7 +23,7 @@ #define DEBUG_FLAG GABBLE_DEBUG_TLS #include "debug.h" -#include "caps-channel-manager.h" +#include "gabble/caps-channel-manager.h" #include "connection.h" #include "server-tls-channel.h" #include "util.h" |