From 622aefe47cee6dea4e2b14e30f206bb2cadf1d29 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Fri, 4 May 2012 14:48:53 +0100 Subject: [PATCH 2/2] Use meta-headers for everything --- configure.ac | 2 +- gabble/caps-channel-manager.h | 3 +-- gabble/connection.h | 3 +-- gabble/plugin-connection.h | 3 +-- gabble/plugin.h | 3 +-- plugins/console.h | 2 +- src/addressing-util.h | 2 +- src/auth-manager.c | 5 ++-- src/auth-manager.h | 4 +++- src/base-call-channel.c | 12 ++-------- src/base-call-channel.h | 5 ++-- src/bytestream-factory.c | 3 ++- src/bytestream-factory.h | 2 +- src/bytestream-ibb.c | 3 ++- src/bytestream-ibb.h | 2 +- src/bytestream-muc.c | 3 ++- src/bytestream-muc.h | 2 +- src/bytestream-multiple.c | 4 +++- src/bytestream-socks5.c | 4 +++- src/bytestream-socks5.h | 2 +- src/call-channel.c | 9 ++----- src/call-content.c | 8 ++----- src/call-content.h | 2 +- src/call-member.h | 2 +- src/call-muc-channel.c | 5 ++-- src/call-stream.c | 7 ++---- src/call-stream.h | 2 +- src/capabilities.c | 7 ++---- src/caps-channel-manager.c | 4 +--- src/conn-addressing.c | 4 ++-- src/conn-aliasing.c | 7 +++--- src/conn-avatars.c | 5 ++-- src/conn-client-types.c | 3 ++- src/conn-contact-info.c | 5 ++-- src/conn-location.c | 4 ++-- src/conn-mail-notif.c | 8 +++---- src/conn-olpc.c | 3 +-- src/conn-presence.c | 7 ++---- src/conn-sidecars.c | 2 +- src/connection-manager.c | 6 +++-- src/connection-manager.h | 2 +- src/connection.c | 10 ++------ src/connection.h | 6 +---- src/debug.c | 4 ++-- src/disco.c | 2 +- src/ft-channel.c | 10 ++------ src/ft-channel.h | 2 +- src/ft-manager.c | 10 ++------ src/gabble.c | 7 ++---- src/im-channel.c | 11 +++------ src/im-channel.h | 4 +--- src/im-factory.c | 6 ++--- src/jingle-info.c | 2 +- src/legacy-caps.c | 2 +- src/media-channel-hold.c | 2 +- src/media-channel-internal.h | 2 +- src/media-channel.c | 52 ++++++++++++++++++----------------------- src/media-channel.h | 3 +-- src/media-factory.c | 6 ++--- src/media-stream.c | 9 +++---- src/media-stream.h | 5 +--- src/message-util.c | 2 +- src/muc-channel.c | 8 ++----- src/muc-channel.h | 5 +--- src/muc-factory.c | 8 +++---- src/olpc-activity.h | 3 +-- src/plugin-connection.c | 2 +- src/plugin-loader.c | 3 +-- src/plugin-loader.h | 3 +-- src/plugin.c | 4 +--- src/presence-cache.c | 3 +-- src/presence.c | 2 +- src/private-tubes-factory.c | 9 +++---- src/private-tubes-factory.h | 3 ++- src/protocol.c | 5 ++-- src/protocol.h | 2 +- src/request-pipeline.c | 2 +- src/room-config.h | 2 +- src/roomlist-channel.c | 11 +++------ src/roomlist-channel.h | 2 +- src/roomlist-manager.c | 7 +++--- src/roster.c | 5 ++-- src/roster.h | 2 +- src/search-channel.c | 7 ++---- src/search-channel.h | 2 +- src/search-manager.c | 5 ++-- src/server-sasl-channel.c | 11 ++------- src/server-sasl-channel.h | 2 +- src/server-tls-channel.c | 6 ++--- src/server-tls-channel.h | 2 +- src/server-tls-manager.c | 3 ++- src/server-tls-manager.h | 3 +-- src/tls-certificate.c | 2 +- src/tls-certificate.h | 2 +- src/tube-dbus.c | 8 ++----- src/tube-dbus.h | 6 ++--- src/tube-iface.c | 3 ++- src/tube-iface.h | 2 +- src/tube-stream.c | 8 ++----- src/tube-stream.h | 5 ++-- src/tubes-channel.c | 12 ++-------- src/tubes-channel.h | 3 +-- src/types.h | 2 +- src/util.c | 5 ++-- src/util.h | 3 +-- src/vcard-manager.c | 4 ++-- tests/test-handles.c | 5 ++-- 107 files changed, 198 insertions(+), 332 deletions(-) diff --git a/configure.ac b/configure.ac index 0d51fc8..12303e2 100644 --- a/configure.ac +++ b/configure.ac @@ -296,7 +296,7 @@ PKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.1.0, dbus-glib-1 >= 0.82]) AC_SUBST(DBUS_CFLAGS) AC_SUBST(DBUS_LIBS) -PKG_CHECK_MODULES(TP_GLIB, [telepathy-glib >= 0.18.0]) +PKG_CHECK_MODULES(TP_GLIB, [telepathy-glib >= 0.19.0]) AC_SUBST(TP_GLIB_CFLAGS) AC_SUBST(TP_GLIB_LIBS) diff --git a/gabble/caps-channel-manager.h b/gabble/caps-channel-manager.h index 9442476..a432839 100644 --- a/gabble/caps-channel-manager.h +++ b/gabble/caps-channel-manager.h @@ -24,8 +24,7 @@ #define GABBLE_CAPS_CHANNEL_MANAGER_H #include -#include -#include +#include #include "capabilities.h" diff --git a/gabble/connection.h b/gabble/connection.h index 5c7bf51..0365699 100644 --- a/gabble/connection.h +++ b/gabble/connection.h @@ -21,8 +21,7 @@ #ifndef GABBLE_PLUGINS_CONNECTION_H #define GABBLE_PLUGINS_CONNECTION_H -#include -#include +#include #include #include diff --git a/gabble/plugin-connection.h b/gabble/plugin-connection.h index 66302a7..1dd0638 100644 --- a/gabble/plugin-connection.h +++ b/gabble/plugin-connection.h @@ -22,8 +22,7 @@ #include -#include -#include +#include #include #include diff --git a/gabble/plugin.h b/gabble/plugin.h index faf72a9..fcc7290 100644 --- a/gabble/plugin.h +++ b/gabble/plugin.h @@ -24,8 +24,7 @@ #include #include -#include -#include +#include #include #include diff --git a/plugins/console.h b/plugins/console.h index 9a3d5d6..e646d06 100644 --- a/plugins/console.h +++ b/plugins/console.h @@ -21,7 +21,7 @@ #include #include -#include +#include typedef struct _GabbleConsolePlugin GabbleConsolePlugin; typedef struct _GabbleConsolePluginClass GabbleConsolePluginClass; diff --git a/src/addressing-util.h b/src/addressing-util.h index 9835e0d..378d1fe 100644 --- a/src/addressing-util.h +++ b/src/addressing-util.h @@ -20,7 +20,7 @@ #ifndef __GABBLE_UTIL_ADDRESSING_H__ #define __GABBLE_UTIL_ADDRESSING_H__ -#include +#include const gchar * const * gabble_get_addressable_uri_schemes (void); diff --git a/src/auth-manager.c b/src/auth-manager.c index 57a8bbd..fd90bf5 100644 --- a/src/auth-manager.c +++ b/src/auth-manager.c @@ -20,9 +20,8 @@ #include "config.h" #include "auth-manager.h" -#include -#include -#include +#include +#include #include diff --git a/src/auth-manager.h b/src/auth-manager.h index bdf7ebf..dad5115 100644 --- a/src/auth-manager.h +++ b/src/auth-manager.h @@ -22,7 +22,9 @@ #include #include -#include + +#include +#include G_BEGIN_DECLS diff --git a/src/base-call-channel.c b/src/base-call-channel.c index 321e3da..edf8bc9 100644 --- a/src/base-call-channel.c +++ b/src/base-call-channel.c @@ -24,16 +24,8 @@ #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include #include "util.h" #include "call-content.h" diff --git a/src/base-call-channel.h b/src/base-call-channel.h index 068b2da..04add06 100644 --- a/src/base-call-channel.h +++ b/src/base-call-channel.h @@ -23,9 +23,8 @@ #include -#include -#include -#include +#include +#include #include "jingle-content.h" #include "call-member.h" diff --git a/src/bytestream-factory.c b/src/bytestream-factory.c index 725f06e..0837692 100644 --- a/src/bytestream-factory.c +++ b/src/bytestream-factory.c @@ -26,7 +26,8 @@ #include #include #include -#include +#include +#include #define DEBUG_FLAG GABBLE_DEBUG_BYTESTREAM diff --git a/src/bytestream-factory.h b/src/bytestream-factory.h index 7a86cd4..733f1b8 100644 --- a/src/bytestream-factory.h +++ b/src/bytestream-factory.h @@ -21,7 +21,7 @@ #define __BYTESTREAM_FACTORY_H__ #include -#include +#include #include "types.h" #include "bytestream-iface.h" #include "bytestream-ibb.h" diff --git a/src/bytestream-ibb.c b/src/bytestream-ibb.c index bfa1b56..6f85567 100644 --- a/src/bytestream-ibb.c +++ b/src/bytestream-ibb.c @@ -24,7 +24,8 @@ #include #include -#include +#include +#include #define DEBUG_FLAG GABBLE_DEBUG_BYTESTREAM diff --git a/src/bytestream-ibb.h b/src/bytestream-ibb.h index fa1af3a..2d96baf 100644 --- a/src/bytestream-ibb.h +++ b/src/bytestream-ibb.h @@ -22,7 +22,7 @@ #include #include -#include +#include G_BEGIN_DECLS diff --git a/src/bytestream-muc.c b/src/bytestream-muc.c index 4a803bc..230f836 100644 --- a/src/bytestream-muc.c +++ b/src/bytestream-muc.c @@ -24,7 +24,8 @@ #include #include -#include +#include +#include #define DEBUG_FLAG GABBLE_DEBUG_BYTESTREAM diff --git a/src/bytestream-muc.h b/src/bytestream-muc.h index 06dcd26..393410e 100644 --- a/src/bytestream-muc.h +++ b/src/bytestream-muc.h @@ -22,7 +22,7 @@ #include #include -#include +#include G_BEGIN_DECLS diff --git a/src/bytestream-multiple.c b/src/bytestream-multiple.c index 07243e1..7dd19d8 100644 --- a/src/bytestream-multiple.c +++ b/src/bytestream-multiple.c @@ -22,7 +22,9 @@ #include #include -#include + +#include +#include #define DEBUG_FLAG GABBLE_DEBUG_BYTESTREAM diff --git a/src/bytestream-socks5.c b/src/bytestream-socks5.c index 12bd7c5..7369e7f 100644 --- a/src/bytestream-socks5.c +++ b/src/bytestream-socks5.c @@ -44,7 +44,9 @@ #include #include -#include + +#include +#include #include #include diff --git a/src/bytestream-socks5.h b/src/bytestream-socks5.h index 524812f..f3704e4 100644 --- a/src/bytestream-socks5.h +++ b/src/bytestream-socks5.h @@ -24,7 +24,7 @@ #include #include -#include +#include G_BEGIN_DECLS diff --git a/src/call-channel.c b/src/call-channel.c index affa839..63dc023 100644 --- a/src/call-channel.c +++ b/src/call-channel.c @@ -25,13 +25,8 @@ #include -#include -#include -#include -#include -#include -#include -#include +#include +#include #include "util.h" #include "call-channel.h" diff --git a/src/call-content.c b/src/call-content.c index 8ca94be..ab8b00b 100644 --- a/src/call-content.c +++ b/src/call-content.c @@ -21,12 +21,8 @@ #include #include -#include -#include -#include -#include -#include -#include +#include +#include #include "call-member.h" #include "call-content.h" diff --git a/src/call-content.h b/src/call-content.h index ff3205f..70df540 100644 --- a/src/call-content.h +++ b/src/call-content.h @@ -23,7 +23,7 @@ #include -#include +#include #include "jingle-content.h" #include "call-member-content.h" diff --git a/src/call-member.h b/src/call-member.h index 5554a9e..4b052fa 100644 --- a/src/call-member.h +++ b/src/call-member.h @@ -23,7 +23,7 @@ #include -#include +#include #include "types.h" #include "jingle-session.h" diff --git a/src/call-muc-channel.c b/src/call-muc-channel.c index fdd5e71..65911ed 100644 --- a/src/call-muc-channel.c +++ b/src/call-muc-channel.c @@ -22,9 +22,8 @@ #include #include -#include -#include -#include +#include +#include #include #include "call-content.h" diff --git a/src/call-stream.c b/src/call-stream.c index a25365d..bc9a099 100644 --- a/src/call-stream.c +++ b/src/call-stream.c @@ -23,11 +23,8 @@ #include #include -#include -#include -#include -#include -#include +#include +#include #include "call-stream.h" #include "connection.h" diff --git a/src/call-stream.h b/src/call-stream.h index ed8bb76..e30593e 100644 --- a/src/call-stream.h +++ b/src/call-stream.h @@ -23,7 +23,7 @@ #include -#include +#include #include "jingle-types.h" diff --git a/src/capabilities.c b/src/capabilities.c index 14a396a..4e30d1e 100644 --- a/src/capabilities.c +++ b/src/capabilities.c @@ -24,11 +24,8 @@ #include #include -#include -#include -#include -#include -#include +#include +#include #define DEBUG_FLAG GABBLE_DEBUG_PRESENCE #include "debug.h" diff --git a/src/caps-channel-manager.c b/src/caps-channel-manager.c index dea13a6..c6b7e16 100644 --- a/src/caps-channel-manager.c +++ b/src/caps-channel-manager.c @@ -23,9 +23,7 @@ #include "config.h" #include "gabble/caps-channel-manager.h" -#include -#include - +#include #define DEBUG_FLAG GABBLE_DEBUG_PRESENCE #include "debug.h" diff --git a/src/conn-addressing.c b/src/conn-addressing.c index 6842ae0..7a2ae63 100644 --- a/src/conn-addressing.c +++ b/src/conn-addressing.c @@ -21,8 +21,8 @@ #include -#include -#include +#include +#include #include "extensions/extensions.h" diff --git a/src/conn-aliasing.c b/src/conn-aliasing.c index f48758e..74aac20 100644 --- a/src/conn-aliasing.c +++ b/src/conn-aliasing.c @@ -22,10 +22,9 @@ #include "conn-aliasing.h" #include -#include -#include -#include -#include + +#include +#include #define DEBUG_FLAG GABBLE_DEBUG_CONNECTION diff --git a/src/conn-avatars.c b/src/conn-avatars.c index 3a12ce2..94e5ead 100644 --- a/src/conn-avatars.c +++ b/src/conn-avatars.c @@ -24,9 +24,8 @@ #include -#include -#include -#include +#include +#include #include "base64.h" #include "presence.h" diff --git a/src/conn-client-types.c b/src/conn-client-types.c index 012749c..1a5ff1e 100644 --- a/src/conn-client-types.c +++ b/src/conn-client-types.c @@ -22,7 +22,8 @@ #include #include -#include +#include +#include #include diff --git a/src/conn-contact-info.c b/src/conn-contact-info.c index a78f172..1f05958 100644 --- a/src/conn-contact-info.c +++ b/src/conn-contact-info.c @@ -24,9 +24,8 @@ #include -#include -#include -#include +#include +#include #include "vcard-manager.h" diff --git a/src/conn-location.c b/src/conn-location.c index b9ac054..758a904 100644 --- a/src/conn-location.c +++ b/src/conn-location.c @@ -8,8 +8,8 @@ #define DEBUG_FLAG GABBLE_DEBUG_LOCATION -#include -#include +#include +#include #include #include diff --git a/src/conn-mail-notif.c b/src/conn-mail-notif.c index 2fe12e4..c5e3fad 100644 --- a/src/conn-mail-notif.c +++ b/src/conn-mail-notif.c @@ -33,11 +33,9 @@ #include #include -#include -#include -#include -#include -#include + +#include +#include #include diff --git a/src/conn-olpc.c b/src/conn-olpc.c index 243d2df..cc844ce 100644 --- a/src/conn-olpc.c +++ b/src/conn-olpc.c @@ -23,8 +23,7 @@ #include #include -#include -#include +#include #define DEBUG_FLAG GABBLE_DEBUG_OLPC diff --git a/src/conn-presence.c b/src/conn-presence.c index 9dfd6b6..4e8b7c8 100644 --- a/src/conn-presence.c +++ b/src/conn-presence.c @@ -24,11 +24,8 @@ #include #include -#include -#include -#include -#include -#include +#include +#include #include diff --git a/src/conn-sidecars.c b/src/conn-sidecars.c index 39c3c00..7d00d6a 100644 --- a/src/conn-sidecars.c +++ b/src/conn-sidecars.c @@ -20,7 +20,7 @@ #include "conn-sidecars.h" -#include +#include #include "extensions/extensions.h" diff --git a/src/connection-manager.c b/src/connection-manager.c index b2a0edb..4031d49 100644 --- a/src/connection-manager.c +++ b/src/connection-manager.c @@ -25,8 +25,10 @@ #include #include -#include -#include + +#include +#include + #include #include "connection.h" diff --git a/src/connection-manager.h b/src/connection-manager.h index 775bba7..fc269e8 100644 --- a/src/connection-manager.h +++ b/src/connection-manager.h @@ -22,7 +22,7 @@ #define __GABBLE_CONNECTION_MANAGER_H__ #include -#include +#include G_BEGIN_DECLS diff --git a/src/connection.c b/src/connection.c index c1e5946..3756e79 100644 --- a/src/connection.c +++ b/src/connection.c @@ -30,14 +30,8 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include #include "extensions/extensions.h" diff --git a/src/connection.h b/src/connection.h index 50734b7..39c961d 100644 --- a/src/connection.h +++ b/src/connection.h @@ -25,11 +25,7 @@ #include #include -#include -#include -#include -#include -#include +#include #include diff --git a/src/debug.c b/src/debug.c index a7616f7..8e3dd0c 100644 --- a/src/debug.c +++ b/src/debug.c @@ -16,8 +16,8 @@ #include #include -#include -#include + +#include static GabbleDebugFlags flags = 0; diff --git a/src/disco.c b/src/disco.c index 6f142a4..20726dd 100644 --- a/src/disco.c +++ b/src/disco.c @@ -28,7 +28,7 @@ #include #include -#include +#include #define DEBUG_FLAG GABBLE_DEBUG_DISCO diff --git a/src/ft-channel.c b/src/ft-channel.c index 57b8912..10ee2b7 100644 --- a/src/ft-channel.c +++ b/src/ft-channel.c @@ -48,14 +48,8 @@ #include "presence-cache.h" #include "util.h" -#include -#include -#include -#include -#include -#include -#include - +#include +#include static void file_transfer_iface_init (gpointer g_iface, gpointer iface_data); static void transferred_chunk (GabbleFileTransferChannel *self, guint64 count); diff --git a/src/ft-channel.h b/src/ft-channel.h index 323c1e6..8794364 100644 --- a/src/ft-channel.h +++ b/src/ft-channel.h @@ -26,7 +26,7 @@ #include #include -#include +#include typedef struct _GabbleFileTransferChannel GabbleFileTransferChannel; diff --git a/src/ft-manager.c b/src/ft-manager.c index a6bb130..1ee821d 100644 --- a/src/ft-manager.c +++ b/src/ft-manager.c @@ -45,14 +45,8 @@ #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include #define DEBUG_FLAG GABBLE_DEBUG_FT #include "debug.h" diff --git a/src/gabble.c b/src/gabble.c index 0d2fb6e..f6bbf2c 100644 --- a/src/gabble.c +++ b/src/gabble.c @@ -27,11 +27,8 @@ #include -#include -#include -#include -#include -#include +#include + #include #include "debug.h" diff --git a/src/im-channel.c b/src/im-channel.c index d294c3a..85cf910 100644 --- a/src/im-channel.c +++ b/src/im-channel.c @@ -24,14 +24,9 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include + +#include +#include #define DEBUG_FLAG GABBLE_DEBUG_IM #include "connection.h" diff --git a/src/im-channel.h b/src/im-channel.h index fdbae19..076565e 100644 --- a/src/im-channel.h +++ b/src/im-channel.h @@ -24,9 +24,7 @@ #include #include -#include -#include -#include +#include G_BEGIN_DECLS diff --git a/src/im-factory.c b/src/im-factory.c index 0459c2d..f3d7b1a 100644 --- a/src/im-factory.c +++ b/src/im-factory.c @@ -24,10 +24,8 @@ #include #include -#include -#include -#include -#include +#include +#include #include #define DEBUG_FLAG GABBLE_DEBUG_IM diff --git a/src/jingle-info.c b/src/jingle-info.c index 4bc15b5..7aed3bb 100644 --- a/src/jingle-info.c +++ b/src/jingle-info.c @@ -20,7 +20,7 @@ #include "jingle-info.h" #include -#include +#include #define DEBUG_FLAG GABBLE_DEBUG_MEDIA #include "debug.h" diff --git a/src/legacy-caps.c b/src/legacy-caps.c index 3f4ebde..827fc15 100644 --- a/src/legacy-caps.c +++ b/src/legacy-caps.c @@ -21,7 +21,7 @@ #include "config.h" #include "legacy-caps.h" -#include +#include #define DEBUG_FLAG GABBLE_DEBUG_PRESENCE #include "debug.h" diff --git a/src/media-channel-hold.c b/src/media-channel-hold.c index 646ab93..23b32c0 100644 --- a/src/media-channel-hold.c +++ b/src/media-channel-hold.c @@ -21,7 +21,7 @@ #include "media-channel.h" #include "media-channel-internal.h" -#include +#include #define DEBUG_FLAG GABBLE_DEBUG_MEDIA diff --git a/src/media-channel-internal.h b/src/media-channel-internal.h index 9264eac..ff931b5 100644 --- a/src/media-channel-internal.h +++ b/src/media-channel-internal.h @@ -26,7 +26,7 @@ #include -#include +#include #include "media-stream.h" #include "jingle-session.h" diff --git a/src/media-channel.c b/src/media-channel.c index 0721b29..5574670 100644 --- a/src/media-channel.c +++ b/src/media-channel.c @@ -26,14 +26,8 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include #define DEBUG_FLAG GABBLE_DEBUG_MEDIA @@ -1279,7 +1273,7 @@ _find_stream_by_id (GabbleMediaChannel *chan, return stream; } - g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT, + g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT, "given stream id %u does not exist", stream_id); return NULL; } @@ -1331,7 +1325,7 @@ gabble_media_channel_remove_streams (TpSvcChannelTypeStreamedMedia *iface, if (!gabble_jingle_session_can_modify_contents (priv->session)) { - GError e = { TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED, + GError e = { TP_ERROR, TP_ERROR_NOT_IMPLEMENTED, "Streams can't be removed from Google Talk calls" }; dbus_g_method_return_error (context, &e); return; @@ -1426,7 +1420,7 @@ gabble_media_channel_request_stream_direction (TpSvcChannelTypeStreamedMedia *if if (stream_direction > TP_MEDIA_STREAM_DIRECTION_BIDIRECTIONAL) { - g_set_error (&error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT, + g_set_error (&error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT, "given stream direction %u is not valid", stream_direction); dbus_g_method_return_error (context, error); g_error_free (error); @@ -1464,7 +1458,7 @@ gabble_media_channel_request_stream_direction (TpSvcChannelTypeStreamedMedia *if } else { - GError e = { TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED, + GError e = { TP_ERROR, TP_ERROR_NOT_IMPLEMENTED, "Stream direction can't be set to None in Google Talk calls" }; DEBUG ("%s", e.message); dbus_g_method_return_error (context, &e); @@ -1570,7 +1564,7 @@ pending_stream_request_maybe_fail (PendingStreamRequest *p, { if (content == p->contents[i]) { - GError e = { TP_ERRORS, TP_ERROR_NOT_AVAILABLE, + GError e = { TP_ERROR, TP_ERROR_NOT_AVAILABLE, "A stream was removed before it could be fully set up" }; /* return early */ @@ -1590,7 +1584,7 @@ pending_stream_request_free (gpointer data) if (p->context != NULL) { - GError e = { TP_ERRORS, TP_ERROR_CANCELLED, + GError e = { TP_ERROR, TP_ERROR_CANCELLED, "The session terminated before the requested streams could be added" }; @@ -1635,7 +1629,7 @@ _gabble_media_channel_request_contents (GabbleMediaChannel *chan, } else { - g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT, + g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT, "given media type %u is invalid", media_type); return FALSE; } @@ -1654,7 +1648,7 @@ _gabble_media_channel_request_contents (GabbleMediaChannel *chan, /* is a google call... we have no other option */ if (!gabble_jingle_session_can_modify_contents (priv->session)) { - g_set_error (error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE, + g_set_error (error, TP_ERROR, TP_ERROR_NOT_AVAILABLE, "Streams can't be added to ongoing Google Talk calls"); return FALSE; } @@ -1665,7 +1659,7 @@ _gabble_media_channel_request_contents (GabbleMediaChannel *chan, peer_resource, want_audio ? JINGLE_MEDIA_TYPE_AUDIO : JINGLE_MEDIA_TYPE_VIDEO)) { - g_set_error (error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE, + g_set_error (error, TP_ERROR, TP_ERROR_NOT_AVAILABLE, "member does not have the desired audio/video capabilities"); return FALSE; @@ -1699,7 +1693,7 @@ _gabble_media_channel_request_contents (GabbleMediaChannel *chan, if (!jingle_pick_best_resource (priv->conn, peer, want_audio, want_video, &transport_ns, &dialect, &peer_resource)) { - g_set_error (error, TP_ERRORS, TP_ERROR_NOT_CAPABLE, + g_set_error (error, TP_ERROR, TP_ERROR_NOT_CAPABLE, "member does not have the desired audio/video capabilities"); return FALSE; } @@ -1729,7 +1723,7 @@ _gabble_media_channel_request_contents (GabbleMediaChannel *chan, /* check it's not a ridiculous number of streams */ if ((priv->streams->len + media_types->len) > MAX_STREAMS) { - g_set_error (error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE, + g_set_error (error, TP_ERROR, TP_ERROR_NOT_AVAILABLE, "I think that's quite enough streams already"); return FALSE; } @@ -1790,7 +1784,7 @@ destroy_request (struct _delayed_request_streams_ctx *ctx, if (ctx->context != NULL) { GError *error = NULL; - g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE, + g_set_error (&error, TP_ERROR, TP_ERROR_NOT_AVAILABLE, "cannot add streams: peer has insufficient caps"); ctx->failed_cb (ctx->context, error); g_error_free (error); @@ -1917,7 +1911,7 @@ media_channel_request_streams (GabbleMediaChannel *self, if (priv->peer != 0 && priv->peer != contact_handle) { - g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE, + g_set_error (&error, TP_ERROR, TP_ERROR_NOT_AVAILABLE, "cannot add streams for %u: this channel's peer is %u", contact_handle, priv->peer); goto error; @@ -2080,11 +2074,11 @@ contact_is_media_capable (GabbleMediaChannel *chan, *wait_ret = wait; if (presence == NULL) - g_set_error (error, TP_ERRORS, TP_ERROR_OFFLINE, + g_set_error (error, TP_ERROR, TP_ERROR_OFFLINE, "contact %d (%s) has no presence available", peer, tp_handle_inspect (contact_handles, peer)); else - g_set_error (error, TP_ERRORS, TP_ERROR_NOT_CAPABLE, + g_set_error (error, TP_ERROR, TP_ERROR_NOT_CAPABLE, "contact %d (%s) doesn't have sufficient media caps", peer, tp_handle_inspect (contact_handles, peer)); @@ -2113,7 +2107,7 @@ gabble_media_channel_add_member (GObject *obj, */ if (priv->peer != 0 && priv->peer != handle) { - g_set_error (error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE, + g_set_error (error, TP_ERROR, TP_ERROR_NOT_AVAILABLE, "handle %u cannot be added: this channel's peer is %u", handle, priv->peer); return FALSE; @@ -2160,7 +2154,7 @@ gabble_media_channel_add_member (GObject *obj, /* is the call on hold? */ if (priv->hold_state != TP_LOCAL_HOLD_STATE_UNHELD) { - g_set_error (error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE, + g_set_error (error, TP_ERROR, TP_ERROR_NOT_AVAILABLE, "Can't answer a call while it's on hold"); return FALSE; } @@ -2182,7 +2176,7 @@ gabble_media_channel_add_member (GObject *obj, } } - g_set_error (error, TP_ERRORS, TP_ERROR_NOT_AVAILABLE, + g_set_error (error, TP_ERROR, TP_ERROR_NOT_AVAILABLE, "handle %u cannot be added in the current state", handle); return FALSE; } @@ -2233,7 +2227,7 @@ gabble_media_channel_remove_member (GObject *obj, jingle_reason = JINGLE_REASON_TIMEOUT; break; default: - g_set_error (error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT, + g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT, "%u doesn't make sense as a reason to end a call", reason); g_object_unref (chan); return FALSE; @@ -2966,7 +2960,7 @@ gabble_media_channel_ready (TpSvcMediaSessionHandler *iface, * error message describes the only legitimate situation in which this * could arise. */ - GError e = { TP_ERRORS, TP_ERROR_NOT_AVAILABLE, "call has already ended" }; + GError e = { TP_ERROR, TP_ERROR_NOT_AVAILABLE, "call has already ended" }; DEBUG ("no session, returning an error."); dbus_g_method_return_error (context, &e); @@ -3013,7 +3007,7 @@ gabble_media_channel_error (TpSvcMediaSessionHandler *iface, * error message describes the only legitimate situation in which this * could arise. */ - GError e = { TP_ERRORS, TP_ERROR_NOT_AVAILABLE, "call has already ended" }; + GError e = { TP_ERROR, TP_ERROR_NOT_AVAILABLE, "call has already ended" }; DEBUG ("no session, returning an error."); dbus_g_method_return_error (context, &e); diff --git a/src/media-channel.h b/src/media-channel.h index b10886c..cbe488a 100644 --- a/src/media-channel.h +++ b/src/media-channel.h @@ -23,8 +23,7 @@ #include -#include -#include +#include #include #include "presence.h" diff --git a/src/media-factory.c b/src/media-factory.c index b52cfc6..9b11483 100644 --- a/src/media-factory.c +++ b/src/media-factory.c @@ -25,9 +25,9 @@ #include #include -#include -#include -#include + +#include +#include #define DEBUG_FLAG GABBLE_DEBUG_MEDIA diff --git a/src/media-stream.c b/src/media-stream.c index cf94c97..e2359c5 100644 --- a/src/media-stream.c +++ b/src/media-stream.c @@ -27,12 +27,9 @@ #include #include -#include -#include -#include -#include -#include -#include + +#include +#include #define DEBUG_FLAG GABBLE_DEBUG_MEDIA diff --git a/src/media-stream.h b/src/media-stream.h index c8c5092..277399d0 100644 --- a/src/media-stream.h +++ b/src/media-stream.h @@ -22,12 +22,9 @@ #define __GABBLE_MEDIA_STREAM_H__ #include +#include #include "jingle-types.h" -#include -#include -#include -#include G_BEGIN_DECLS diff --git a/src/message-util.c b/src/message-util.c index ee9c1d0..27e740a 100644 --- a/src/message-util.c +++ b/src/message-util.c @@ -27,7 +27,7 @@ #include #include -#include +#include #include #define DEBUG_FLAG GABBLE_DEBUG_IM diff --git a/src/muc-channel.c b/src/muc-channel.c index 93ab206..b950d0a 100644 --- a/src/muc-channel.c +++ b/src/muc-channel.c @@ -28,12 +28,8 @@ #include #include -#include -#include -#include -#include -#include -#include +#include +#include #define DEBUG_FLAG GABBLE_DEBUG_MUC #include "connection.h" diff --git a/src/muc-channel.h b/src/muc-channel.h index f28b7a0..e647947 100644 --- a/src/muc-channel.h +++ b/src/muc-channel.h @@ -27,10 +27,7 @@ #include #include -#include -#include -#include -#include +#include #include "types.h" #include "tubes-channel.h" diff --git a/src/muc-factory.c b/src/muc-factory.c index 4cc7e21..9ac076f 100644 --- a/src/muc-factory.c +++ b/src/muc-factory.c @@ -25,11 +25,9 @@ #include #include #include -#include -#include -#include -#include -#include + +#include +#include #define DEBUG_FLAG GABBLE_DEBUG_MUC diff --git a/src/olpc-activity.h b/src/olpc-activity.h index 47101bd..4c08df6 100644 --- a/src/olpc-activity.h +++ b/src/olpc-activity.h @@ -22,8 +22,7 @@ #include -#include -#include +#include #include "connection.h" diff --git a/src/plugin-connection.c b/src/plugin-connection.c index abec9e4..fc334ba 100644 --- a/src/plugin-connection.c +++ b/src/plugin-connection.c @@ -21,7 +21,7 @@ #include #include -#include +#include #include diff --git a/src/plugin-loader.c b/src/plugin-loader.c index 61a005f..7719cdc 100644 --- a/src/plugin-loader.c +++ b/src/plugin-loader.c @@ -26,8 +26,7 @@ # include #endif -#include -#include +#include #define DEBUG_FLAG GABBLE_DEBUG_PLUGINS #include "debug.h" diff --git a/src/plugin-loader.h b/src/plugin-loader.h index 15bce50..985cccb 100644 --- a/src/plugin-loader.h +++ b/src/plugin-loader.h @@ -23,8 +23,7 @@ #include #include -#include -#include +#include #include #include "gabble/sidecar.h" diff --git a/src/plugin.c b/src/plugin.c index dd0d730..89a3ca0 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -20,9 +20,7 @@ #include "gabble/plugin.h" -#include -#include -#include +#include #define DEBUG_FLAG GABBLE_DEBUG_PLUGINS #include "debug.h" diff --git a/src/presence-cache.c b/src/presence-cache.c index 22e025c..c2d7562 100644 --- a/src/presence-cache.c +++ b/src/presence-cache.c @@ -35,8 +35,7 @@ #define DEBUG_FLAG GABBLE_DEBUG_PRESENCE #include -#include -#include +#include #include #define DEBUG_FLAG GABBLE_DEBUG_PRESENCE diff --git a/src/presence.c b/src/presence.c index 704834c..db9830c 100644 --- a/src/presence.c +++ b/src/presence.c @@ -22,7 +22,7 @@ #include "presence.h" #include -#include +#include #include #include "gabble/capabilities.h" diff --git a/src/private-tubes-factory.c b/src/private-tubes-factory.c index ea418f2..ee1e4aa 100644 --- a/src/private-tubes-factory.c +++ b/src/private-tubes-factory.c @@ -25,12 +25,9 @@ #include #include -#include -#include -#include -#include -#include -#include + +#include +#include #include "extensions/extensions.h" diff --git a/src/private-tubes-factory.h b/src/private-tubes-factory.h index d989519..f5cfd1b 100644 --- a/src/private-tubes-factory.h +++ b/src/private-tubes-factory.h @@ -22,7 +22,8 @@ #include -#include +#include + #include "connection.h" #include "bytestream-iface.h" #include "tubes-channel.h" diff --git a/src/protocol.c b/src/protocol.c index 1445219..4b9fd42 100644 --- a/src/protocol.c +++ b/src/protocol.c @@ -20,8 +20,9 @@ #include "protocol.h" #include -#include -#include + +#include +#include #include #include diff --git a/src/protocol.h b/src/protocol.h index 30809df..c013d99 100644 --- a/src/protocol.h +++ b/src/protocol.h @@ -21,7 +21,7 @@ #define JABBER_PROTOCOL_H #include -#include +#include G_BEGIN_DECLS diff --git a/src/request-pipeline.c b/src/request-pipeline.c index 1bbfe4a..1028587 100644 --- a/src/request-pipeline.c +++ b/src/request-pipeline.c @@ -21,7 +21,7 @@ #include "config.h" #include "request-pipeline.h" -#include +#include #define DEBUG_FLAG GABBLE_DEBUG_PIPELINE diff --git a/src/room-config.h b/src/room-config.h index a2981c1..ce52472 100644 --- a/src/room-config.h +++ b/src/room-config.h @@ -21,7 +21,7 @@ #define GABBLE_ROOM_CONFIG_H #include -#include +#include typedef struct _GabbleRoomConfig GabbleRoomConfig; typedef struct _GabbleRoomConfigClass GabbleRoomConfigClass; diff --git a/src/roomlist-channel.c b/src/roomlist-channel.c index 642c983..5018dfe 100644 --- a/src/roomlist-channel.c +++ b/src/roomlist-channel.c @@ -24,14 +24,9 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include + +#include +#include #define DEBUG_FLAG GABBLE_DEBUG_ROOMLIST diff --git a/src/roomlist-channel.h b/src/roomlist-channel.h index e86d6b0..5c74f34 100644 --- a/src/roomlist-channel.h +++ b/src/roomlist-channel.h @@ -23,7 +23,7 @@ #include -#include +#include #include "connection.h" diff --git a/src/roomlist-manager.c b/src/roomlist-manager.c index 6f8d499..2cfb446 100644 --- a/src/roomlist-manager.c +++ b/src/roomlist-manager.c @@ -25,10 +25,9 @@ #include #include -#include -#include -#include -#include + +#include +#include #define DEBUG_FLAG GABBLE_DEBUG_MUC diff --git a/src/roster.c b/src/roster.c index 7bd6758..dfbd9b4 100644 --- a/src/roster.c +++ b/src/roster.c @@ -25,9 +25,8 @@ #include #include -#include -#include -#include +#include +#include #include #define DEBUG_FLAG GABBLE_DEBUG_ROSTER diff --git a/src/roster.h b/src/roster.h index 185dde5..4cc2b0d 100644 --- a/src/roster.h +++ b/src/roster.h @@ -24,7 +24,7 @@ #include -#include +#include #include "types.h" diff --git a/src/search-channel.c b/src/search-channel.c index afbb098..c4fa666 100644 --- a/src/search-channel.c +++ b/src/search-channel.c @@ -23,11 +23,8 @@ #include -#include -#include -#include -#include -#include +#include +#include #include diff --git a/src/search-channel.h b/src/search-channel.h index 9b6c748..066fd85 100644 --- a/src/search-channel.h +++ b/src/search-channel.h @@ -23,7 +23,7 @@ #include -#include +#include G_BEGIN_DECLS diff --git a/src/search-manager.c b/src/search-manager.c index c78598f..bc4a703 100644 --- a/src/search-manager.c +++ b/src/search-manager.c @@ -21,9 +21,8 @@ #include "config.h" #include "search-manager.h" -#include -#include -#include +#include +#include #include diff --git a/src/server-sasl-channel.c b/src/server-sasl-channel.c index 961d6d4..c07d9d8 100644 --- a/src/server-sasl-channel.c +++ b/src/server-sasl-channel.c @@ -36,15 +36,8 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include #define DEBUG_FLAG GABBLE_DEBUG_AUTH diff --git a/src/server-sasl-channel.h b/src/server-sasl-channel.h index 69b4699..32cae43 100644 --- a/src/server-sasl-channel.h +++ b/src/server-sasl-channel.h @@ -22,7 +22,7 @@ #include -#include +#include #include #include "types.h" diff --git a/src/server-tls-channel.c b/src/server-tls-channel.c index 859edb4..9fa9134 100644 --- a/src/server-tls-channel.c +++ b/src/server-tls-channel.c @@ -22,10 +22,8 @@ #include "server-tls-channel.h" -#include -#include -#include -#include +#include +#include #include diff --git a/src/server-tls-channel.h b/src/server-tls-channel.h index 45afbf2..a21f1e3 100644 --- a/src/server-tls-channel.h +++ b/src/server-tls-channel.h @@ -23,7 +23,7 @@ #include -#include +#include #include diff --git a/src/server-tls-manager.c b/src/server-tls-manager.c index 890a4d6..976b628 100644 --- a/src/server-tls-manager.c +++ b/src/server-tls-manager.c @@ -21,7 +21,8 @@ #include "config.h" #include "server-tls-manager.h" -#include +#include +#include #define DEBUG_FLAG GABBLE_DEBUG_TLS #include "debug.h" diff --git a/src/server-tls-manager.h b/src/server-tls-manager.h index e8f10af..816866b 100644 --- a/src/server-tls-manager.h +++ b/src/server-tls-manager.h @@ -23,8 +23,7 @@ #include #include - -#include +#include #include "extensions/extensions.h" diff --git a/src/tls-certificate.c b/src/tls-certificate.c index 6d57485..d24ffc4 100644 --- a/src/tls-certificate.c +++ b/src/tls-certificate.c @@ -22,7 +22,7 @@ #include "tls-certificate.h" #include -#include +#include #define DEBUG_FLAG GABBLE_DEBUG_TLS #include "debug.h" diff --git a/src/tls-certificate.h b/src/tls-certificate.h index e71245d..271ce09 100644 --- a/src/tls-certificate.h +++ b/src/tls-certificate.h @@ -23,7 +23,7 @@ #include -#include +#include G_BEGIN_DECLS diff --git a/src/tube-dbus.c b/src/tube-dbus.c index 424bf3d..a5fa333 100644 --- a/src/tube-dbus.c +++ b/src/tube-dbus.c @@ -27,12 +27,8 @@ #include #include #include -#include -#include -#include -#include -#include -#include +#include +#include #include "extensions/extensions.h" diff --git a/src/tube-dbus.h b/src/tube-dbus.h index 35073ce..5423daa 100644 --- a/src/tube-dbus.h +++ b/src/tube-dbus.h @@ -22,10 +22,8 @@ #include -#include -#include -#include -#include +#include +#include #include "connection.h" #include "bytestream-iface.h" diff --git a/src/tube-iface.c b/src/tube-iface.c index 62585eb..c56dca7 100644 --- a/src/tube-iface.c +++ b/src/tube-iface.c @@ -20,7 +20,8 @@ #include "config.h" #include "tube-iface.h" -#include +#include +#include #include "connection.h" #include "util.h" diff --git a/src/tube-iface.h b/src/tube-iface.h index 311bf65..b727f39 100644 --- a/src/tube-iface.h +++ b/src/tube-iface.h @@ -21,7 +21,7 @@ #define __GABBLE_TUBE_IFACE_H__ #include -#include +#include #include "bytestream-iface.h" diff --git a/src/tube-stream.c b/src/tube-stream.c index a505ef1..782644c 100644 --- a/src/tube-stream.c +++ b/src/tube-stream.c @@ -31,12 +31,8 @@ #endif #include -#include -#include -#include -#include -#include -#include +#include +#include #include "extensions/extensions.h" diff --git a/src/tube-stream.h b/src/tube-stream.h index 9911162..96838bf 100644 --- a/src/tube-stream.h +++ b/src/tube-stream.h @@ -22,9 +22,8 @@ #include -#include -#include -#include +#include +#include #include "connection.h" #include "extensions/extensions.h" diff --git a/src/tubes-channel.c b/src/tubes-channel.c index 7d7cab9..18883de 100644 --- a/src/tubes-channel.c +++ b/src/tubes-channel.c @@ -32,16 +32,8 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include #define DEBUG_FLAG GABBLE_DEBUG_TUBES diff --git a/src/tubes-channel.h b/src/tubes-channel.h index dbf7d5f..cff0d61 100644 --- a/src/tubes-channel.h +++ b/src/tubes-channel.h @@ -22,8 +22,7 @@ #include #include -#include -#include +#include #include "bytestream-iface.h" #include "muc-channel.h" diff --git a/src/types.h b/src/types.h index 1c9de3f..977ff3f 100644 --- a/src/types.h +++ b/src/types.h @@ -24,7 +24,7 @@ #include "config.h" -#include +#include #include "gabble/types.h" diff --git a/src/util.c b/src/util.c index 4102f21..4e336d6 100644 --- a/src/util.c +++ b/src/util.c @@ -31,9 +31,8 @@ #include #include -#include -#include -#include +#include +#include #define DEBUG_FLAG GABBLE_DEBUG_JID diff --git a/src/util.h b/src/util.h index 10b2b6e..cfea342 100644 --- a/src/util.h +++ b/src/util.h @@ -25,8 +25,7 @@ #include #include -#include -#include +#include #include #ifdef ENABLE_VOIP diff --git a/src/vcard-manager.c b/src/vcard-manager.c index 67466be..91d566b 100644 --- a/src/vcard-manager.c +++ b/src/vcard-manager.c @@ -24,8 +24,8 @@ #include -#include -#include +#include + #include #define DEBUG_FLAG GABBLE_DEBUG_VCARD diff --git a/tests/test-handles.c b/tests/test-handles.c index 7439a68..dbddf3a 100644 --- a/tests/test-handles.c +++ b/tests/test-handles.c @@ -4,9 +4,8 @@ #include #include #include -#include -#include -#include +#include +#include #include "src/connection.h" -- 1.7.10