summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2007-04-05 19:38:32 +0000
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2007-04-05 19:38:32 +0000
commit6e963ef67d4d2ed164d126cb88ae07b503aa7796 (patch)
tree9169051e47281f02e7ed5dc2502833bd8f1175c2
parent6cd8d6bf880939ccdf1808d4e7bd3b5561647938 (diff)
Make the corresponding header the first include in each .c file, to ensure self-containedness. Add a few missing inclusions found by doing so
-rw-r--r--lib/telepathy-glib/debug.c4
-rw-r--r--lib/telepathy-glib/group-mixin.c3
-rw-r--r--lib/telepathy-glib/run.c2
-rw-r--r--src/base64.c2
-rw-r--r--src/conn-avatars.c4
-rw-r--r--src/conn-presence.c2
-rw-r--r--src/conn-presence.h4
-rw-r--r--src/disco.c3
-rw-r--r--src/gabble-connection-manager.c4
-rw-r--r--src/gabble-connection.c4
-rw-r--r--src/gabble-error.c3
-rw-r--r--src/gabble-im-channel.c4
-rw-r--r--src/gabble-media-channel.c4
-rw-r--r--src/gabble-media-session.c3
-rw-r--r--src/gabble-media-stream.c3
-rw-r--r--src/gabble-muc-channel.c4
-rw-r--r--src/gabble-register.c3
-rw-r--r--src/gabble-register.h3
-rw-r--r--src/gabble-roomlist-channel.c4
-rw-r--r--src/gabble-roomlist-channel.h2
-rw-r--r--src/gabble-roster-channel.c4
-rw-r--r--src/handles.c3
-rw-r--r--src/im-factory.c4
-rw-r--r--src/media-factory.c3
-rw-r--r--src/muc-factory.c3
-rw-r--r--src/presence-cache.c4
-rw-r--r--src/presence.c3
-rw-r--r--src/roster.c3
-rw-r--r--src/text-mixin.c4
-rw-r--r--src/util.c4
-rw-r--r--src/vcard-manager.c3
31 files changed, 65 insertions, 38 deletions
diff --git a/lib/telepathy-glib/debug.c b/lib/telepathy-glib/debug.c
index 40b943fa6..e75fe75c9 100644
--- a/lib/telepathy-glib/debug.c
+++ b/lib/telepathy-glib/debug.c
@@ -63,12 +63,12 @@
#ifdef ENABLE_DEBUG
+#include <telepathy-glib/debug.h>
+
#include "internal-debug.h"
#include <stdarg.h>
-#include <telepathy-glib/debug.h>
-
static TpDebugFlags flags = 0;
/**
diff --git a/lib/telepathy-glib/group-mixin.c b/lib/telepathy-glib/group-mixin.c
index 8b498335c..8b8dccaed 100644
--- a/lib/telepathy-glib/group-mixin.c
+++ b/lib/telepathy-glib/group-mixin.c
@@ -45,12 +45,13 @@
/* use the new API internally */
#define _TP_CM_UPDATED_FOR_0_5_7 1
+#include <telepathy-glib/group-mixin.h>
+
#include <dbus/dbus-glib.h>
#include <stdio.h>
#include <telepathy-glib/debug-ansi.h>
#include <telepathy-glib/errors.h>
-#include <telepathy-glib/group-mixin.h>
#define DEBUG_FLAG TP_DEBUG_GROUPS
diff --git a/lib/telepathy-glib/run.c b/lib/telepathy-glib/run.c
index 532f3eb31..a594c95d6 100644
--- a/lib/telepathy-glib/run.c
+++ b/lib/telepathy-glib/run.c
@@ -34,6 +34,8 @@
#include "config.h"
+#include <telepathy-glib/run.h>
+
#include <dbus/dbus-glib.h>
#include <stdlib.h>
#include <string.h>
diff --git a/src/base64.c b/src/base64.c
index fbfcb6349..2010da1f6 100644
--- a/src/base64.c
+++ b/src/base64.c
@@ -17,6 +17,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "base64.h"
+
#define DEBUG_FLAG GABBLE_DEBUG_VCARD
#include "debug.h"
diff --git a/src/conn-avatars.c b/src/conn-avatars.c
index f4f5989d8..ff3db6c6d 100644
--- a/src/conn-avatars.c
+++ b/src/conn-avatars.c
@@ -20,6 +20,8 @@
#include "config.h"
+#include "conn-avatars.h"
+
#include <string.h>
#include <loudmouth/loudmouth.h>
@@ -34,8 +36,6 @@
#include "vcard-manager.h"
#include "util.h"
-#include "conn-avatars.h"
-
#define DEBUG_FLAG GABBLE_DEBUG_CONNECTION
#include "debug.h"
diff --git a/src/conn-presence.c b/src/conn-presence.c
index 996562373..bddc368bf 100644
--- a/src/conn-presence.c
+++ b/src/conn-presence.c
@@ -18,6 +18,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "conn-presence.h"
+
#include <string.h>
#include <telepathy-glib/svc-connection.h>
diff --git a/src/conn-presence.h b/src/conn-presence.h
index 35486971d..50f656159 100644
--- a/src/conn-presence.h
+++ b/src/conn-presence.h
@@ -21,6 +21,10 @@
#ifndef __CONN_PRESENCE_H__
#define __CONN_PRESENCE_H__
+#include <glib.h>
+
+#include "gabble-connection.h"
+
G_BEGIN_DECLS
void conn_presence_init (GabbleConnection *conn);
diff --git a/src/disco.c b/src/disco.c
index 99f014476..eb6d7e21b 100644
--- a/src/disco.c
+++ b/src/disco.c
@@ -21,6 +21,8 @@
* -- LET'S DISCO!!! \o/ \o_ _o/ /\o/\ _/o/- -\o\_ --
*/
+#include "disco.h"
+
#define DBUS_API_SUBJECT_TO_CHANGE
#include <dbus/dbus-glib.h>
@@ -31,7 +33,6 @@
#define DEBUG_FLAG GABBLE_DEBUG_DISCO
#include "debug.h"
-#include "disco.h"
#include "gabble-connection.h"
#include "gabble-error.h"
#include "namespaces.h"
diff --git a/src/gabble-connection-manager.c b/src/gabble-connection-manager.c
index 168b7761b..063018185 100644
--- a/src/gabble-connection-manager.c
+++ b/src/gabble-connection-manager.c
@@ -18,6 +18,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "gabble-connection-manager.h"
+
#include <dbus/dbus-protocol.h>
#include <dbus/dbus-glib.h>
#include <stdio.h>
@@ -28,8 +30,6 @@
#include <telepathy-glib/dbus.h>
#include <telepathy-glib/errors.h>
-#include "gabble-connection-manager.h"
-
G_DEFINE_TYPE(GabbleConnectionManager,
gabble_connection_manager,
TP_TYPE_BASE_CONNECTION_MANAGER)
diff --git a/src/gabble-connection.c b/src/gabble-connection.c
index ce9adc17f..7cfb7dd2f 100644
--- a/src/gabble-connection.c
+++ b/src/gabble-connection.c
@@ -20,6 +20,8 @@
#include "config.h"
+#include "gabble-connection.h"
+
#define DBUS_API_SUBJECT_TO_CHANGE
#include <dbus/dbus-glib.h>
@@ -44,8 +46,6 @@
#include <telepathy-glib/svc-connection.h>
-#include "gabble-connection.h"
-
#define DEBUG_FLAG GABBLE_DEBUG_CONNECTION
#include "capabilities.h"
diff --git a/src/gabble-error.c b/src/gabble-error.c
index f7ca850ba..e49412dd8 100644
--- a/src/gabble-error.c
+++ b/src/gabble-error.c
@@ -19,10 +19,11 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "gabble-error.h"
+
#include <stdlib.h>
#include <stdio.h>
-#include "gabble-error.h"
#include "namespaces.h"
#define MAX_LEGACY_ERRORS 3
diff --git a/src/gabble-im-channel.c b/src/gabble-im-channel.c
index 714adbf62..bc99f6713 100644
--- a/src/gabble-im-channel.c
+++ b/src/gabble-im-channel.c
@@ -18,6 +18,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "gabble-im-channel.h"
+
#include <dbus/dbus-glib.h>
#include <loudmouth/loudmouth.h>
#include <stdio.h>
@@ -40,8 +42,6 @@
#include <telepathy-glib/channel-iface.h>
#include <telepathy-glib/svc-channel.h>
-#include "gabble-im-channel.h"
-
static void channel_iface_init (gpointer, gpointer);
static void text_iface_init (gpointer, gpointer);
static void chat_state_iface_init (gpointer, gpointer);
diff --git a/src/gabble-media-channel.c b/src/gabble-media-channel.c
index e05a01a00..a99811a0b 100644
--- a/src/gabble-media-channel.c
+++ b/src/gabble-media-channel.c
@@ -22,6 +22,8 @@
/* FIXME: take this out after 0.5.7 is released */
#define _TP_CM_UPDATED_FOR_0_5_7
+#include "gabble-media-channel.h"
+
#include <dbus/dbus-glib.h>
#include <stdio.h>
#include <stdlib.h>
@@ -41,8 +43,6 @@
#include <telepathy-glib/svc-channel.h>
#include <telepathy-glib/svc-properties-interface.h>
-#include "gabble-media-channel.h"
-
#include "gabble-media-session.h"
#include "gabble-media-stream.h"
diff --git a/src/gabble-media-session.c b/src/gabble-media-session.c
index 36f0aa504..8b008f7bb 100644
--- a/src/gabble-media-session.c
+++ b/src/gabble-media-session.c
@@ -19,6 +19,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "gabble-media-session.h"
+
#include <dbus/dbus-glib.h>
#include <stdio.h>
#include <stdlib.h>
@@ -43,7 +45,6 @@
#include "presence-cache.h"
#include "presence.h"
-#include "gabble-media-session.h"
#include "gabble-signals-marshal.h"
static void session_handler_iface_init (gpointer, gpointer);
diff --git a/src/gabble-media-stream.c b/src/gabble-media-stream.c
index 82fc29d9a..de931c687 100644
--- a/src/gabble-media-stream.c
+++ b/src/gabble-media-stream.c
@@ -19,6 +19,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "gabble-media-stream.h"
+
#include <dbus/dbus-glib.h>
#include <stdio.h>
#include <stdlib.h>
@@ -41,7 +43,6 @@
#include <telepathy-glib/errors.h>
#include <telepathy-glib/svc-media-interfaces.h>
-#include "gabble-media-stream.h"
#include "gabble-signals-marshal.h"
static void stream_handler_iface_init (gpointer, gpointer);
diff --git a/src/gabble-muc-channel.c b/src/gabble-muc-channel.c
index 8217a3491..7a4daf979 100644
--- a/src/gabble-muc-channel.c
+++ b/src/gabble-muc-channel.c
@@ -22,6 +22,8 @@
/* FIXME: take this out after 0.5.7 is released */
#define _TP_CM_UPDATED_FOR_0_5_7
+#include "gabble-muc-channel.h"
+
#include <dbus/dbus-glib.h>
#include <stdio.h>
#include <stdlib.h>
@@ -43,8 +45,6 @@
#include <telepathy-glib/interfaces.h>
#include <telepathy-glib/channel-iface.h>
-#include "gabble-muc-channel.h"
-
#define DEFAULT_JOIN_TIMEOUT (180 * 1000)
#define MAX_NICK_RETRIES 3
diff --git a/src/gabble-register.c b/src/gabble-register.c
index 991b4a35b..b88148753 100644
--- a/src/gabble-register.c
+++ b/src/gabble-register.c
@@ -20,6 +20,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "gabble-register.h"
+
#define DBUS_API_SUBJECT_TO_CHANGE
#include <dbus/dbus-glib.h>
@@ -34,7 +36,6 @@
#include "gabble-connection.h"
#include "gabble-error.h"
-#include "gabble-register.h"
#include "gabble-signals-marshal.h"
#include "namespaces.h"
#include "util.h"
diff --git a/src/gabble-register.h b/src/gabble-register.h
index 119f56b68..031cf5870 100644
--- a/src/gabble-register.h
+++ b/src/gabble-register.h
@@ -24,8 +24,11 @@
#define __GABBLE_REGISTER_H__
#include <glib-object.h>
+
#include <loudmouth/loudmouth.h>
+#include "gabble-connection.h"
+
G_BEGIN_DECLS
typedef struct _GabbleRegister GabbleRegister;
diff --git a/src/gabble-roomlist-channel.c b/src/gabble-roomlist-channel.c
index 33b2e35d8..cfaef489c 100644
--- a/src/gabble-roomlist-channel.c
+++ b/src/gabble-roomlist-channel.c
@@ -18,6 +18,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "gabble-roomlist-channel.h"
+
#include <dbus/dbus-glib.h>
#include <stdio.h>
#include <stdlib.h>
@@ -37,8 +39,6 @@
#include "namespaces.h"
#include "util.h"
-#include "gabble-roomlist-channel.h"
-
#define TP_TYPE_ROOM_STRUCT (dbus_g_type_get_struct ("GValueArray", \
G_TYPE_UINT, \
G_TYPE_STRING, \
diff --git a/src/gabble-roomlist-channel.h b/src/gabble-roomlist-channel.h
index 2ba39d7ca..0c5e7dbcf 100644
--- a/src/gabble-roomlist-channel.h
+++ b/src/gabble-roomlist-channel.h
@@ -23,6 +23,8 @@
#include <glib-object.h>
+#include "gabble-connection.h"
+
G_BEGIN_DECLS
typedef struct _GabbleRoomlistChannel GabbleRoomlistChannel;
diff --git a/src/gabble-roster-channel.c b/src/gabble-roster-channel.c
index b0c2fb44c..1d3529a2e 100644
--- a/src/gabble-roster-channel.c
+++ b/src/gabble-roster-channel.c
@@ -21,6 +21,8 @@
/* FIXME: take this out after 0.5.7 is released */
#define _TP_CM_UPDATED_FOR_0_5_7
+#include "gabble-roster-channel.h"
+
#include <dbus/dbus-glib.h>
#include <stdio.h>
#include <stdlib.h>
@@ -39,8 +41,6 @@
#include <telepathy-glib/svc-channel.h>
#include "util.h"
-#include "gabble-roster-channel.h"
-
static void channel_iface_init (gpointer, gpointer);
G_DEFINE_TYPE_WITH_CODE (GabbleRosterChannel, gabble_roster_channel,
diff --git a/src/handles.c b/src/handles.c
index 09442b1ac..edd6349f6 100644
--- a/src/handles.c
+++ b/src/handles.c
@@ -18,13 +18,14 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "handles.h"
+
#include <glib.h>
#include <string.h>
#include <telepathy-glib/heap.h>
#include <telepathy-glib/errors.h>
-#include "handles.h"
#include "util.h"
#include "config.h"
diff --git a/src/im-factory.c b/src/im-factory.c
index 23fa7d03a..931c975fe 100644
--- a/src/im-factory.c
+++ b/src/im-factory.c
@@ -17,6 +17,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "im-factory.h"
+
#define DBUS_API_SUBJECT_TO_CHANGE
#include <stdlib.h>
@@ -41,8 +43,6 @@
#include "text-mixin.h"
#include <telepathy-glib/channel-factory-iface.h>
-#include "im-factory.h"
-
static void gabble_im_factory_iface_init (gpointer g_iface, gpointer iface_data);
G_DEFINE_TYPE_WITH_CODE (GabbleImFactory, gabble_im_factory, G_TYPE_OBJECT,
diff --git a/src/media-factory.c b/src/media-factory.c
index 83d49a280..e21c025e8 100644
--- a/src/media-factory.c
+++ b/src/media-factory.c
@@ -17,6 +17,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "media-factory.h"
+
#define DBUS_API_SUBJECT_TO_CHANGE
#include <stdlib.h>
@@ -36,7 +38,6 @@
#include "gabble-connection.h"
#include "gabble-media-channel.h"
#include "handles.h"
-#include "media-factory.h"
#include "namespaces.h"
#include <telepathy-glib/interfaces.h>
#include "text-mixin.h"
diff --git a/src/muc-factory.c b/src/muc-factory.c
index 0d121579b..9d1d0bbe1 100644
--- a/src/muc-factory.c
+++ b/src/muc-factory.c
@@ -17,6 +17,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "muc-factory.h"
+
#define DBUS_API_SUBJECT_TO_CHANGE
#include <stdlib.h>
@@ -39,7 +41,6 @@
#include "gabble-muc-channel.h"
#include "gabble-roomlist-channel.h"
#include "handles.h"
-#include "muc-factory.h"
#include "namespaces.h"
#include <telepathy-glib/interfaces.h>
#include "text-mixin.h"
diff --git a/src/presence-cache.c b/src/presence-cache.c
index 41d9e4daf..7f4f219ea 100644
--- a/src/presence-cache.c
+++ b/src/presence-cache.c
@@ -18,6 +18,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "presence-cache.h"
+
#include <stdlib.h>
#include <string.h>
@@ -32,8 +34,6 @@
#include "namespaces.h"
#include "util.h"
-#include "presence-cache.h"
-
#include "gabble-signals-marshal.h"
G_DEFINE_TYPE (GabblePresenceCache, gabble_presence_cache, G_TYPE_OBJECT);
diff --git a/src/presence.c b/src/presence.c
index cf6ef9ce6..35e1d7e29 100644
--- a/src/presence.c
+++ b/src/presence.c
@@ -18,11 +18,12 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "presence.h"
+
#include <string.h>
#include <glib.h>
#include "presence-cache.h"
-#include "presence.h"
#include "namespaces.h"
#include "util.h"
diff --git a/src/roster.c b/src/roster.c
index e0ebffac1..6073c18c4 100644
--- a/src/roster.c
+++ b/src/roster.c
@@ -22,6 +22,8 @@
/* FIXME: take this out after 0.5.7 is released */
#define _TP_CM_UPDATED_FOR_0_5_7
+#include "roster.h"
+
#define DBUS_API_SUBJECT_TO_CHANGE
#include <dbus/dbus-glib.h>
@@ -37,7 +39,6 @@
#include "gabble-roster-channel.h"
#include "handles.h"
#include "namespaces.h"
-#include "roster.h"
#include "util.h"
#define GOOGLE_ROSTER_VERSION "2"
diff --git a/src/text-mixin.c b/src/text-mixin.c
index 3ffac7ed5..5ebf1834a 100644
--- a/src/text-mixin.c
+++ b/src/text-mixin.c
@@ -23,6 +23,8 @@
#define _GNU_SOURCE /* Needed for strptime (_XOPEN_SOURCE can also be used). */
+#include "text-mixin.h"
+
#include <loudmouth/loudmouth.h>
#include <dbus/dbus-glib.h>
#include <string.h>
@@ -40,8 +42,6 @@
#include "roster.h"
#include "util.h"
-#include "text-mixin.h"
-
/**
* gabble_text_mixin_init:
* @obj_cls: The class of the implementation that uses this mixin
diff --git a/src/util.c b/src/util.c
index fb065c15a..f923f504b 100644
--- a/src/util.c
+++ b/src/util.c
@@ -22,6 +22,8 @@
#include "config.h"
+#include "util.h"
+
#include <glib.h>
#include <stdio.h>
#include <string.h>
@@ -32,8 +34,6 @@
#include "namespaces.h"
#include "gabble-connection.h"
-#include "util.h"
-
#define DEBUG_FLAG GABBLE_DEBUG_JID
#include "debug.h"
diff --git a/src/vcard-manager.c b/src/vcard-manager.c
index 787edec85..0223c081b 100644
--- a/src/vcard-manager.c
+++ b/src/vcard-manager.c
@@ -19,6 +19,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "vcard-manager.h"
+
#include <telepathy-glib/dbus.h>
#define DEBUG_FLAG GABBLE_DEBUG_VCARD
@@ -33,7 +35,6 @@
#include "handles.h"
#include "time.h"
#include "util.h"
-#include "vcard-manager.h"
#define DEFAULT_REQUEST_TIMEOUT 20000
#define VCARD_CACHE_ENTRY_TTL 30