On Fri, 15 Feb 2008 at 17:22:51 +0000, Simon McVittie wrote:
> On Fri, 15 Feb 2008 at 16:26:47 +0000, Simon McVittie wrote:
> > Here's the result of running `make distcheck` for r286 and fixing everything
> > that didn't build. See attached.
> 
> The attached patch does all that, and also auto-generates client and
> service API.

Oops, pastebinned the patch but didn't add it. See pastebin or the attached.

    SMcV
Property changes on: .
___________________________________________________________________
Name: svn:ignore
   - aclocal.m4
autom4te.cache
config.guess
config.cache
config.h
config.h.in
config.log
config.status
config.sub
configure
install-sh
libtool
ltmain.sh
missing
stamp-h1
depcomp
compile
gtk-doc.make
*.pc
Makefile
Makefile.in
INSTALL

   + aclocal.m4
autom4te.cache
config.guess
config.cache
config.h
config.h.in
config.log
config.status
config.sub
configure
install-sh
libtool
ltmain.sh
missing
stamp-h1
depcomp
compile
gtk-doc.make
*.pc
Makefile
Makefile.in
INSTALL
telepathy-mission-control-*.tar.*



Property changes on: test
___________________________________________________________________
Name: svn:ignore
   - .deps
Makefile
Makefile.in

   + .deps
.libs
Makefile
Makefile.in
mc-client


Index: libmissioncontrol.pc.in
===================================================================
--- libmissioncontrol.pc.in	(revision 284)
+++ libmissioncontrol.pc.in	(working copy)
@@ -6,7 +6,7 @@
 
 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@
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 284)
+++ ChangeLog	(working copy)
@@ -1,3 +1,34 @@
+<unmerged>  Simon McVittie  <[EMAIL PROTECTED]>
+
+	* 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  <[EMAIL PROTECTED]>
 
 	* tools/: update from telepathy-glib/telepathy-spec and pull in
Index: tools/Makefile.am
===================================================================
--- tools/Makefile.am	(revision 284)
+++ tools/Makefile.am	(working copy)
@@ -10,7 +10,8 @@
     glib-gtypes-generator.py \
     glib-signals-marshal-gen.py \
     identity.xsl \
-    libglibcodegen.py
+    libglibcodegen.py \
+    spec-to-introspect.xsl
 
 CLEANFILES = libglibcodegen.pyc libglibcodegen.pyo
 
Index: xml/nmc4.xml
===================================================================
--- xml/nmc4.xml	(revision 284)
+++ xml/nmc4.xml	(working copy)
@@ -1,9 +1,9 @@
-<mc:spec
-    xmlns:mc="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0";
+<tp:spec
+    xmlns:tp="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>
+<tp:copyright>Copyright (C) 2007 Nokia Corporation</tp:copyright>
 
 <xi:include href="MissionControl.xml"/>
 
-</mc:spec>
+</tp:spec>
Index: xml/MissionControl.xml
===================================================================
--- xml/MissionControl.xml	(revision 284)
+++ xml/MissionControl.xml	(working copy)
@@ -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
Index: xml/all.xml
===================================================================
--- xml/all.xml	(revision 0)
+++ xml/all.xml	(revision 0)
@@ -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>
Index: xml/Makefile.am
===================================================================
--- xml/Makefile.am	(revision 284)
+++ xml/Makefile.am	(working copy)
@@ -1,21 +1,22 @@
+tools_dir = $(top_srcdir)/tools
+
 XSLTFLAGS = --nonet --novalid
 DROP_NAMESPACE = sed -e '[EMAIL PROTECTED]: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) > $@
+%-gen.xml: %.xml $(tools_dir)/spec-to-introspect.xsl
+	$(XSLTPROC) $(XSLTFLAGS) $(tools_dir)/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 $< > $@
-
 clean-local:
 	rm -f $(SPECS_GEN)
 
-EXTRA_DIST = mcd-dbus-services.xml $(SPECS)
-
+EXTRA_DIST = \
+	all.xml \
+	nmc4.xml \
+	$(SPECS)
Index: xml/mcd-dbus-services.xml
===================================================================
--- xml/mcd-dbus-services.xml	(revision 284)
+++ xml/mcd-dbus-services.xml	(working copy)
@@ -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>
Index: configure.ac
===================================================================
--- configure.ac	(revision 284)
+++ configure.ac	(working copy)
@@ -10,6 +10,7 @@
 AC_PROG_CXX
 AC_PROG_INSTALL
 AC_PROG_LIBTOOL
+AM_PROG_MKDIR_P
 
 AC_HEADER_STDC
 
Index: doc/Makefile.am
===================================================================
--- doc/Makefile.am	(revision 284)
+++ doc/Makefile.am	(working copy)
@@ -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:

Property changes on: doc/reference/libmissioncontrol
___________________________________________________________________
Name: svn:ignore
   - Makefile.in
Makefile

   + .libs
.deps
Makefile.in
Makefile
*.stamp
html
xml
libmissioncontrol.args
libmissioncontrol.signals
libmissioncontrol.prerequisites
libmissioncontrol-undocumented.txt
libmissioncontrol.hierarchy
libmissioncontrol-unused.txt
libmissioncontrol-undeclared.txt
libmissioncontrol.interfaces
libmissioncontrol-decl.txt
libmissioncontrol-decl-list.txt
*.bak


Index: doc/reference/libmissioncontrol/Makefile.am
===================================================================
--- doc/reference/libmissioncontrol/Makefile.am	(revision 284)
+++ doc/reference/libmissioncontrol/Makefile.am	(working copy)
@@ -63,8 +63,17 @@
 # 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

Property changes on: doc/reference/libmissioncontrol/tmpl
___________________________________________________________________
Name: svn:ignore
   + *.bak
libmissioncontrol-unused.sgml
mission-control.sgml



Property changes on: doc/reference/libmissioncontrol-server
___________________________________________________________________
Name: svn:ignore
   - Makefile.in
Makefile

   + .libs
.deps
Makefile.in
Makefile
*.stamp
html
xml
libmissioncontrol-server.args
libmissioncontrol-server.signals
libmissioncontrol-server.prerequisites
libmissioncontrol-server-undocumented.txt
libmissioncontrol-server.hierarchy
libmissioncontrol-server-unused.txt
libmissioncontrol-server-undeclared.txt
libmissioncontrol-server.interfaces
libmissioncontrol-server-decl.txt
libmissioncontrol-server-decl-list.txt


Index: doc/reference/libmissioncontrol-server/libmissioncontrol-server.types
===================================================================
--- doc/reference/libmissioncontrol-server/libmissioncontrol-server.types	(revision 0)
+++ doc/reference/libmissioncontrol-server/libmissioncontrol-server.types	(revision 0)
@@ -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
Index: doc/reference/libmissioncontrol-server/Makefile.am
===================================================================
--- doc/reference/libmissioncontrol-server/Makefile.am	(revision 284)
+++ doc/reference/libmissioncontrol-server/Makefile.am	(working copy)
@@ -61,8 +61,19 @@
 # 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

Property changes on: doc/reference/libmissioncontrol-server/tmpl
___________________________________________________________________
Name: svn:ignore
   + *.bak
libmissioncontrol-server-unused.sgml


Index: Makefile.am
===================================================================
--- Makefile.am	(revision 286)
+++ Makefile.am	(working copy)
@@ -3,3 +3,4 @@
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = libmissioncontrol.pc mission-control.pc
 
+DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc

Property changes on: libmissioncontrol
___________________________________________________________________
Name: svn:ignore
   - .libs
.deps
Makefile
Makefile.in
test
mc-account
*-enum-types.[ch]
*-signals-marshal.[ch]
mc-client-lib-gen.h

   + .libs
.deps
Makefile
Makefile.in
test
mc-account
*-enum-types.[ch]
*-signals-marshal.[ch]
mc-client-lib-gen.h
_gen


Index: libmissioncontrol/svc-nmc4.h
===================================================================
--- libmissioncontrol/svc-nmc4.h	(revision 0)
+++ libmissioncontrol/svc-nmc4.h	(revision 0)
@@ -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
Index: libmissioncontrol/dbus-api.c
===================================================================
--- libmissioncontrol/dbus-api.c	(revision 0)
+++ libmissioncontrol/dbus-api.c	(revision 0)
@@ -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"
Index: libmissioncontrol/mission-control.h
===================================================================
--- libmissioncontrol/mission-control.h	(revision 284)
+++ libmissioncontrol/mission-control.h	(working copy)
@@ -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 ())
 
Index: libmissioncontrol/cli-nmc4.c
===================================================================
--- libmissioncontrol/cli-nmc4.c	(revision 0)
+++ libmissioncontrol/cli-nmc4.c	(revision 0)
@@ -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));
+}
Index: libmissioncontrol/dbus-api.h
===================================================================
--- libmissioncontrol/dbus-api.h	(revision 0)
+++ libmissioncontrol/dbus-api.h	(revision 0)
@@ -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
Index: libmissioncontrol/cli-nmc4.h
===================================================================
--- libmissioncontrol/cli-nmc4.h	(revision 0)
+++ libmissioncontrol/cli-nmc4.h	(revision 0)
@@ -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
Index: libmissioncontrol/Makefile.am
===================================================================
--- libmissioncontrol/Makefile.am	(revision 284)
+++ libmissioncontrol/Makefile.am	(working copy)
@@ -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 @@
 
 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 @@
 	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,8 +55,27 @@
         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)
 
 libmissioncontrol_client_la_LDFLAGS = $(common_ldflags) \
@@ -101,3 +132,82 @@
 	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_

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Telepathy mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/telepathy

Reply via email to