[telepathy-glib/master] Port examples/ directory to include telepathy-glib.h instead

Danielle Madeley danielle.madeley at collabora.co.uk
Sun Nov 22 15:22:47 PST 2009


Compile time increases from an average of 17.2s to 19.0s.
---
 examples/client/extended-client.c                  |    7 +------
 examples/client/inspect-channel.c                  |    6 +-----
 examples/client/inspect-cm.c                       |    4 +---
 examples/client/inspect-connection.c               |    6 +-----
 examples/client/inspect-contact.c                  |    4 +---
 examples/client/list-connections.c                 |    4 +---
 examples/client/list-managers.c                    |    3 +--
 examples/cm/callable/conn.c                        |    4 +---
 examples/cm/channelspecific/conn.c                 |    4 +---
 examples/cm/channelspecific/connection-manager.c   |    3 +--
 examples/cm/channelspecific/room-manager.c         |    5 +----
 examples/cm/channelspecific/room.c                 |    5 +----
 examples/cm/contactlist/conn.c                     |    4 +---
 examples/cm/contactlist/connection-manager.c       |    3 +--
 examples/cm/contactlist/contact-list-manager.c     |    5 +----
 examples/cm/contactlist/contact-list.c             |    6 +-----
 examples/cm/echo-message-parts/chan.c              |    6 +-----
 examples/cm/echo-message-parts/conn.c              |    4 +---
 .../cm/echo-message-parts/connection-manager.c     |    3 +--
 examples/cm/echo-message-parts/im-manager.c        |    6 +-----
 examples/cm/echo/chan.c                            |    5 +----
 examples/cm/echo/conn.c                            |    4 +---
 examples/cm/echo/connection-manager.c              |    3 +--
 examples/cm/echo/im-manager.c                      |    6 +-----
 examples/cm/extended/conn.c                        |    5 +----
 examples/cm/extended/connection-manager.c          |    3 +--
 examples/cm/no-protocols/connection-manager.c      |    3 +--
 27 files changed, 27 insertions(+), 94 deletions(-)

diff --git a/examples/client/extended-client.c b/examples/client/extended-client.c
index 42dd1d7..a2179cd 100644
--- a/examples/client/extended-client.c
+++ b/examples/client/extended-client.c
@@ -15,12 +15,7 @@
 
 #include <stdio.h>
 
-#include <telepathy-glib/connection.h>
-#include <telepathy-glib/connection-manager.h>
-#include <telepathy-glib/dbus.h>
-#include <telepathy-glib/debug.h>
-#include <telepathy-glib/handle.h>
-#include <telepathy-glib/util.h>
+#include <telepathy-glib/telepathy-glib.h>
 
 /* Usually this'd be a top-level extensions/ directory in practice */
 #include "examples/extensions/extensions.h"
diff --git a/examples/client/inspect-channel.c b/examples/client/inspect-channel.c
index b7b37d0..dd120eb 100644
--- a/examples/client/inspect-channel.c
+++ b/examples/client/inspect-channel.c
@@ -11,11 +11,7 @@
 
 #include <stdio.h>
 
-#include <telepathy-glib/channel.h>
-#include <telepathy-glib/dbus.h>
-#include <telepathy-glib/debug.h>
-#include <telepathy-glib/interfaces.h>
-#include <telepathy-glib/util.h>
+#include <telepathy-glib/telepathy-glib.h>
 
 int
 main (int argc,
diff --git a/examples/client/inspect-cm.c b/examples/client/inspect-cm.c
index 0002c4c..549882a 100644
--- a/examples/client/inspect-cm.c
+++ b/examples/client/inspect-cm.c
@@ -23,9 +23,7 @@
 
 #include <stdio.h>
 
-#include <telepathy-glib/connection-manager.h>
-#include <telepathy-glib/dbus.h>
-#include <telepathy-glib/debug.h>
+#include <telepathy-glib/telepathy-glib.h>
 
 static void
 ready (TpConnectionManager *cm,
diff --git a/examples/client/inspect-connection.c b/examples/client/inspect-connection.c
index 3a6c1b5..9ac1bb1 100644
--- a/examples/client/inspect-connection.c
+++ b/examples/client/inspect-connection.c
@@ -11,11 +11,7 @@
 
 #include <stdio.h>
 
-#include <telepathy-glib/connection.h>
-#include <telepathy-glib/dbus.h>
-#include <telepathy-glib/debug.h>
-#include <telepathy-glib/interfaces.h>
-#include <telepathy-glib/util.h>
+#include <telepathy-glib/telepathy-glib.h>
 
 static void
 got_channels (TpConnection *connection,
diff --git a/examples/client/inspect-contact.c b/examples/client/inspect-contact.c
index 8743bba..76a6fc4 100644
--- a/examples/client/inspect-contact.c
+++ b/examples/client/inspect-contact.c
@@ -11,9 +11,7 @@
 
 #include <stdio.h>
 
-#include <telepathy-glib/contact.h>
-#include <telepathy-glib/dbus.h>
-#include <telepathy-glib/debug.h>
+#include <telepathy-glib/telepathy-glib.h>
 
 static void
 display_contact (TpContact *contact)
diff --git a/examples/client/list-connections.c b/examples/client/list-connections.c
index 748a2c1..50f1289 100644
--- a/examples/client/list-connections.c
+++ b/examples/client/list-connections.c
@@ -9,9 +9,7 @@
  * notice and this notice are preserved.
  */
 
-#include <telepathy-glib/connection.h>
-#include <telepathy-glib/dbus.h>
-#include <telepathy-glib/debug.h>
+#include <telepathy-glib/telepathy-glib.h>
 
 typedef struct {
     GMainLoop *mainloop;
diff --git a/examples/client/list-managers.c b/examples/client/list-managers.c
index 9241c96..c2b6ec7 100644
--- a/examples/client/list-managers.c
+++ b/examples/client/list-managers.c
@@ -9,8 +9,7 @@
  * notice and this notice are preserved.
  */
 
-#include <telepathy-glib/connection-manager.h>
-#include <telepathy-glib/debug.h>
+#include <telepathy-glib/telepathy-glib.h>
 
 typedef struct {
     GMainLoop *mainloop;
diff --git a/examples/cm/callable/conn.c b/examples/cm/callable/conn.c
index 027cc0b..04bc310 100644
--- a/examples/cm/callable/conn.c
+++ b/examples/cm/callable/conn.c
@@ -25,11 +25,9 @@
 
 #include <dbus/dbus-glib.h>
 
-#include <telepathy-glib/dbus.h>
-#include <telepathy-glib/errors.h>
+#include <telepathy-glib/telepathy-glib.h>
 #include <telepathy-glib/handle-repo-dynamic.h>
 #include <telepathy-glib/handle-repo-static.h>
-#include <telepathy-glib/interfaces.h>
 
 #include "media-manager.h"
 
diff --git a/examples/cm/channelspecific/conn.c b/examples/cm/channelspecific/conn.c
index aab088f..3b8250c 100644
--- a/examples/cm/channelspecific/conn.c
+++ b/examples/cm/channelspecific/conn.c
@@ -15,10 +15,8 @@
 
 #include <dbus/dbus-glib.h>
 
-#include <telepathy-glib/dbus.h>
-#include <telepathy-glib/errors.h>
+#include <telepathy-glib/telepathy-glib.h>
 #include <telepathy-glib/handle-repo-dynamic.h>
-#include <telepathy-glib/interfaces.h>
 
 #include "room-manager.h"
 
diff --git a/examples/cm/channelspecific/connection-manager.c b/examples/cm/channelspecific/connection-manager.c
index 801cb62..dd86168 100644
--- a/examples/cm/channelspecific/connection-manager.c
+++ b/examples/cm/channelspecific/connection-manager.c
@@ -16,8 +16,7 @@
 #include <dbus/dbus-protocol.h>
 #include <dbus/dbus-glib.h>
 
-#include <telepathy-glib/dbus.h>
-#include <telepathy-glib/errors.h>
+#include <telepathy-glib/telepathy-glib.h>
 
 #include "conn.h"
 
diff --git a/examples/cm/channelspecific/room-manager.c b/examples/cm/channelspecific/room-manager.c
index 6853354..4ffa3eb 100644
--- a/examples/cm/channelspecific/room-manager.c
+++ b/examples/cm/channelspecific/room-manager.c
@@ -13,10 +13,7 @@
 
 #include <dbus/dbus-glib.h>
 
-#include <telepathy-glib/base-connection.h>
-#include <telepathy-glib/dbus.h>
-#include <telepathy-glib/errors.h>
-#include <telepathy-glib/interfaces.h>
+#include <telepathy-glib/telepathy-glib.h>
 
 #include "room.h"
 
diff --git a/examples/cm/channelspecific/room.c b/examples/cm/channelspecific/room.c
index 503e639..42a4916 100644
--- a/examples/cm/channelspecific/room.c
+++ b/examples/cm/channelspecific/room.c
@@ -11,12 +11,9 @@
 
 #include "room.h"
 
-#include <telepathy-glib/base-connection.h>
+#include <telepathy-glib/telepathy-glib.h>
 #include <telepathy-glib/channel-iface.h>
-#include <telepathy-glib/dbus.h>
-#include <telepathy-glib/interfaces.h>
 #include <telepathy-glib/svc-channel.h>
-#include <telepathy-glib/svc-generic.h>
 
 static void text_iface_init (gpointer iface, gpointer data);
 static void channel_iface_init (gpointer iface, gpointer data);
diff --git a/examples/cm/contactlist/conn.c b/examples/cm/contactlist/conn.c
index 2349dd7..5d874bf 100644
--- a/examples/cm/contactlist/conn.c
+++ b/examples/cm/contactlist/conn.c
@@ -15,11 +15,9 @@
 
 #include <dbus/dbus-glib.h>
 
-#include <telepathy-glib/dbus.h>
-#include <telepathy-glib/errors.h>
+#include <telepathy-glib/telepathy-glib.h>
 #include <telepathy-glib/handle-repo-dynamic.h>
 #include <telepathy-glib/handle-repo-static.h>
-#include <telepathy-glib/interfaces.h>
 
 #include "contact-list-manager.h"
 
diff --git a/examples/cm/contactlist/connection-manager.c b/examples/cm/contactlist/connection-manager.c
index 691ad93..9c75629 100644
--- a/examples/cm/contactlist/connection-manager.c
+++ b/examples/cm/contactlist/connection-manager.c
@@ -14,8 +14,7 @@
 #include <dbus/dbus-protocol.h>
 #include <dbus/dbus-glib.h>
 
-#include <telepathy-glib/dbus.h>
-#include <telepathy-glib/errors.h>
+#include <telepathy-glib/telepathy-glib.h>
 
 #include "conn.h"
 
diff --git a/examples/cm/contactlist/contact-list-manager.c b/examples/cm/contactlist/contact-list-manager.c
index 05a1982..fe9963f 100644
--- a/examples/cm/contactlist/contact-list-manager.c
+++ b/examples/cm/contactlist/contact-list-manager.c
@@ -15,10 +15,7 @@
 
 #include <dbus/dbus-glib.h>
 
-#include <telepathy-glib/base-connection.h>
-#include <telepathy-glib/dbus.h>
-#include <telepathy-glib/errors.h>
-#include <telepathy-glib/interfaces.h>
+#include <telepathy-glib/telepathy-glib.h>
 
 #include "contact-list.h"
 
diff --git a/examples/cm/contactlist/contact-list.c b/examples/cm/contactlist/contact-list.c
index c8af83b..016c1b4 100644
--- a/examples/cm/contactlist/contact-list.c
+++ b/examples/cm/contactlist/contact-list.c
@@ -11,14 +11,10 @@
 
 #include "contact-list.h"
 
-#include <telepathy-glib/base-connection.h>
+#include <telepathy-glib/telepathy-glib.h>
 #include <telepathy-glib/channel-iface.h>
-#include <telepathy-glib/dbus.h>
-#include <telepathy-glib/enums.h>
 #include <telepathy-glib/exportable-channel.h>
-#include <telepathy-glib/interfaces.h>
 #include <telepathy-glib/svc-channel.h>
-#include <telepathy-glib/svc-generic.h>
 
 #include "contact-list-manager.h"
 
diff --git a/examples/cm/echo-message-parts/chan.c b/examples/cm/echo-message-parts/chan.c
index 90583cd..2359f1c 100644
--- a/examples/cm/echo-message-parts/chan.c
+++ b/examples/cm/echo-message-parts/chan.c
@@ -13,13 +13,9 @@
 
 #include "chan.h"
 
-#include <telepathy-glib/base-connection.h>
+#include <telepathy-glib/telepathy-glib.h>
 #include <telepathy-glib/channel-iface.h>
-#include <telepathy-glib/dbus.h>
-#include <telepathy-glib/gtypes.h>
-#include <telepathy-glib/interfaces.h>
 #include <telepathy-glib/svc-channel.h>
-#include <telepathy-glib/svc-generic.h>
 
 static void channel_iface_init (gpointer iface, gpointer data);
 static void destroyable_iface_init (gpointer iface, gpointer data);
diff --git a/examples/cm/echo-message-parts/conn.c b/examples/cm/echo-message-parts/conn.c
index 410cb40..f87640e 100644
--- a/examples/cm/echo-message-parts/conn.c
+++ b/examples/cm/echo-message-parts/conn.c
@@ -13,10 +13,8 @@
 
 #include <dbus/dbus-glib.h>
 
-#include <telepathy-glib/dbus.h>
-#include <telepathy-glib/errors.h>
+#include <telepathy-glib/telepathy-glib.h>
 #include <telepathy-glib/handle-repo-dynamic.h>
-#include <telepathy-glib/interfaces.h>
 
 #include "im-manager.h"
 
diff --git a/examples/cm/echo-message-parts/connection-manager.c b/examples/cm/echo-message-parts/connection-manager.c
index 200009d..5e18ebd 100644
--- a/examples/cm/echo-message-parts/connection-manager.c
+++ b/examples/cm/echo-message-parts/connection-manager.c
@@ -13,8 +13,7 @@
 #include <dbus/dbus-protocol.h>
 #include <dbus/dbus-glib.h>
 
-#include <telepathy-glib/dbus.h>
-#include <telepathy-glib/errors.h>
+#include <telepathy-glib/telepathy-glib.h>
 
 #include "conn.h"
 
diff --git a/examples/cm/echo-message-parts/im-manager.c b/examples/cm/echo-message-parts/im-manager.c
index f944e3c..f7bc850 100644
--- a/examples/cm/echo-message-parts/im-manager.c
+++ b/examples/cm/echo-message-parts/im-manager.c
@@ -15,11 +15,7 @@
 
 #include <dbus/dbus-glib.h>
 
-#include <telepathy-glib/base-connection.h>
-#include <telepathy-glib/channel-manager.h>
-#include <telepathy-glib/dbus.h>
-#include <telepathy-glib/errors.h>
-#include <telepathy-glib/interfaces.h>
+#include <telepathy-glib/telepathy-glib.h>
 
 #include "chan.h"
 
diff --git a/examples/cm/echo/chan.c b/examples/cm/echo/chan.c
index 63050e0..9bab627 100644
--- a/examples/cm/echo/chan.c
+++ b/examples/cm/echo/chan.c
@@ -13,12 +13,9 @@
 
 #include "chan.h"
 
-#include <telepathy-glib/base-connection.h>
+#include <telepathy-glib/telepathy-glib.h>
 #include <telepathy-glib/channel-iface.h>
-#include <telepathy-glib/dbus.h>
-#include <telepathy-glib/interfaces.h>
 #include <telepathy-glib/svc-channel.h>
-#include <telepathy-glib/svc-generic.h>
 
 static void text_iface_init (gpointer iface, gpointer data);
 static void channel_iface_init (gpointer iface, gpointer data);
diff --git a/examples/cm/echo/conn.c b/examples/cm/echo/conn.c
index cba3834..24e0db0 100644
--- a/examples/cm/echo/conn.c
+++ b/examples/cm/echo/conn.c
@@ -13,10 +13,8 @@
 
 #include <dbus/dbus-glib.h>
 
-#include <telepathy-glib/dbus.h>
-#include <telepathy-glib/errors.h>
+#include <telepathy-glib/telepathy-glib.h>
 #include <telepathy-glib/handle-repo-dynamic.h>
-#include <telepathy-glib/interfaces.h>
 
 #include "im-manager.h"
 
diff --git a/examples/cm/echo/connection-manager.c b/examples/cm/echo/connection-manager.c
index 96c44b3..3493429 100644
--- a/examples/cm/echo/connection-manager.c
+++ b/examples/cm/echo/connection-manager.c
@@ -13,8 +13,7 @@
 #include <dbus/dbus-protocol.h>
 #include <dbus/dbus-glib.h>
 
-#include <telepathy-glib/dbus.h>
-#include <telepathy-glib/errors.h>
+#include <telepathy-glib/telepathy-glib.h>
 
 #include "conn.h"
 
diff --git a/examples/cm/echo/im-manager.c b/examples/cm/echo/im-manager.c
index 81c89ec..20d0895 100644
--- a/examples/cm/echo/im-manager.c
+++ b/examples/cm/echo/im-manager.c
@@ -15,11 +15,7 @@
 
 #include <dbus/dbus-glib.h>
 
-#include <telepathy-glib/base-connection.h>
-#include <telepathy-glib/channel-manager.h>
-#include <telepathy-glib/dbus.h>
-#include <telepathy-glib/errors.h>
-#include <telepathy-glib/interfaces.h>
+#include <telepathy-glib/telepathy-glib.h>
 
 #include "chan.h"
 
diff --git a/examples/cm/extended/conn.c b/examples/cm/extended/conn.c
index f4d22e6..9d32201 100644
--- a/examples/cm/extended/conn.c
+++ b/examples/cm/extended/conn.c
@@ -13,11 +13,8 @@
 
 #include <dbus/dbus-glib.h>
 
-#include <telepathy-glib/dbus.h>
-#include <telepathy-glib/errors.h>
-#include <telepathy-glib/gtypes.h>
+#include <telepathy-glib/telepathy-glib.h>
 #include <telepathy-glib/handle-repo-dynamic.h>
-#include <telepathy-glib/util.h>
 
 /* This would conventionally be extensions/extensions.h */
 #include "examples/extensions/extensions.h"
diff --git a/examples/cm/extended/connection-manager.c b/examples/cm/extended/connection-manager.c
index 8fd193d..44081d6 100644
--- a/examples/cm/extended/connection-manager.c
+++ b/examples/cm/extended/connection-manager.c
@@ -13,8 +13,7 @@
 #include <dbus/dbus-protocol.h>
 #include <dbus/dbus-glib.h>
 
-#include <telepathy-glib/dbus.h>
-#include <telepathy-glib/errors.h>
+#include <telepathy-glib/telepathy-glib.h>
 
 #include "conn.h"
 
diff --git a/examples/cm/no-protocols/connection-manager.c b/examples/cm/no-protocols/connection-manager.c
index aca26ee..bdfc7f1 100644
--- a/examples/cm/no-protocols/connection-manager.c
+++ b/examples/cm/no-protocols/connection-manager.c
@@ -13,8 +13,7 @@
 
 #include <dbus/dbus-glib.h>
 
-#include <telepathy-glib/dbus.h>
-#include <telepathy-glib/errors.h>
+#include <telepathy-glib/telepathy-glib.h>
 
 G_DEFINE_TYPE (ExampleNoProtocolsConnectionManager,
     example_no_protocols_connection_manager,
-- 
1.5.6.5




More information about the telepathy-commits mailing list