From f39dd46fbf4125200e4181f68ba7ea4295168570 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Fri, 27 Apr 2012 15:51:00 +0100 Subject: [PATCH 4/6] Move tp_cli_* to -dbus library --- telepathy-glib/Makefile.am | 22 +++++++++------- telepathy-glib/account-manager.c | 2 -- telepathy-glib/account.c | 2 -- telepathy-glib/channel-dispatch-operation.c | 2 -- telepathy-glib/channel-dispatcher.c | 2 -- telepathy-glib/channel-request.c | 1 - telepathy-glib/channel.c | 2 -- telepathy-glib/cli-channel.c | 29 ++++++++++++++++++++ telepathy-glib/cli-connection.c | 29 ++++++++++++++++++++ telepathy-glib/cli-misc.c | 38 +++++++++++++++++++++++++++ telepathy-glib/client.c | 2 -- telepathy-glib/codegen.am | 24 ++++++++++------- telepathy-glib/connection-manager.c | 2 -- telepathy-glib/connection.c | 2 -- telepathy-glib/dbus-daemon.c | 2 -- telepathy-glib/protocol.c | 2 -- telepathy-glib/proxy.c | 3 --- 17 files changed, 123 insertions(+), 43 deletions(-) create mode 100644 telepathy-glib/cli-channel.c create mode 100644 telepathy-glib/cli-connection.c create mode 100644 telepathy-glib/cli-misc.c diff --git a/telepathy-glib/Makefile.am b/telepathy-glib/Makefile.am index 8042cc9..78d8590 100644 --- a/telepathy-glib/Makefile.am +++ b/telepathy-glib/Makefile.am @@ -37,7 +37,7 @@ noinst_LTLIBRARIES = \ $(NULL) # headers that are subject to coding-style checks -our_headers = \ +tpginclude_HEADERS = \ account.h \ account-channel-request.h \ account-manager.h \ @@ -68,10 +68,6 @@ our_headers = \ channel-dispatch-operation.h \ channel-manager.h \ channel-request.h \ - cli-call.h \ - cli-channel.h \ - cli-connection.h \ - cli-misc.h \ client.h \ client-factory.h \ client-message.h \ @@ -143,10 +139,14 @@ our_headers = \ svc-tls.h \ telepathy-glib.h \ text-channel.h \ - util.h + util.h \ + $(NULL) -tpginclude_HEADERS = \ - $(our_headers) \ +tpgdbusinclude_HEADERS = \ + cli-call.h \ + cli-channel.h \ + cli-connection.h \ + cli-misc.h \ $(NULL) BUILT_SOURCES = $(codegen_sources) @@ -161,7 +161,8 @@ clean-local: rm -rf tmp-introspect* check_c_sources = \ - $(our_headers) \ + $(tpginclude_HEADERS) \ + $(tpgdbusinclude_HEADERS) \ $(libtelepathy_glib_core_internal_la_SOURCES) \ $(libtelepathy_glib_dbus_internal_la_SOURCES) \ $(libtelepathy_glib_main_internal_la_SOURCES) \ @@ -182,6 +183,9 @@ libtelepathy_glib_dbus_internal_la_LIBADD = \ libtelepathy-glib-1-core.la \ $(NULL) libtelepathy_glib_dbus_internal_la_SOURCES = \ + cli-channel.c \ + cli-connection.c \ + cli-misc.c \ interfaces.c \ $(NULL) diff --git a/telepathy-glib/account-manager.c b/telepathy-glib/account-manager.c index 016a36d..bbe7e1f 100644 --- a/telepathy-glib/account-manager.c +++ b/telepathy-glib/account-manager.c @@ -40,8 +40,6 @@ #include "telepathy-glib/proxy-internal.h" #include "telepathy-glib/client-factory-internal.h" -#include "telepathy-glib/_gen/tp-cli-account-manager-body.h" - /** * SECTION:account-manager * @title: TpAccountManager diff --git a/telepathy-glib/account.c b/telepathy-glib/account.c index 6d3dea4..8be5585 100644 --- a/telepathy-glib/account.c +++ b/telepathy-glib/account.c @@ -43,8 +43,6 @@ #include "telepathy-glib/client-factory-internal.h" #include -#include "telepathy-glib/_gen/tp-cli-account-body.h" - /** * SECTION:account * @title: TpAccount diff --git a/telepathy-glib/channel-dispatch-operation.c b/telepathy-glib/channel-dispatch-operation.c index ec9ef70..624478b 100644 --- a/telepathy-glib/channel-dispatch-operation.c +++ b/telepathy-glib/channel-dispatch-operation.c @@ -41,8 +41,6 @@ #include "telepathy-glib/debug-internal.h" #include "telepathy-glib/client-factory-internal.h" -#include "telepathy-glib/_gen/tp-cli-channel-dispatch-operation-body.h" - /** * SECTION:channel-dispatch-operation * @title: TpChannelDispatchOperation diff --git a/telepathy-glib/channel-dispatcher.c b/telepathy-glib/channel-dispatcher.c index 52fe839..3395f67 100644 --- a/telepathy-glib/channel-dispatcher.c +++ b/telepathy-glib/channel-dispatcher.c @@ -34,8 +34,6 @@ #define DEBUG_FLAG TP_DEBUG_DISPATCHER #include "telepathy-glib/debug-internal.h" -#include "telepathy-glib/_gen/tp-cli-channel-dispatcher-body.h" - /** * SECTION:channel-dispatcher * @title: TpChannelDispatcher diff --git a/telepathy-glib/channel-request.c b/telepathy-glib/channel-request.c index 1140a65..f0d8348 100644 --- a/telepathy-glib/channel-request.c +++ b/telepathy-glib/channel-request.c @@ -39,7 +39,6 @@ #include "telepathy-glib/debug-internal.h" #include "telepathy-glib/proxy-internal.h" #include "telepathy-glib/client-factory-internal.h" -#include "telepathy-glib/_gen/tp-cli-channel-request-body.h" /** * SECTION:channel-request diff --git a/telepathy-glib/channel.c b/telepathy-glib/channel.c index a943e58..19cb5a0 100644 --- a/telepathy-glib/channel.c +++ b/telepathy-glib/channel.c @@ -38,8 +38,6 @@ #include "telepathy-glib/proxy-internal.h" #include "telepathy-glib/client-factory-internal.h" -#include "_gen/tp-cli-channel-body.h" - /** * SECTION:channel * @title: TpChannel diff --git a/telepathy-glib/cli-channel.c b/telepathy-glib/cli-channel.c new file mode 100644 index 0000000..a2f6226 --- /dev/null +++ b/telepathy-glib/cli-channel.c @@ -0,0 +1,29 @@ +/* + * cli-channel.c - host the generated code for a Telepathy channel + * + * Copyright © 2007-2012 Collabora Ltd. + * Copyright © 2007-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 + */ + +#include "config.h" + +#include + +#include +#include + +#include "_gen/tp-cli-channel-body.h" diff --git a/telepathy-glib/cli-connection.c b/telepathy-glib/cli-connection.c new file mode 100644 index 0000000..cf75d7b --- /dev/null +++ b/telepathy-glib/cli-connection.c @@ -0,0 +1,29 @@ +/* + * cli-connection.c - host the generated code for a Telepathy connection + * + * Copyright © 2007-2012 Collabora Ltd. + * Copyright © 2007-2011 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 + */ + +#include "config.h" + +#include + +#include +#include + +#include "_gen/tp-cli-connection-body.h" diff --git a/telepathy-glib/cli-misc.c b/telepathy-glib/cli-misc.c new file mode 100644 index 0000000..9cca3ae --- /dev/null +++ b/telepathy-glib/cli-misc.c @@ -0,0 +1,38 @@ +/* + * cli-misc.c - host the generated code for most Telepathy classes + * + * Copyright © 2007-2012 Collabora Ltd. + * Copyright © 2007-2011 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 + */ + +#include "config.h" + +#include + +#include +#include + +#include "telepathy-glib/_gen/tp-cli-account-body.h" +#include "telepathy-glib/_gen/tp-cli-account-manager-body.h" +#include "telepathy-glib/_gen/tp-cli-channel-dispatcher-body.h" +#include "telepathy-glib/_gen/tp-cli-channel-dispatch-operation-body.h" +#include "telepathy-glib/_gen/tp-cli-channel-request-body.h" +#include "telepathy-glib/_gen/tp-cli-client-body.h" +#include "telepathy-glib/_gen/tp-cli-connection-manager-body.h" +#include "telepathy-glib/_gen/tp-cli-dbus-daemon-body.h" +#include "telepathy-glib/_gen/tp-cli-generic-body.h" +#include "telepathy-glib/_gen/tp-cli-protocol-body.h" diff --git a/telepathy-glib/client.c b/telepathy-glib/client.c index 3b66e62..d2f53bd 100644 --- a/telepathy-glib/client.c +++ b/telepathy-glib/client.c @@ -33,8 +33,6 @@ #define DEBUG_FLAG TP_DEBUG_DISPATCHER #include "telepathy-glib/debug-internal.h" -#include "telepathy-glib/_gen/tp-cli-client-body.h" - /** * SECTION:client * @title: TpClient diff --git a/telepathy-glib/codegen.am b/telepathy-glib/codegen.am index c2c1cc8..a437f57 100644 --- a/telepathy-glib/codegen.am +++ b/telepathy-glib/codegen.am @@ -46,6 +46,9 @@ nodist_geninclude_HEADERS = \ _gen/telepathy-enums.h \ _gen/genums.h \ _gen/gtypes.h \ + $(NULL) + +nodist_gendbusinclude_HEADERS += \ _gen/tp-cli-account.h \ _gen/tp-cli-account-manager.h \ _gen/tp-cli-call-content.h \ @@ -63,9 +66,6 @@ nodist_geninclude_HEADERS = \ _gen/tp-cli-debug.h \ _gen/tp-cli-generic.h \ _gen/tp-cli-protocol.h \ - $(NULL) - -nodist_gendbusinclude_HEADERS += \ _gen/tp-svc-account.h \ _gen/tp-svc-account-manager.h \ _gen/tp-svc-call-content.h \ @@ -96,6 +96,9 @@ nodist_libtelepathy_glib_dbus_internal_la_SOURCES = \ nodist_libtelepathy_glib_main_internal_la_SOURCES = \ _gen/error-str.c \ _gen/gtypes-body.h \ + $(NULL) + +nodist_libtelepathy_glib_dbus_internal_la_SOURCES += \ _gen/register-dbus-glib-marshallers-body.h \ _gen/tp-cli-account-body.h \ _gen/tp-cli-account-manager-body.h \ @@ -114,9 +117,6 @@ nodist_libtelepathy_glib_main_internal_la_SOURCES = \ _gen/tp-cli-debug-body.h \ _gen/tp-cli-generic-body.h \ _gen/tp-cli-protocol-body.h \ - $(NULL) - -nodist_libtelepathy_glib_dbus_internal_la_SOURCES += \ _gen/tp-svc-account.c \ _gen/tp-svc-account-manager.c \ _gen/tp-svc-call-content.c \ @@ -210,14 +210,18 @@ _gen/register-dbus-glib-marshallers-body.h: _gen/stable-spec.xml \ $(tools_dir)/glib-client-marshaller-gen.py $(AM_V_GEN)$(PYTHON) $(tools_dir)/glib-client-marshaller-gen.py $< _tp > $@ -_gen/genums.c: _gen/spec-stamp genums.c.template $(our_headers) codegen.am +_gen/genums.c: _gen/spec-stamp genums.c.template \ + $(tpginclude_HEADERS) codegen.am $(AM_V_GEN)( cd $(srcdir) && \ - $(GLIB_MKENUMS) --template genums.c.template $(our_headers) \ + $(GLIB_MKENUMS) --template genums.c.template \ + $(tpginclude_HEADERS) \ ) > $@ -_gen/genums.h: _gen/spec-stamp genums.h.template $(our_headers) codegen.am +_gen/genums.h: _gen/spec-stamp genums.h.template \ + $(tpginclude_HEADERS) codegen.am $(AM_V_GEN)( cd $(srcdir) && \ - $(GLIB_MKENUMS) --template genums.h.template $(our_headers) \ + $(GLIB_MKENUMS) --template genums.h.template \ + $(tpginclude_HEADERS) \ ) > $@ _gen/error-str.h: _gen/error-str.c diff --git a/telepathy-glib/connection-manager.c b/telepathy-glib/connection-manager.c index 91097d3..329d0b2 100644 --- a/telepathy-glib/connection-manager.c +++ b/telepathy-glib/connection-manager.c @@ -40,8 +40,6 @@ #include "telepathy-glib/protocol-internal.h" #include "telepathy-glib/util-internal.h" -#include "telepathy-glib/_gen/tp-cli-connection-manager-body.h" - /** * SECTION:connection-manager * @title: TpConnectionManager diff --git a/telepathy-glib/connection.c b/telepathy-glib/connection.c index 392380a..53cb4b3 100644 --- a/telepathy-glib/connection.c +++ b/telepathy-glib/connection.c @@ -50,8 +50,6 @@ #include "telepathy-glib/client-factory-internal.h" #include "telepathy-glib/util-internal.h" -#include "_gen/tp-cli-connection-body.h" - /** * SECTION:connection * @title: TpConnection diff --git a/telepathy-glib/dbus-daemon.c b/telepathy-glib/dbus-daemon.c index 38fc748..ef09466 100644 --- a/telepathy-glib/dbus-daemon.c +++ b/telepathy-glib/dbus-daemon.c @@ -33,8 +33,6 @@ #include #include -#include "telepathy-glib/_gen/tp-cli-dbus-daemon-body.h" - #define DEBUG_FLAG TP_DEBUG_PROXY #include "debug-internal.h" diff --git a/telepathy-glib/protocol.c b/telepathy-glib/protocol.c index 933cdaa..0e5b22d 100644 --- a/telepathy-glib/protocol.c +++ b/telepathy-glib/protocol.c @@ -46,8 +46,6 @@ #include "telepathy-glib/debug-internal.h" #include "telepathy-glib/proxy-internal.h" -#include "telepathy-glib/_gen/tp-cli-protocol-body.h" - #include struct _TpProtocolClass diff --git a/telepathy-glib/proxy.c b/telepathy-glib/proxy.c index b18d3d1..96792c1 100644 --- a/telepathy-glib/proxy.c +++ b/telepathy-glib/proxy.c @@ -37,9 +37,6 @@ #include "client-factory-internal.h" #include "util-internal.h" - -#include "_gen/tp-cli-generic-body.h" - #if 0 #define MORE_DEBUG DEBUG #else -- 1.7.10