From 727ecb5ee3eebe102524a0494bb4f0cbeaa44dad Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 2 May 2012 13:15:53 +0100 Subject: [PATCH] Move -dbus library headers into a new telepathy-glib-dbus.h meta-header --- examples/client/approver.c | 4 +-- examples/client/dbus-tubes/accepter.c | 1 + examples/client/dbus-tubes/offerer.c | 1 + examples/client/extended-client.c | 3 +-- examples/client/inspect-channel.c | 1 + examples/client/inspect-connection.c | 2 +- examples/client/stream-tubes/accepter.c | 1 + examples/client/stream-tubes/offerer.c | 2 +- examples/client/text-handler.c | 1 + examples/cm/call/call-channel.c | 1 + examples/cm/call/call-manager.c | 7 ++---- examples/cm/call/conn.c | 1 + examples/cm/channelspecific/conn.c | 1 + examples/cm/channelspecific/room-manager.c | 1 + examples/cm/channelspecific/room.c | 1 + examples/cm/contactlist/conn.c | 1 + examples/cm/echo-message-parts/chan.c | 1 + examples/cm/echo-message-parts/conn.c | 1 + examples/cm/echo-message-parts/im-manager.c | 1 + examples/cm/echo-message-parts/protocol.c | 1 + examples/cm/extended/conn.c | 1 + next-NEWS | 7 ++++++ telepathy-glib/Makefile.am | 1 + telepathy-glib/base-connection-manager.c | 3 +++ telepathy-glib/base-protocol.c | 3 +++ telepathy-glib/protocol.c | 2 ++ telepathy-glib/reentrants.c | 3 ++- telepathy-glib/room-list.c | 1 + telepathy-glib/telepathy-glib-dbus.h | 36 +++++++++++++++++++++++++++ telepathy-glib/telepathy-glib.h | 5 ---- tests/dbus/account-channel-request.c | 2 ++ tests/dbus/account-manager.c | 1 + tests/dbus/account.c | 4 ++- tests/dbus/base-client.c | 2 ++ tests/dbus/call-channel.c | 2 ++ tests/dbus/channel-dispatch-operation.c | 1 + tests/dbus/channel-request.c | 2 ++ tests/dbus/cm-message.c | 1 + tests/dbus/cm.c | 1 + tests/dbus/connection-balance.c | 1 + tests/dbus/contact-lists.c | 2 ++ tests/dbus/contacts.c | 2 ++ tests/dbus/example-no-protocols.c | 1 + tests/dbus/protocol-objects.c | 1 + tests/dbus/room-list.c | 1 + tests/dbus/simple-approver.c | 2 ++ tests/dbus/simple-handler.c | 2 ++ tests/dbus/simple-observer.c | 2 ++ tests/lib/dbus-tube-chan.c | 1 + tests/lib/echo-chan.c | 1 + tests/lib/echo-conn.c | 1 + tests/lib/echo-im-manager.c | 1 + tests/lib/file-transfer-chan.c | 1 + tests/lib/room-list-chan.c | 1 + tests/lib/simple-channel-manager.c | 1 + tests/lib/simple-channel-request.c | 2 +- tests/lib/stream-tube-chan.c | 1 + tests/lib/util.c | 2 ++ 58 files changed, 117 insertions(+), 20 deletions(-) create mode 100644 telepathy-glib/telepathy-glib-dbus.h diff --git a/examples/client/approver.c b/examples/client/approver.c index 85156a1..0800fc3 100644 --- a/examples/client/approver.c +++ b/examples/client/approver.c @@ -14,9 +14,7 @@ #include #include -#include -#include -#include +#include GMainLoop *mainloop = NULL; diff --git a/examples/client/dbus-tubes/accepter.c b/examples/client/dbus-tubes/accepter.c index 638c536..9871986 100644 --- a/examples/client/dbus-tubes/accepter.c +++ b/examples/client/dbus-tubes/accepter.c @@ -1,4 +1,5 @@ #include +#include #include "constants.h" static GMainLoop *loop = NULL; diff --git a/examples/client/dbus-tubes/offerer.c b/examples/client/dbus-tubes/offerer.c index 87ffbb9..3a26a4e 100644 --- a/examples/client/dbus-tubes/offerer.c +++ b/examples/client/dbus-tubes/offerer.c @@ -1,4 +1,5 @@ #include +#include #include "constants.h" static GMainLoop *loop = NULL; diff --git a/examples/client/extended-client.c b/examples/client/extended-client.c index 548ab04..4750986 100644 --- a/examples/client/extended-client.c +++ b/examples/client/extended-client.c @@ -17,9 +17,8 @@ #include -#include -#include #include +#include /* 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 b449287..9702b05 100644 --- a/examples/client/inspect-channel.c +++ b/examples/client/inspect-channel.c @@ -14,6 +14,7 @@ #include #include +#include typedef struct { int exit_status; diff --git a/examples/client/inspect-connection.c b/examples/client/inspect-connection.c index a0a61d3..6c58332 100644 --- a/examples/client/inspect-connection.c +++ b/examples/client/inspect-connection.c @@ -14,7 +14,7 @@ #include #include -#include +#include static int exit_status = 1; diff --git a/examples/client/stream-tubes/accepter.c b/examples/client/stream-tubes/accepter.c index 41d7652..1ccceff 100644 --- a/examples/client/stream-tubes/accepter.c +++ b/examples/client/stream-tubes/accepter.c @@ -1,4 +1,5 @@ #include +#include static GMainLoop *loop = NULL; diff --git a/examples/client/stream-tubes/offerer.c b/examples/client/stream-tubes/offerer.c index 1eee6d0..8c263a4 100644 --- a/examples/client/stream-tubes/offerer.c +++ b/examples/client/stream-tubes/offerer.c @@ -1,5 +1,5 @@ #include -#include +#include static GMainLoop *loop = NULL; diff --git a/examples/client/text-handler.c b/examples/client/text-handler.c index 647595c..d8e602c 100644 --- a/examples/client/text-handler.c +++ b/examples/client/text-handler.c @@ -15,6 +15,7 @@ #include #include +#include static void echo_message (TpTextChannel *channel, diff --git a/examples/cm/call/call-channel.c b/examples/cm/call/call-channel.c index 1e67bc1..15aec6f 100644 --- a/examples/cm/call/call-channel.c +++ b/examples/cm/call/call-channel.c @@ -45,6 +45,7 @@ #include #include #include +#include #include "call-content.h" #include "call-stream.h" diff --git a/examples/cm/call/call-manager.c b/examples/cm/call/call-manager.c index 8f1ac61..cc55429 100644 --- a/examples/cm/call/call-manager.c +++ b/examples/cm/call/call-manager.c @@ -28,11 +28,8 @@ #include -#include -#include -#include -#include -#include +#include +#include #include "call-channel.h" diff --git a/examples/cm/call/conn.c b/examples/cm/call/conn.c index a6618f4..e6b114b 100644 --- a/examples/cm/call/conn.c +++ b/examples/cm/call/conn.c @@ -26,6 +26,7 @@ #include #include +#include #include #include diff --git a/examples/cm/channelspecific/conn.c b/examples/cm/channelspecific/conn.c index 603ca02..04da70d 100644 --- a/examples/cm/channelspecific/conn.c +++ b/examples/cm/channelspecific/conn.c @@ -16,6 +16,7 @@ #include #include +#include #include #include "protocol.h" diff --git a/examples/cm/channelspecific/room-manager.c b/examples/cm/channelspecific/room-manager.c index fdff18d..9d7e185 100644 --- a/examples/cm/channelspecific/room-manager.c +++ b/examples/cm/channelspecific/room-manager.c @@ -14,6 +14,7 @@ #include #include +#include #include "room.h" diff --git a/examples/cm/channelspecific/room.c b/examples/cm/channelspecific/room.c index 2bb1c70..0fbbbb0 100644 --- a/examples/cm/channelspecific/room.c +++ b/examples/cm/channelspecific/room.c @@ -12,6 +12,7 @@ #include "room.h" #include +#include #include #include diff --git a/examples/cm/contactlist/conn.c b/examples/cm/contactlist/conn.c index fc38c1a..867e5f7 100644 --- a/examples/cm/contactlist/conn.c +++ b/examples/cm/contactlist/conn.c @@ -16,6 +16,7 @@ #include #include +#include #include #include diff --git a/examples/cm/echo-message-parts/chan.c b/examples/cm/echo-message-parts/chan.c index 3b987f4..9c8baa9 100644 --- a/examples/cm/echo-message-parts/chan.c +++ b/examples/cm/echo-message-parts/chan.c @@ -16,6 +16,7 @@ #include #include +#include #include #include #include diff --git a/examples/cm/echo-message-parts/conn.c b/examples/cm/echo-message-parts/conn.c index 8445025..f7301cd 100644 --- a/examples/cm/echo-message-parts/conn.c +++ b/examples/cm/echo-message-parts/conn.c @@ -14,6 +14,7 @@ #include #include +#include #include #include "im-manager.h" diff --git a/examples/cm/echo-message-parts/im-manager.c b/examples/cm/echo-message-parts/im-manager.c index a162685..a14581d 100644 --- a/examples/cm/echo-message-parts/im-manager.c +++ b/examples/cm/echo-message-parts/im-manager.c @@ -16,6 +16,7 @@ #include #include +#include #include "chan.h" diff --git a/examples/cm/echo-message-parts/protocol.c b/examples/cm/echo-message-parts/protocol.c index 11a2226..cd32d47 100644 --- a/examples/cm/echo-message-parts/protocol.c +++ b/examples/cm/echo-message-parts/protocol.c @@ -11,6 +11,7 @@ #include "protocol.h" #include +#include #include "conn.h" #include "im-manager.h" diff --git a/examples/cm/extended/conn.c b/examples/cm/extended/conn.c index 3936a7c..c6747af 100644 --- a/examples/cm/extended/conn.c +++ b/examples/cm/extended/conn.c @@ -16,6 +16,7 @@ #include #include +#include #include /* This would conventionally be extensions/extensions.h */ diff --git a/next-NEWS b/next-NEWS index cabb947..380da55 100644 --- a/next-NEWS +++ b/next-NEWS @@ -1,6 +1,13 @@ API/Behaviour changes ===================== + - The library has been split in half. To use high-level APIs, use the + pkg-config module "telepathy-glib-1" and + #include . To use lower-level APIs that + rely on dbus-glib GTypes or specific D-Bus interfaces, methods or signals, + also use the pkg-config module "telepathy-glib-1-dbus" and + #include . + - TpSimpleClientFactory got renamed to TpClientFactory - tp_automatic_client_factory_new() now returns a TpSimpleClientFactory* diff --git a/telepathy-glib/Makefile.am b/telepathy-glib/Makefile.am index 02e0661..716f261 100644 --- a/telepathy-glib/Makefile.am +++ b/telepathy-glib/Makefile.am @@ -149,6 +149,7 @@ tpgdbusinclude_HEADERS = \ cli-misc.h \ gtypes.h \ interfaces.h \ + telepathy-glib-dbus.h \ $(NULL) BUILT_SOURCES = $(codegen_sources) diff --git a/telepathy-glib/base-connection-manager.c b/telepathy-glib/base-connection-manager.c index d5903cf..be46f88 100644 --- a/telepathy-glib/base-connection-manager.c +++ b/telepathy-glib/base-connection-manager.c @@ -39,6 +39,9 @@ #include +#include +#include +#include #include #define DEBUG_FLAG TP_DEBUG_PARAMS diff --git a/telepathy-glib/base-protocol.c b/telepathy-glib/base-protocol.c index 27e61b2..11b321d 100644 --- a/telepathy-glib/base-protocol.c +++ b/telepathy-glib/base-protocol.c @@ -25,6 +25,9 @@ #include #include +#include +#include +#include #include #include diff --git a/telepathy-glib/protocol.c b/telepathy-glib/protocol.c index 0e5b22d..a7483b5 100644 --- a/telepathy-glib/protocol.c +++ b/telepathy-glib/protocol.c @@ -37,6 +37,8 @@ #include #include +#include +#include #include #include diff --git a/telepathy-glib/reentrants.c b/telepathy-glib/reentrants.c index 7667e28..f6f9b9c 100644 --- a/telepathy-glib/reentrants.c +++ b/telepathy-glib/reentrants.c @@ -1,4 +1,5 @@ -#include "reentrants.h" +#include "telepathy-glib/interfaces.h" +#include "telepathy-glib/reentrants.h" #include #include diff --git a/telepathy-glib/room-list.c b/telepathy-glib/room-list.c index 4ae4e2d..3828672 100644 --- a/telepathy-glib/room-list.c +++ b/telepathy-glib/room-list.c @@ -48,6 +48,7 @@ #include #include +#include #include #include diff --git a/telepathy-glib/telepathy-glib-dbus.h b/telepathy-glib/telepathy-glib-dbus.h new file mode 100644 index 0000000..e6e1301 --- /dev/null +++ b/telepathy-glib/telepathy-glib-dbus.h @@ -0,0 +1,36 @@ +/* + * telepathy-glib-dbus.h - meta-header for parts of the D-Bus API + * + * Copyright © 2009-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 _TP_TELEPATHY_GLIB_DBUS_H +#define _TP_TELEPATHY_GLIB_DBUS_H +#define _TP_IN_META_HEADER + +#include +#include + +#include +#include +#include + +#include +#include + +#undef _TP_IN_META_HEADER +#endif /* multiple-inclusion */ diff --git a/telepathy-glib/telepathy-glib.h b/telepathy-glib/telepathy-glib.h index 04366d4..900ec29 100644 --- a/telepathy-glib/telepathy-glib.h +++ b/telepathy-glib/telepathy-glib.h @@ -22,8 +22,6 @@ #define __TP_GLIB_H__ #define __TP_IN_GLIB_H__ -#include -#include #include #include #include @@ -69,9 +67,6 @@ #include #include -#include -#include - #include #include #include diff --git a/tests/dbus/account-channel-request.c b/tests/dbus/account-channel-request.c index 9a8a3f8..8611c46 100644 --- a/tests/dbus/account-channel-request.c +++ b/tests/dbus/account-channel-request.c @@ -15,6 +15,8 @@ #include #include #include +#include +#include #include #include "tests/lib/util.h" diff --git a/tests/dbus/account-manager.c b/tests/dbus/account-manager.c index 40faf7f..0fa3568 100644 --- a/tests/dbus/account-manager.c +++ b/tests/dbus/account-manager.c @@ -13,6 +13,7 @@ #include #include #include +#include #include "tests/lib/simple-account.h" #include "tests/lib/simple-account-manager.h" diff --git a/tests/dbus/account.c b/tests/dbus/account.c index c67bc60..3719553 100644 --- a/tests/dbus/account.c +++ b/tests/dbus/account.c @@ -13,8 +13,10 @@ #include #include #include -#include #include +#include +#include +#include #include "tests/lib/simple-account.h" #include "tests/lib/util.h" diff --git a/tests/dbus/base-client.c b/tests/dbus/base-client.c index a606b7f..9eb329a 100644 --- a/tests/dbus/base-client.c +++ b/tests/dbus/base-client.c @@ -18,7 +18,9 @@ #include #include #include +#include #include +#include #include #include diff --git a/tests/dbus/call-channel.c b/tests/dbus/call-channel.c index f213393..ddc24b2 100644 --- a/tests/dbus/call-channel.c +++ b/tests/dbus/call-channel.c @@ -23,6 +23,8 @@ #include #include #include +#include +#include #include "telepathy-glib/reentrants.h" diff --git a/tests/dbus/channel-dispatch-operation.c b/tests/dbus/channel-dispatch-operation.c index a8da067..9dfa20b 100644 --- a/tests/dbus/channel-dispatch-operation.c +++ b/tests/dbus/channel-dispatch-operation.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include diff --git a/tests/dbus/channel-request.c b/tests/dbus/channel-request.c index 0c5d028..186bf7c 100644 --- a/tests/dbus/channel-request.c +++ b/tests/dbus/channel-request.c @@ -13,6 +13,8 @@ #include #include #include +#include +#include #include #include diff --git a/tests/dbus/cm-message.c b/tests/dbus/cm-message.c index ec73147..5977139 100644 --- a/tests/dbus/cm-message.c +++ b/tests/dbus/cm-message.c @@ -1,6 +1,7 @@ #include "config.h" #include +#include #include #include "telepathy-glib/cm-message-internal.h" diff --git a/tests/dbus/cm.c b/tests/dbus/cm.c index 29fe814..c33c286 100644 --- a/tests/dbus/cm.c +++ b/tests/dbus/cm.c @@ -11,6 +11,7 @@ #include "config.h" #include +#include #include "tests/lib/echo-cm.h" #include "tests/lib/util.h" diff --git a/tests/dbus/connection-balance.c b/tests/dbus/connection-balance.c index eefd41c..f28c44a 100644 --- a/tests/dbus/connection-balance.c +++ b/tests/dbus/connection-balance.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include diff --git a/tests/dbus/contact-lists.c b/tests/dbus/contact-lists.c index 8aba03c..3a97b72 100644 --- a/tests/dbus/contact-lists.c +++ b/tests/dbus/contact-lists.c @@ -12,6 +12,8 @@ #include #include +#include +#include #include "telepathy-glib/reentrants.h" diff --git a/tests/dbus/contacts.c b/tests/dbus/contacts.c index 6e62a8b..4e99bc5 100644 --- a/tests/dbus/contacts.c +++ b/tests/dbus/contacts.c @@ -30,6 +30,8 @@ #include #include #include +#include +#include #include "telepathy-glib/reentrants.h" diff --git a/tests/dbus/example-no-protocols.c b/tests/dbus/example-no-protocols.c index 594b923..58ff1cc 100644 --- a/tests/dbus/example-no-protocols.c +++ b/tests/dbus/example-no-protocols.c @@ -7,6 +7,7 @@ #include #include #include +#include #include "telepathy-glib/reentrants.h" diff --git a/tests/dbus/protocol-objects.c b/tests/dbus/protocol-objects.c index 1d13b2d..2103013 100644 --- a/tests/dbus/protocol-objects.c +++ b/tests/dbus/protocol-objects.c @@ -11,6 +11,7 @@ #include #include +#include #include "telepathy-glib/reentrants.h" diff --git a/tests/dbus/room-list.c b/tests/dbus/room-list.c index 52e466d..4797e03 100644 --- a/tests/dbus/room-list.c +++ b/tests/dbus/room-list.c @@ -12,6 +12,7 @@ #include #include +#include #include "tests/lib/contacts-conn.h" #include "tests/lib/util.h" diff --git a/tests/dbus/simple-approver.c b/tests/dbus/simple-approver.c index 99e4daf..22bfc18 100644 --- a/tests/dbus/simple-approver.c +++ b/tests/dbus/simple-approver.c @@ -14,6 +14,8 @@ #include #include #include +#include +#include #include #include "tests/lib/util.h" diff --git a/tests/dbus/simple-handler.c b/tests/dbus/simple-handler.c index d076a57..52db2aa 100644 --- a/tests/dbus/simple-handler.c +++ b/tests/dbus/simple-handler.c @@ -15,6 +15,8 @@ #include #include #include +#include +#include #include #include "tests/lib/util.h" diff --git a/tests/dbus/simple-observer.c b/tests/dbus/simple-observer.c index 69e0943..d9eafb5 100644 --- a/tests/dbus/simple-observer.c +++ b/tests/dbus/simple-observer.c @@ -14,6 +14,8 @@ #include #include #include +#include +#include #include #include "tests/lib/util.h" diff --git a/tests/lib/dbus-tube-chan.c b/tests/lib/dbus-tube-chan.c index d3e04ee..c078f21 100644 --- a/tests/lib/dbus-tube-chan.c +++ b/tests/lib/dbus-tube-chan.c @@ -13,6 +13,7 @@ #include "dbus-tube-chan.h" #include +#include #include #include #include diff --git a/tests/lib/echo-chan.c b/tests/lib/echo-chan.c index 9b55925..236ffff 100644 --- a/tests/lib/echo-chan.c +++ b/tests/lib/echo-chan.c @@ -16,6 +16,7 @@ #include "echo-chan.h" #include +#include #include #include diff --git a/tests/lib/echo-conn.c b/tests/lib/echo-conn.c index 2362949..c22a44a 100644 --- a/tests/lib/echo-conn.c +++ b/tests/lib/echo-conn.c @@ -16,6 +16,7 @@ #include #include +#include #include diff --git a/tests/lib/echo-im-manager.c b/tests/lib/echo-im-manager.c index 437eb62..0ada8a3 100644 --- a/tests/lib/echo-im-manager.c +++ b/tests/lib/echo-im-manager.c @@ -18,6 +18,7 @@ #include #include +#include #include "echo-chan.h" diff --git a/tests/lib/file-transfer-chan.c b/tests/lib/file-transfer-chan.c index aff2dab..ebddf97 100644 --- a/tests/lib/file-transfer-chan.c +++ b/tests/lib/file-transfer-chan.c @@ -16,6 +16,7 @@ #include "debug.h" #include +#include #include #include #include diff --git a/tests/lib/room-list-chan.c b/tests/lib/room-list-chan.c index 2b3a303..574fc45 100644 --- a/tests/lib/room-list-chan.c +++ b/tests/lib/room-list-chan.c @@ -4,6 +4,7 @@ #include "room-list-chan.h" #include +#include #include #include diff --git a/tests/lib/simple-channel-manager.c b/tests/lib/simple-channel-manager.c index 28cb6a9..5cd7df9 100644 --- a/tests/lib/simple-channel-manager.c +++ b/tests/lib/simple-channel-manager.c @@ -11,6 +11,7 @@ #include "config.h" #include +#include #include "simple-channel-manager.h" #include "util.h" diff --git a/tests/lib/simple-channel-request.c b/tests/lib/simple-channel-request.c index b021a44..a9904fb 100644 --- a/tests/lib/simple-channel-request.c +++ b/tests/lib/simple-channel-request.c @@ -13,12 +13,12 @@ #include "simple-channel-request.h" #include -#include #include #include #include #include #include +#include #include #include "tests/lib/util.h" diff --git a/tests/lib/stream-tube-chan.c b/tests/lib/stream-tube-chan.c index a965eae..4c8a55d 100644 --- a/tests/lib/stream-tube-chan.c +++ b/tests/lib/stream-tube-chan.c @@ -16,6 +16,7 @@ #include "util.h" #include +#include #include #include #include diff --git a/tests/lib/util.c b/tests/lib/util.c index c65c8a9..3a0c876 100644 --- a/tests/lib/util.c +++ b/tests/lib/util.c @@ -15,6 +15,8 @@ #include #include #include +#include +#include #include #include -- 1.7.10