diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2008-02-18 14:32:22 +0000 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2008-02-18 14:32:22 +0000 |
commit | 7880b97d1c330c6651d6e820fd442251d5bd4ced (patch) | |
tree | 860134b93a0f9c6572096efb98404ed3ad0053aa | |
parent | a7a591133887897bf6eb4e8afa18e3e421008c64 (diff) | |
download | telepathy-mission-control-7880b97d1c330c6651d6e820fd442251d5bd4ced.tar.gz |
* libmissioncontrol.pc.in: require newer libtelepathy, telepathy-glib
* libmissioncontrol/dbus-api.[ch], libmissioncontrol/mission-control.h:
move MissionControl D-Bus interface constants into a new shared header,
and auto-generate GTypes and enums from XML (in theory - currently
there are none)
* libmissioncontrol/cli-nmc4.[ch]: add McCliNMC4, a TpProxy subclass
representing the MC 4.x D-Bus API
* libmissioncontrol/svc-nmc4.[ch]: add McSvcNMC4, a GInterface
representing the MC 4.x D-Bus API
* libmissioncontrol/Makefile.am: auto-generate stuff for McCliNMC4,
McSvcNMC4 and dbus-api.h
* xml/, doc/Makefile.am: move mcd-dbus-services.xml to nmc4.xml,
add all.xml (this is to fit in better with telepathy-glib code-gen)
* configure.ac: check for mkdir -p
* doc/reference/libmissioncontrol/Makefile.am: fix out-of-tree build
against generated headers
* doc/reference/libmissioncontrol-server/libmissioncontrol-server.types:
reconstruct missing file which broke distcheck
* Makefile.am: use --enable-gtk-doc when running distcheck
git-svn-id: https://mission-control.svn.sourceforge.net/svnroot/mission-control/trunk@287 d91c8aed-3f2b-0410-a83d-924a1c20a0ba
-rw-r--r-- | ChangeLog | 31 | ||||
-rw-r--r-- | Makefile.am | 1 | ||||
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | doc/Makefile.am | 4 | ||||
-rw-r--r-- | doc/reference/libmissioncontrol-server/Makefile.am | 15 | ||||
-rw-r--r-- | doc/reference/libmissioncontrol-server/libmissioncontrol-server.types | 32 | ||||
-rw-r--r-- | doc/reference/libmissioncontrol/Makefile.am | 13 | ||||
-rw-r--r-- | libmissioncontrol.pc.in | 2 | ||||
-rw-r--r-- | libmissioncontrol/Makefile.am | 118 | ||||
-rw-r--r-- | libmissioncontrol/cli-nmc4.c | 111 | ||||
-rw-r--r-- | libmissioncontrol/cli-nmc4.h | 58 | ||||
-rw-r--r-- | libmissioncontrol/dbus-api.c | 26 | ||||
-rw-r--r-- | libmissioncontrol/dbus-api.h | 35 | ||||
-rw-r--r-- | libmissioncontrol/mission-control.h | 15 | ||||
-rw-r--r-- | libmissioncontrol/svc-nmc4.h | 28 | ||||
-rw-r--r-- | tools/Makefile.am | 3 | ||||
-rw-r--r-- | xml/Makefile.am | 19 | ||||
-rw-r--r-- | xml/MissionControl.xml | 2 | ||||
-rw-r--r-- | xml/all.xml | 9 | ||||
-rw-r--r-- | xml/mcd-dbus-services.xml | 9 | ||||
-rw-r--r-- | xml/nmc4.xml | 9 |
21 files changed, 502 insertions, 39 deletions
@@ -1,3 +1,34 @@ +2008-02-18 Simon McVittie <simon.mcvittie@collabora.co.uk> + + * libmissioncontrol.pc.in: require newer libtelepathy, telepathy-glib + + * libmissioncontrol/dbus-api.[ch], libmissioncontrol/mission-control.h: + move MissionControl D-Bus interface constants into a new shared header, + and auto-generate GTypes and enums from XML (in theory - currently + there are none) + + * libmissioncontrol/cli-nmc4.[ch]: add McCliNMC4, a TpProxy subclass + representing the MC 4.x D-Bus API + + * libmissioncontrol/svc-nmc4.[ch]: add McSvcNMC4, a GInterface + representing the MC 4.x D-Bus API + + * libmissioncontrol/Makefile.am: auto-generate stuff for McCliNMC4, + McSvcNMC4 and dbus-api.h + + * xml/, doc/Makefile.am: move mcd-dbus-services.xml to nmc4.xml, + add all.xml (this is to fit in better with telepathy-glib code-gen) + + * configure.ac: check for mkdir -p + + * doc/reference/libmissioncontrol/Makefile.am: fix out-of-tree build + against generated headers + + * doc/reference/libmissioncontrol-server/libmissioncontrol-server.types: + reconstruct missing file which broke distcheck + + * Makefile.am: use --enable-gtk-doc when running distcheck + 2008-02-15 Simon McVittie <simon.mcvittie@collabora.co.uk> * tools/: update from telepathy-glib/telepathy-spec and pull in diff --git a/Makefile.am b/Makefile.am index c291c5d7..3aeaa328 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3,3 +3,4 @@ SUBDIRS = tools xml libmissioncontrol src doc server test pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libmissioncontrol.pc mission-control.pc +DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc diff --git a/configure.ac b/configure.ac index 105215b1..f4e369e8 100644 --- a/configure.ac +++ b/configure.ac @@ -10,6 +10,7 @@ AC_PROG_CPP AC_PROG_CXX AC_PROG_INSTALL AC_PROG_LIBTOOL +AM_PROG_MKDIR_P AC_HEADER_STDC diff --git a/doc/Makefile.am b/doc/Makefile.am index 8e4f0de6..b6c81ab5 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,10 +1,10 @@ SUBDIRS = reference -SPECS = $(top_builddir)/xml/mcd-dbus-services.xml +SPECS = $(top_srcdir)/xml/all.xml SPECS_DOC = mc-dbus-iface.html all-local: $(SPECS_DOC) -$(SPECS_DOC): $(SPECS) $(top_builddir)/xml/MissionControl.xml $(top_srcdir)/tools/doc-generator.xsl +$(SPECS_DOC): $(top_srcdir)/xml/all.xml $(wildcard $(top_srcdir)/xml/*.xml) $(top_srcdir)/tools/doc-generator.xsl $(XSLTPROC) --xinclude --novalid $(top_srcdir)/tools/doc-generator.xsl $< > $@ clean-local: diff --git a/doc/reference/libmissioncontrol-server/Makefile.am b/doc/reference/libmissioncontrol-server/Makefile.am index 84759480..7864d9f3 100644 --- a/doc/reference/libmissioncontrol-server/Makefile.am +++ b/doc/reference/libmissioncontrol-server/Makefile.am @@ -61,8 +61,19 @@ content_files= # signals and properties. # e.g. INCLUDES=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS) # e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib) -INCLUDES=-I$(top_srcdir) $(DBUS_CFLAGS) $(TELEPATHY_CFLAGS) -GTKDOC_LIBS=$(top_builddir)/src/libmissioncontrol-server.la $(GCONF_LIBS) $(GLIB_LIBS) $(DBUS_LIBS) $(TELEPATHY_LIBS) +INCLUDES = \ + -I$(top_srcdir) \ + -I$(top_builddir) \ + -I$(top_srcdir)/src \ + -I$(top_builddir)/src \ + $(DBUS_CFLAGS) \ + $(TELEPATHY_CFLAGS) +GTKDOC_LIBS = \ + $(top_builddir)/src/libmissioncontrol-server.la \ + $(GCONF_LIBS) \ + $(GLIB_LIBS) \ + $(DBUS_LIBS) \ + $(TELEPATHY_LIBS) # This includes the standard gtk-doc make rules, copied by gtkdocize. include $(top_srcdir)/gtk-doc.make diff --git a/doc/reference/libmissioncontrol-server/libmissioncontrol-server.types b/doc/reference/libmissioncontrol-server/libmissioncontrol-server.types new file mode 100644 index 00000000..2a990dff --- /dev/null +++ b/doc/reference/libmissioncontrol-server/libmissioncontrol-server.types @@ -0,0 +1,32 @@ +#include <mcd-channel.h> +#include <mcd-connection.h> +#include <mcd-controller.h> +#include <mcd-dispatcher.h> +#include <mcd-manager.h> +#include <mcd-enum-types.h> +#include <mcd-master.h> +#include <mcd-mission.h> +#include <mcd-operation.h> +#include <mcd-presence-frame.h> +#include <mcd-proxy.h> +#include <mcd-provisioning.h> +#include <mcd-provisioning-factory.h> +#include <mcd-service.h> + +mcd_channel_status_get_type +mcd_channel_get_type +mcd_connection_get_type +mcd_controller_get_type +mcd_dispatcher_get_type +mcd_manager_get_type +mcd_master_get_type +mcd_mission_get_type +mcd_mode_get_type +mcd_operation_get_type +mcd_presence_frame_get_type +mcd_provisioning_get_type +mcd_provisioning_error_get_type +mcd_provisioning_factory_get_type +mcd_proxy_get_type +mcd_service_get_type +mcd_system_flags_get_type diff --git a/doc/reference/libmissioncontrol/Makefile.am b/doc/reference/libmissioncontrol/Makefile.am index 3aedc6f3..6a3ed5e8 100644 --- a/doc/reference/libmissioncontrol/Makefile.am +++ b/doc/reference/libmissioncontrol/Makefile.am @@ -63,8 +63,17 @@ content_files= # signals and properties. # e.g. INCLUDES=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS) # e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib) -INCLUDES=-I$(top_srcdir) $(DBUS_CFLAGS) $(TELEPATHY_CFLAGS) -GTKDOC_LIBS=$(top_builddir)/libmissioncontrol/libmissioncontrol-client.la $(GCONF_LIBS) $(GLIB_LIBS) $(DBUS_LIBS) $(TELEPATHY_LIBS) +INCLUDES = \ + -I$(top_srcdir) \ + -I$(top_builddir) \ + $(DBUS_CFLAGS) \ + $(TELEPATHY_CFLAGS) +GTKDOC_LIBS = \ + $(top_builddir)/libmissioncontrol/libmissioncontrol-client.la \ + $(GCONF_LIBS) \ + $(GLIB_LIBS) \ + $(DBUS_LIBS) \ + $(TELEPATHY_LIBS) # This includes the standard gtk-doc make rules, copied by gtkdocize. include $(top_srcdir)/gtk-doc.make diff --git a/libmissioncontrol.pc.in b/libmissioncontrol.pc.in index 41b98a60..efdac24b 100644 --- a/libmissioncontrol.pc.in +++ b/libmissioncontrol.pc.in @@ -6,7 +6,7 @@ profiles_dir=@PROFILES_DIR@ Name: libmissioncontrol Description: Mission Control Client Library -Requires: dbus-1 >= 0.50, libtelepathy >= 0.0.54 +Requires: dbus-1 >= 0.50, libtelepathy >= 0.3.2, telepathy-glib >= 0.7.1 Version: @VERSION@ Libs: -L${libdir} -lmissioncontrol-client @DBUS_LIBS@ Cflags: -I${includedir} @DBUS_CFLAGS@ diff --git a/libmissioncontrol/Makefile.am b/libmissioncontrol/Makefile.am index 3f108275..5e6ee104 100644 --- a/libmissioncontrol/Makefile.am +++ b/libmissioncontrol/Makefile.am @@ -1,15 +1,23 @@ -INCLUDES = $(DBUS_CFLAGS) $(TELEPATHY_CFLAGS) -I$(top_srcdir) \ +INCLUDES = \ + $(DBUS_CFLAGS) \ + $(TELEPATHY_CFLAGS) \ + -I$(top_srcdir) \ + -I$(top_builddir) \ -DMC_DISABLE_DEPRECATED \ -DLIBDIR="@libdir@" -DLIBVERSION="0" BUILT_SOURCES = \ + _gen/all.xml \ + _gen/nmc4.xml \ mission-control-signals-marshal.c \ mission-control-signals-marshal.h \ mc-enum-types.c \ mc-enum-types.h \ mc-signals-marshal.c \ mc-signals-marshal.h \ - mc-client-lib-gen.h + mc-client-lib-gen.h \ + $(nodist_libmissioncontrol_client_la_SOURCES) \ + $(nodist_geninclude_HEADERS) CLEANFILES = $(BUILT_SOURCES) stamp-mc-enum-types.h @@ -17,6 +25,8 @@ lib_LTLIBRARIES = libmissioncontrol-client.la libmissioncontrol_client_la_CFLAGS = $(GLIB_CFLAGS) $(GCONF_CFLAGS) libmissioncontrol_client_la_SOURCES = \ + cli-nmc4.c \ + dbus-api.c \ mc.c\ mc-manager.c \ mc-manager-priv.h \ @@ -33,7 +43,9 @@ libmissioncontrol_client_la_SOURCES = \ mission-control.c libmissioncontrol_client_includedir = $(includedir)/libmissioncontrol -libmissioncontrol_client_include_DATA = \ +libmissioncontrol_client_include_HEADERS = \ + cli-nmc4.h \ + dbus-api.h \ mc.h \ mc-account.h \ mc-account-monitor.h \ @@ -43,7 +55,26 @@ libmissioncontrol_client_include_DATA = \ mc-manager.h \ mc-signals-marshal.h \ mission-control-signals-marshal.h \ - mission-control.h + mission-control.h \ + svc-nmc4.h + +genincludedir = $(libmissioncontrol_client_includedir)/_gen +nodist_geninclude_HEADERS = \ + _gen/cli-nmc4.h \ + _gen/enums.h \ + _gen/interfaces.h \ + _gen/gtypes.h \ + _gen/svc-nmc4.h + +nodist_libmissioncontrol_client_la_SOURCES = \ + _gen/cli-nmc4-body.h \ + _gen/gtypes-body.h \ + _gen/interfaces-body.h \ + _gen/register-dbus-glib-marshallers-body.h \ + _gen/signals-marshal.c \ + _gen/signals-marshal.h \ + _gen/signals-marshal.list \ + _gen/svc-nmc4.c libmissioncontrol_client_la_LIBADD = $(GCONF_LIBS) $(GLIB_LIBS) $(DBUS_LIBS) $(TELEPATHY_LIBS) @@ -101,3 +132,82 @@ EXTRA_DIST = \ mission-control-signals-marshal.list \ mc-signals-marshal.list +# ---- telepathy-glib-style code generation ---- + +tools_dir = $(top_srcdir)/tools + +_gen/%.xml: $(top_srcdir)/xml/%.xml $(wildcard $(top_srcdir)/xml/*.xml) + $(mkdir_p) _gen + $(XSLTPROC) $(XSLTPROCFLAGS) --xinclude $(tools_dir)/identity.xsl \ + $< > $@ + +# Generated files which can be done for all "classes" at once + +_gen/gtypes.h _gen/gtypes-body.h: _gen/all.xml \ + $(top_srcdir)/tools/glib-gtypes-generator.py + $(PYTHON) $(top_srcdir)/tools/glib-gtypes-generator.py \ + $< _gen/gtypes mc + +_gen/signals-marshal.list: _gen/all.xml \ + $(tools_dir)/glib-signals-marshal-gen.py + $(PYTHON) $(tools_dir)/glib-signals-marshal-gen.py $< > $@ + +_gen/signals-marshal.h: _gen/signals-marshal.list + $(GLIB_GENMARSHAL) --header --prefix=_mc_ext_marshal $< > $@ + +_gen/signals-marshal.c: _gen/signals-marshal.list + $(GLIB_GENMARSHAL) --body --prefix=_mc_ext_marshal $< > $@ + +_gen/register-dbus-glib-marshallers-body.h: _gen/all.xml \ + $(tools_dir)/glib-client-marshaller-gen.py + $(PYTHON) $(tools_dir)/glib-client-marshaller-gen.py $< \ + _mc_ext > $@ + +_gen/enums.h: _gen/all.xml $(tools_dir)/c-constants-generator.xsl + $(XSLTPROC) $(XSLTPROCFLAGS) \ + --stringparam mixed-case-prefix mc \ + $(tools_dir)/c-constants-generator.xsl \ + $< > $@ + +_gen/interfaces.h: _gen/all.xml \ + $(tools_dir)/glib-interfaces-generator.xsl \ + $(tools_dir)/c-interfaces-generator.xsl + $(XSLTPROC) $(XSLTPROCFLAGS) \ + --stringparam mixed-case-prefix mc \ + $(tools_dir)/glib-interfaces-generator.xsl \ + $< > $@ + +_gen/interfaces-body.h: _gen/all.xml \ + $(tools_dir)/glib-interfaces-body-generator.xsl \ + $(tools_dir)/c-interfaces-generator.xsl + $(XSLTPROC) $(XSLTPROCFLAGS) \ + --stringparam mixed-case-prefix mc \ + $(tools_dir)/glib-interfaces-body-generator.xsl \ + $< > $@ + + +# Generated files which must be generated per "class". +# (Currently the only "class" is nmc4, but the new API will need "classes" +# like account, account-manager, ...) + +_gen/%.xml: $(top_srcdir)/xml/%.xml $(wildcard $(top_srcdir)/xml/*.xml) + $(mkdir_p) _gen + $(XSLTPROC) $(XSLTPROCFLAGS) --xinclude $(tools_dir)/identity.xsl \ + $< > $@ + +_gen/cli-%-body.h _gen/cli-%.h: _gen/%.xml \ + $(tools_dir)/glib-client-gen.py Makefile.am + $(PYTHON) $(tools_dir)/glib-client-gen.py \ + --group=`echo $* | tr x- x_` \ + --iface-quark-prefix=MC_IFACE_QUARK \ + $< Mc_Cli _gen/cli-$* + +_gen/svc-%.c _gen/svc-%.h: _gen/%.xml \ + $(tools_dir)/glib-ginterface-gen.py Makefile.am + $(PYTHON) $(tools_dir)/glib-ginterface-gen.py \ + --filename=_gen/svc-$* \ + --signal-marshal-prefix=_mc_ext \ + --include='<telepathy-glib/dbus.h>' \ + --include='"_gen/signals-marshal.h"' \ + --not-implemented-func='tp_dbus_g_method_return_not_implemented' \ + $< Mc_Svc_ diff --git a/libmissioncontrol/cli-nmc4.c b/libmissioncontrol/cli-nmc4.c new file mode 100644 index 00000000..12f777c4 --- /dev/null +++ b/libmissioncontrol/cli-nmc4.c @@ -0,0 +1,111 @@ +/* + * cli-nmc4.c - the Nokia Mission Control 4.x D-Bus interface (client side) + * + * Copyright (C) 2008 Collabora Ltd. <http://www.collabora.co.uk/> + * Copyright (C) 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 "libmissioncontrol/cli-nmc4.h" + +#include <telepathy-glib/proxy-subclass.h> + +#include "libmissioncontrol/mission-control.h" + +#include "libmissioncontrol/_gen/cli-nmc4-body.h" + +/** + * SECTION:cli-nmc4 + * @title: McCliNMC4 + * @short_description: proxy object for the Nokia Mission Control 4.x D-Bus API + * + * This module provides a client-side proxy object for the NMC 4.x D-Bus API, + * for use until the modular D-Bus API becomes available. + * + * Since: FIXME + */ + +/** + * McCliNMC4Class: + * + * The class of a #McCliNMC4. + * + * Since: FIXME + */ +struct _McCliNMC4Class { + TpProxyClass parent_class; + /*<private>*/ + gpointer priv; +}; + +/** + * McCliNMC4: + * + * A proxy object for the Nokia Mission Control 4.x D-Bus API. This is a + * subclass of #TpProxy. + * + * Since: FIXME + */ +struct _McCliNMC4 { + TpProxy parent; + /*<private>*/ + gpointer priv; +}; + +G_DEFINE_TYPE (McCliNMC4, + mc_cli_nmc4, + TP_TYPE_PROXY); + +static void +mc_cli_nmc4_init (McCliNMC4 *self) +{ +} + +static void +mc_cli_nmc4_class_init (McCliNMC4Class *klass) +{ + GType type = MC_TYPE_CLI_NMC4; + TpProxyClass *proxy_class = (TpProxyClass *) klass; + + /* the API is stateless, so we can keep the same proxy across restarts */ + proxy_class->must_have_unique_name = FALSE; + + proxy_class->interface = MC_IFACE_QUARK_NMC4; + tp_proxy_or_subclass_hook_on_interface_add (type, mc_cli_nmc4_add_signals); + + tp_proxy_subclass_add_error_mapping (type, TP_ERROR_PREFIX, TP_ERRORS, + TP_TYPE_ERROR); +} + +/** + * mc_cli_nmc4_new: + * @dbus: a D-Bus daemon; may not be %NULL + * + * <!-- --> + * + * Returns: a new NMC 4.x proxy + * + * Since: FIXME + */ +McCliNMC4 * +mc_cli_nmc4_new (TpDBusDaemon *dbus) +{ + return MC_CLI_NMC4 (g_object_new (MC_TYPE_CLI_NMC4, + "dbus-daemon", dbus, + "bus-name", MISSION_CONTROL_SERVICE, + "object-path", MISSION_CONTROL_PATH, + NULL)); +} diff --git a/libmissioncontrol/cli-nmc4.h b/libmissioncontrol/cli-nmc4.h new file mode 100644 index 00000000..bbfa3b63 --- /dev/null +++ b/libmissioncontrol/cli-nmc4.h @@ -0,0 +1,58 @@ +/* + * cli-nmc4.h - the Nokia Mission Control 4.x D-Bus interface (client side) + * + * Copyright (C) 2008 Collabora Ltd. <http://www.collabora.co.uk/> + * Copyright (C) 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 + */ + +#ifndef __LIBMISSIONCONTROL_CLI_NMC4_H__ +#define __LIBMISSIONCONTROL_CLI_NMC4_H__ + +#include <telepathy-glib/proxy.h> + +G_BEGIN_DECLS + +typedef struct _McCliNMC4 McCliNMC4; +typedef struct _McCliNMC4Class McCliNMC4Class; +typedef struct _McCliNMC4Private McCliNMC4Private; + +GType mc_cli_nmc4_get_type (void); + +#define MC_TYPE_CLI_NMC4 \ + (mc_cli_nmc4_get_type ()) +#define MC_CLI_NMC4(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST ((obj), MC_TYPE_CLI_NMC4, \ + McCliNMC4)) +#define MC_CLI_NMC4_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST ((klass), MC_TYPE_CLI_NMC4, \ + McCliNMC4Class)) +#define MC_IS_CLI_NMC4(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MC_TYPE_CLI_NMC4)) +#define MC_IS_CLI_NMC4_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE ((klass), MC_TYPE_CLI_NMC4)) +#define MC_CLI_NMC4_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS ((obj), MC_TYPE_CLI_NMC4, \ + McCliNokiaMC4Class)) + +McCliNMC4 *mc_cli_nmc4_new (TpDBusDaemon *dbus); + +G_END_DECLS + +/* auto-generated stubs */ +#include <libmissioncontrol/_gen/cli-nmc4.h> + +#endif diff --git a/libmissioncontrol/dbus-api.c b/libmissioncontrol/dbus-api.c new file mode 100644 index 00000000..f8409160 --- /dev/null +++ b/libmissioncontrol/dbus-api.c @@ -0,0 +1,26 @@ +/* + * dbus-api.c - Mission Control D-Bus API strings, enums etc. + * + * Copyright (C) 2008 Collabora Ltd. <http://www.collabora.co.uk/> + * Copyright (C) 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 <libmissioncontrol/dbus-api.h> + +/* auto-generated stubs */ +#include "_gen/gtypes-body.h" +#include "_gen/interfaces-body.h" diff --git a/libmissioncontrol/dbus-api.h b/libmissioncontrol/dbus-api.h new file mode 100644 index 00000000..24a4812f --- /dev/null +++ b/libmissioncontrol/dbus-api.h @@ -0,0 +1,35 @@ +/* + * dbus-api.h - Mission Control D-Bus API strings, enums etc. + * + * Copyright (C) 2008 Collabora Ltd. <http://www.collabora.co.uk/> + * Copyright (C) 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 + */ + +#ifndef __LIBMISSIONCONTROL_DBUS_API_H__ +#define __LIBMISSIONCONTROL_DBUS_API_H__ + +#include <glib/gquark.h> + +#define MISSION_CONTROL_SERVICE "org.freedesktop.Telepathy.MissionControl" +#define MISSION_CONTROL_IFACE "org.freedesktop.Telepathy.MissionControl" +#define MISSION_CONTROL_PATH "/org/freedesktop/Telepathy/MissionControl" + +#include <libmissioncontrol/_gen/enums.h> +#include <libmissioncontrol/_gen/gtypes.h> +#include <libmissioncontrol/_gen/interfaces.h> + +#endif diff --git a/libmissioncontrol/mission-control.h b/libmissioncontrol/mission-control.h index 9ac97168..5a6a9d61 100644 --- a/libmissioncontrol/mission-control.h +++ b/libmissioncontrol/mission-control.h @@ -29,18 +29,17 @@ #define DBUS_API_SUBJECT_TO_CHANGE #endif -#include "dbus/dbus-glib.h" -#include "dbus/dbus-glib-lowlevel.h" -#include "dbus/dbus.h" +#include <sys/types.h> +#include <unistd.h> + +#include <dbus/dbus-glib.h> +#include <dbus/dbus-glib-lowlevel.h> +#include <dbus/dbus.h> #include <libtelepathy/tp-constants.h> #include <libtelepathy/tp-conn.h> #include <libtelepathy/tp-chan.h> -#include <sys/types.h> -#include <unistd.h> -#define MISSION_CONTROL_SERVICE "org.freedesktop.Telepathy.MissionControl" -#define MISSION_CONTROL_IFACE "org.freedesktop.Telepathy.MissionControl" -#define MISSION_CONTROL_PATH "/org/freedesktop/Telepathy/MissionControl" +#include <libmissioncontrol/dbus-api.h> #define MISSIONCONTROL_TYPE (mission_control_get_type ()) diff --git a/libmissioncontrol/svc-nmc4.h b/libmissioncontrol/svc-nmc4.h new file mode 100644 index 00000000..1d7ed940 --- /dev/null +++ b/libmissioncontrol/svc-nmc4.h @@ -0,0 +1,28 @@ +/* + * svc-nmc4.h - the Nokia Mission Control 4.x D-Bus interface (service side) + * + * Copyright (C) 2008 Collabora Ltd. <http://www.collabora.co.uk/> + * Copyright (C) 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 + */ + +#ifndef __LIBMISSIONCONTROL_SVC_NMC4_H__ +#define __LIBMISSIONCONTROL_SVC_NMC4_H__ + +/* auto-generated stubs */ +#include <libmissioncontrol/_gen/svc-nmc4.h> + +#endif diff --git a/tools/Makefile.am b/tools/Makefile.am index de4787eb..1e9fe2ed 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -10,7 +10,8 @@ EXTRA_DIST = \ glib-gtypes-generator.py \ glib-signals-marshal-gen.py \ identity.xsl \ - libglibcodegen.py + libglibcodegen.py \ + spec-to-introspect.xsl CLEANFILES = libglibcodegen.pyc libglibcodegen.pyo diff --git a/xml/Makefile.am b/xml/Makefile.am index 59acd261..e3056898 100644 --- a/xml/Makefile.am +++ b/xml/Makefile.am @@ -1,21 +1,22 @@ +tools_dir = $(top_srcdir)/tools + XSLTFLAGS = --nonet --novalid DROP_NAMESPACE = sed -e 's@xmlns:tp="http://telepathy\.freedesktop\.org/wiki/DbusSpec.extensions-v0"@@g' + SPECS = MissionControl.xml SPECS_GEN = ${SPECS:.xml=-gen.xml} all-local: $(SPECS_GEN) -%-gen.xml: %.xml $(top_srcdir)/tools/spec-to-introspect.xsl - $(XSLTPROC) $(XSLTFLAGS) $(top_srcdir)/tools/spec-to-introspect.xsl $< | $(DROP_NAMESPACE) > $@ - -#modified/%.xml: %.xml $(top_srcdir)/tools/add-client-c-symbol.xsl -# @mkdir -p modified -# $(XSLTPROC) $(XSLTFLAGS) --stringparam basename $* \ -# $(top_srcdir)/tools/add-client-c-symbol.xsl $< > $@ +%-gen.xml: %.xml $(tools_dir)/spec-to-introspect.xsl + $(XSLTPROC) $(XSLTFLAGS) $(tools_dir)/spec-to-introspect.xsl $< \ + | $(DROP_NAMESPACE) > $@ clean-local: rm -f $(SPECS_GEN) -EXTRA_DIST = mcd-dbus-services.xml $(SPECS) - +EXTRA_DIST = \ + all.xml \ + nmc4.xml \ + $(SPECS) diff --git a/xml/MissionControl.xml b/xml/MissionControl.xml index 8ec17e80..5110e43e 100644 --- a/xml/MissionControl.xml +++ b/xml/MissionControl.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<node name="/Mission_Control" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0"> +<node name="/NMC4" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0"> <tp:copyright>Copyright (C) 2007 Nokia Corporation</tp:copyright> <tp:license xmlns="http://www.w3.org/1999/xhtml"> <p>This library is free software; you can redistribute it and/or diff --git a/xml/all.xml b/xml/all.xml new file mode 100644 index 00000000..3bcdc851 --- /dev/null +++ b/xml/all.xml @@ -0,0 +1,9 @@ +<tp:spec + xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0" + xmlns:xi="http://www.w3.org/2001/XInclude"> + +<tp:copyright>Copyright (C) 2007 Nokia Corporation</tp:copyright> + +<xi:include href="nmc4.xml"/> + +</tp:spec> diff --git a/xml/mcd-dbus-services.xml b/xml/mcd-dbus-services.xml deleted file mode 100644 index ae4c6e28..00000000 --- a/xml/mcd-dbus-services.xml +++ /dev/null @@ -1,9 +0,0 @@ -<mc:spec - xmlns:mc="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0" - xmlns:xi="http://www.w3.org/2001/XInclude"> - -<mc:copyright>Copyright (C) 2007 Nokia Corporation</mc:copyright> - -<xi:include href="MissionControl.xml"/> - -</mc:spec> diff --git a/xml/nmc4.xml b/xml/nmc4.xml new file mode 100644 index 00000000..a966f556 --- /dev/null +++ b/xml/nmc4.xml @@ -0,0 +1,9 @@ +<tp:spec + xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0" + xmlns:xi="http://www.w3.org/2001/XInclude"> + +<tp:copyright>Copyright (C) 2007 Nokia Corporation</tp:copyright> + +<xi:include href="MissionControl.xml"/> + +</tp:spec> |