summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlberto Mardegan <mardy@users.sourceforge.net>2008-03-07 14:47:52 +0000
committerAlberto Mardegan <mardy@users.sourceforge.net>2008-03-07 14:47:52 +0000
commitaaa0f8f16e771b9c8977664b920ba093b24c25c5 (patch)
tree6c029ab20582bfc2eeffdf2588e988a10f16d6be
parentf02ee511f5ffacd0f6044bf872c1de792afd586e (diff)
downloadtelepathy-mission-control-aaa0f8f16e771b9c8977664b920ba093b24c25c5.tar.gz
* src/Makefile.am, src/mcd-account-manager.h, src/mcd-account.h:
Implement server-side stubs. * Makefile.am, configure.ac, libmcclient.pc.in, libmcclient/*, libmissioncontrol/dbus-api.h, xml/Account.xml, xml/Account_Manager.xml, xml/Makefile.am, xml/all.xml: Add Account and AccountManager specifications, and implement stubs in libmcclient. git-svn-id: https://mission-control.svn.sourceforge.net/svnroot/mission-control/trunk@301 d91c8aed-3f2b-0410-a83d-924a1c20a0ba
-rw-r--r--ChangeLog11
-rw-r--r--Makefile.am4
-rw-r--r--configure.ac2
-rw-r--r--doc/reference/libmissioncontrol-server/tmpl/mcd-channel.sgml2
-rw-r--r--doc/reference/libmissioncontrol-server/tmpl/mcd-connection.sgml1
-rw-r--r--doc/reference/libmissioncontrol-server/tmpl/mcd-controller.sgml1
-rw-r--r--doc/reference/libmissioncontrol-server/tmpl/mcd-dispatcher.sgml1
-rw-r--r--doc/reference/libmissioncontrol-server/tmpl/mcd-manager.sgml1
-rw-r--r--doc/reference/libmissioncontrol-server/tmpl/mcd-master.sgml21
-rw-r--r--doc/reference/libmissioncontrol-server/tmpl/mcd-mission.sgml60
-rw-r--r--doc/reference/libmissioncontrol-server/tmpl/mcd-operation.sgml17
-rw-r--r--doc/reference/libmissioncontrol-server/tmpl/mcd-presence-frame.sgml55
-rw-r--r--doc/reference/libmissioncontrol-server/tmpl/mcd-proxy.sgml6
-rw-r--r--doc/reference/libmissioncontrol-server/tmpl/mcd-service.sgml87
-rw-r--r--doc/reference/libmissioncontrol/tmpl/mission-control.sgml1
-rw-r--r--libmcclient.pc.in12
-rw-r--r--libmcclient/Makefile.am146
-rw-r--r--libmcclient/dbus-api.c26
-rw-r--r--libmcclient/dbus-api.h38
-rw-r--r--libmcclient/mc-account-manager.c110
-rw-r--r--libmcclient/mc-account-manager.h59
-rw-r--r--libmcclient/mc-account.c109
-rw-r--r--libmcclient/mc-account.h58
-rw-r--r--libmcclient/mc-signals-marshal.list1
-rw-r--r--libmissioncontrol/dbus-api.h3
-rw-r--r--src/Makefile.am106
-rw-r--r--xml/Account.xml423
-rw-r--r--xml/Account_Manager.xml165
-rw-r--r--xml/Makefile.am4
-rw-r--r--xml/all.xml13
30 files changed, 1526 insertions, 17 deletions
diff --git a/ChangeLog b/ChangeLog
index 735cc363..3adb1adb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2008-03-07 Alberto Mardegan <alberto.mardegan@nokia.com>
+
+ * src/Makefile.am, src/mcd-account-manager.h, src/mcd-account.h:
+ Implement server-side stubs.
+
+ * Makefile.am, configure.ac, libmcclient.pc.in, libmcclient/*,
+ libmissioncontrol/dbus-api.h, xml/Account.xml,
+ xml/Account_Manager.xml, xml/Makefile.am, xml/all.xml:
+ Add Account and AccountManager specifications, and implement stubs in
+ libmcclient.
+
=== telepathy-mission-control 4.62 ===
2008-03-06 Alberto Mardegan <alberto.mardegan@nokia.com>
diff --git a/Makefile.am b/Makefile.am
index 3aeaa328..c1a2f65c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,6 @@
-SUBDIRS = tools xml libmissioncontrol src doc server test
+SUBDIRS = tools xml libmcclient libmissioncontrol src doc server test
pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = libmissioncontrol.pc mission-control.pc
+pkgconfig_DATA = libmcclient.pc libmissioncontrol.pc mission-control.pc
DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc
diff --git a/configure.ac b/configure.ac
index 625e3c78..a95110c0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -161,6 +161,7 @@ AC_SUBST(pluginlibdir)
AC_OUTPUT([
Makefile \
+libmcclient.pc \
mission-control.pc \
libmissioncontrol.pc \
src/Makefile \
@@ -171,6 +172,7 @@ tools/Makefile \
doc/reference/Makefile \
doc/reference/libmissioncontrol/Makefile \
doc/reference/libmissioncontrol-server/Makefile \
+libmcclient/Makefile \
libmissioncontrol/Makefile \
server/Makefile \
])
diff --git a/doc/reference/libmissioncontrol-server/tmpl/mcd-channel.sgml b/doc/reference/libmissioncontrol-server/tmpl/mcd-channel.sgml
index 9bc09520..2abe575c 100644
--- a/doc/reference/libmissioncontrol-server/tmpl/mcd-channel.sgml
+++ b/doc/reference/libmissioncontrol-server/tmpl/mcd-channel.sgml
@@ -22,8 +22,8 @@ McdChannel
</para>
-@parent:
+<!-- ##### SIGNAL McdChannel::members-accepted ##### -->
<para>
</para>
diff --git a/doc/reference/libmissioncontrol-server/tmpl/mcd-connection.sgml b/doc/reference/libmissioncontrol-server/tmpl/mcd-connection.sgml
index a7c30287..03256fe5 100644
--- a/doc/reference/libmissioncontrol-server/tmpl/mcd-connection.sgml
+++ b/doc/reference/libmissioncontrol-server/tmpl/mcd-connection.sgml
@@ -22,7 +22,6 @@ McdConnection
</para>
-@parent:
<!-- ##### ARG McdConnection:account ##### -->
<para>
diff --git a/doc/reference/libmissioncontrol-server/tmpl/mcd-controller.sgml b/doc/reference/libmissioncontrol-server/tmpl/mcd-controller.sgml
index bd59b353..fdf4a7fe 100644
--- a/doc/reference/libmissioncontrol-server/tmpl/mcd-controller.sgml
+++ b/doc/reference/libmissioncontrol-server/tmpl/mcd-controller.sgml
@@ -22,7 +22,6 @@ McdController
</para>
-@parent:
<!-- ##### FUNCTION mcd_controller_new ##### -->
<para>
diff --git a/doc/reference/libmissioncontrol-server/tmpl/mcd-dispatcher.sgml b/doc/reference/libmissioncontrol-server/tmpl/mcd-dispatcher.sgml
index 5a864b9e..044b9e3f 100644
--- a/doc/reference/libmissioncontrol-server/tmpl/mcd-dispatcher.sgml
+++ b/doc/reference/libmissioncontrol-server/tmpl/mcd-dispatcher.sgml
@@ -22,7 +22,6 @@ McdDispatcher
</para>
-@parent:
<!-- ##### SIGNAL McdDispatcher::channel-added ##### -->
<para>
diff --git a/doc/reference/libmissioncontrol-server/tmpl/mcd-manager.sgml b/doc/reference/libmissioncontrol-server/tmpl/mcd-manager.sgml
index 4cbf59e2..933f8f28 100644
--- a/doc/reference/libmissioncontrol-server/tmpl/mcd-manager.sgml
+++ b/doc/reference/libmissioncontrol-server/tmpl/mcd-manager.sgml
@@ -22,7 +22,6 @@ McdManager
</para>
-@parent:
<!-- ##### SIGNAL McdManager::account-added ##### -->
<para>
diff --git a/doc/reference/libmissioncontrol-server/tmpl/mcd-master.sgml b/doc/reference/libmissioncontrol-server/tmpl/mcd-master.sgml
index 14d3762d..435e2eb1 100644
--- a/doc/reference/libmissioncontrol-server/tmpl/mcd-master.sgml
+++ b/doc/reference/libmissioncontrol-server/tmpl/mcd-master.sgml
@@ -22,7 +22,26 @@ McdMaster
</para>
-@parent:
+
+<!-- ##### ARG McdMaster:dbus-connection ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG McdMaster:default-presence ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG McdMaster:dispatcher ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG McdMaster:presence-frame ##### -->
+<para>
+
+</para>
<!-- ##### STRUCT mcd_channel_request ##### -->
<para>
diff --git a/doc/reference/libmissioncontrol-server/tmpl/mcd-mission.sgml b/doc/reference/libmissioncontrol-server/tmpl/mcd-mission.sgml
index 3d94b72b..0bc384dc 100644
--- a/doc/reference/libmissioncontrol-server/tmpl/mcd-mission.sgml
+++ b/doc/reference/libmissioncontrol-server/tmpl/mcd-mission.sgml
@@ -22,7 +22,65 @@ McdMission
</para>
-@parent:
+
+<!-- ##### SIGNAL McdMission::abort ##### -->
+<para>
+
+</para>
+
+@mcdmission: the object which received the signal.
+
+<!-- ##### SIGNAL McdMission::connected ##### -->
+<para>
+
+</para>
+
+@mcdmission: the object which received the signal.
+
+<!-- ##### SIGNAL McdMission::disconnected ##### -->
+<para>
+
+</para>
+
+@mcdmission: the object which received the signal.
+
+<!-- ##### SIGNAL McdMission::flags-changed ##### -->
+<para>
+
+</para>
+
+@mcdmission: the object which received the signal.
+@arg1:
+
+<!-- ##### SIGNAL McdMission::mode-set ##### -->
+<para>
+
+</para>
+
+@mcdmission: the object which received the signal.
+@arg1:
+
+<!-- ##### SIGNAL McdMission::parent-set ##### -->
+<para>
+
+</para>
+
+@mcdmission: the object which received the signal.
+
+<!-- ##### ARG McdMission:mode ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG McdMission:parent ##### -->
+<para>
+
+</para>
+
+<!-- ##### ARG McdMission:system-flags ##### -->
+<para>
+
+</para>
<!-- ##### MACRO MCD_MISSION_GET_FLAGS_MASKED ##### -->
<para>
diff --git a/doc/reference/libmissioncontrol-server/tmpl/mcd-operation.sgml b/doc/reference/libmissioncontrol-server/tmpl/mcd-operation.sgml
index b4771ed1..9d303596 100644
--- a/doc/reference/libmissioncontrol-server/tmpl/mcd-operation.sgml
+++ b/doc/reference/libmissioncontrol-server/tmpl/mcd-operation.sgml
@@ -22,7 +22,22 @@ McdOperation
</para>
-@parent:
+
+<!-- ##### SIGNAL McdOperation::mission-removed ##### -->
+<para>
+
+</para>
+
+@mcdoperation: the object which received the signal.
+@arg1:
+
+<!-- ##### SIGNAL McdOperation::mission-taken ##### -->
+<para>
+
+</para>
+
+@mcdoperation: the object which received the signal.
+@arg1:
<!-- ##### FUNCTION mcd_operation_new ##### -->
<para>
diff --git a/doc/reference/libmissioncontrol-server/tmpl/mcd-presence-frame.sgml b/doc/reference/libmissioncontrol-server/tmpl/mcd-presence-frame.sgml
index 07f7d2f1..f6d0102e 100644
--- a/doc/reference/libmissioncontrol-server/tmpl/mcd-presence-frame.sgml
+++ b/doc/reference/libmissioncontrol-server/tmpl/mcd-presence-frame.sgml
@@ -22,7 +22,60 @@ McdPresenceFrame
</para>
-@parent:
+
+<!-- ##### SIGNAL McdPresenceFrame::presence-actual ##### -->
+<para>
+
+</para>
+
+@mcdpresenceframe: the object which received the signal.
+@arg1:
+@arg2:
+
+<!-- ##### SIGNAL McdPresenceFrame::presence-changed ##### -->
+<para>
+
+</para>
+
+@mcdpresenceframe: the object which received the signal.
+@arg1:
+@arg2:
+@arg3:
+
+<!-- ##### SIGNAL McdPresenceFrame::presence-requested ##### -->
+<para>
+
+</para>
+
+@mcdpresenceframe: the object which received the signal.
+@arg1:
+@arg2:
+
+<!-- ##### SIGNAL McdPresenceFrame::presence-stable ##### -->
+<para>
+
+</para>
+
+@mcdpresenceframe: the object which received the signal.
+@arg1:
+
+<!-- ##### SIGNAL McdPresenceFrame::status-actual ##### -->
+<para>
+
+</para>
+
+@mcdpresenceframe: the object which received the signal.
+@arg1:
+
+<!-- ##### SIGNAL McdPresenceFrame::status-changed ##### -->
+<para>
+
+</para>
+
+@mcdpresenceframe: the object which received the signal.
+@arg1:
+@arg2:
+@arg3:
<!-- ##### FUNCTION mcd_presence_frame_new ##### -->
<para>
diff --git a/doc/reference/libmissioncontrol-server/tmpl/mcd-proxy.sgml b/doc/reference/libmissioncontrol-server/tmpl/mcd-proxy.sgml
index 26720326..c88a71c6 100644
--- a/doc/reference/libmissioncontrol-server/tmpl/mcd-proxy.sgml
+++ b/doc/reference/libmissioncontrol-server/tmpl/mcd-proxy.sgml
@@ -22,7 +22,11 @@ McdProxy
</para>
-@parent:
+
+<!-- ##### ARG McdProxy:proxy-object ##### -->
+<para>
+
+</para>
<!-- ##### FUNCTION mcd_proxy_new ##### -->
<para>
diff --git a/doc/reference/libmissioncontrol-server/tmpl/mcd-service.sgml b/doc/reference/libmissioncontrol-server/tmpl/mcd-service.sgml
index 08b0157b..5bdb8f28 100644
--- a/doc/reference/libmissioncontrol-server/tmpl/mcd-service.sgml
+++ b/doc/reference/libmissioncontrol-server/tmpl/mcd-service.sgml
@@ -22,8 +22,91 @@ McdService
</para>
-@parent:
-@main_loop:
+
+<!-- ##### SIGNAL McdService::account-presence-changed ##### -->
+<para>
+
+</para>
+
+@mcdservice: the object which received the signal.
+@arg1:
+@arg2:
+@arg3:
+@arg4:
+@arg5:
+
+<!-- ##### SIGNAL McdService::account-status-changed ##### -->
+<para>
+
+</para>
+
+@mcdservice: the object which received the signal.
+@arg1:
+@arg2:
+@arg3:
+@arg4:
+
+<!-- ##### SIGNAL McdService::mcd-error ##### -->
+<para>
+
+</para>
+
+@mcdservice: the object which received the signal.
+@arg1:
+@arg2:
+@arg3:
+
+<!-- ##### SIGNAL McdService::presence-changed ##### -->
+<para>
+
+</para>
+
+@mcdservice: the object which received the signal.
+@arg1:
+@arg2:
+
+<!-- ##### SIGNAL McdService::presence-requested ##### -->
+<para>
+
+</para>
+
+@mcdservice: the object which received the signal.
+@arg1:
+@arg2:
+
+<!-- ##### SIGNAL McdService::presence-status-actual ##### -->
+<para>
+
+</para>
+
+@mcdservice: the object which received the signal.
+@arg1:
+
+<!-- ##### SIGNAL McdService::presence-status-requested ##### -->
+<para>
+
+</para>
+
+@mcdservice: the object which received the signal.
+@arg1:
+
+<!-- ##### SIGNAL McdService::status-actual ##### -->
+<para>
+
+</para>
+
+@mcdservice: the object which received the signal.
+@arg1:
+@arg2:
+
+<!-- ##### SIGNAL McdService::used-channels-count-changed ##### -->
+<para>
+
+</para>
+
+@mcdservice: the object which received the signal.
+@arg1:
+@arg2:
<!-- ##### FUNCTION mcd_service_new ##### -->
<para>
diff --git a/doc/reference/libmissioncontrol/tmpl/mission-control.sgml b/doc/reference/libmissioncontrol/tmpl/mission-control.sgml
index dd9033c5..a701f771 100644
--- a/doc/reference/libmissioncontrol/tmpl/mission-control.sgml
+++ b/doc/reference/libmissioncontrol/tmpl/mission-control.sgml
@@ -130,6 +130,7 @@ This callback is called in response to the #mission_control_get_current_status c
@parent:
@first_run:
+@active_callbacks:
<!-- ##### STRUCT missioncontrolclass ##### -->
<para>
diff --git a/libmcclient.pc.in b/libmcclient.pc.in
new file mode 100644
index 00000000..e5ee419e
--- /dev/null
+++ b/libmcclient.pc.in
@@ -0,0 +1,12 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+profiles_dir=@PROFILES_DIR@
+
+Name: libmcclient
+Description: Mission Control Client Library
+Requires: dbus-1 >= 0.50, telepathy-glib >= 0.7.1
+Version: @VERSION@
+Libs: -L${libdir} -lmcclient @DBUS_LIBS@
+Cflags: -I${includedir} @DBUS_CFLAGS@
diff --git a/libmcclient/Makefile.am b/libmcclient/Makefile.am
new file mode 100644
index 00000000..06999748
--- /dev/null
+++ b/libmcclient/Makefile.am
@@ -0,0 +1,146 @@
+INCLUDES = \
+ $(DBUS_CFLAGS) \
+ $(TELEPATHY_CFLAGS) \
+ -I$(top_srcdir) \
+ -I$(top_builddir) \
+ -DLIBDIR="@libdir@" -DLIBVERSION="0"
+
+BUILT_SOURCES = \
+ _gen/all.xml \
+ mc-signals-marshal.c \
+ mc-signals-marshal.h \
+ $(nodist_libmcclient_la_SOURCES) \
+ $(nodist_geninclude_HEADERS)
+
+CLEANFILES = $(BUILT_SOURCES)
+
+lib_LTLIBRARIES = libmcclient.la
+
+libmcclient_la_CFLAGS = $(GLIB_CFLAGS) $(GCONF_CFLAGS)
+libmcclient_la_SOURCES = \
+ dbus-api.c \
+ mc-account.c \
+ mc-account-manager.c \
+ mc-signals-marshal.c
+
+libmcclient_includedir = $(includedir)/libmcclient
+libmcclient_include_HEADERS = \
+ dbus-api.h \
+ mc-account.h \
+ mc-account-manager.h \
+ mc-signals-marshal.h
+
+genincludedir = $(libmcclient_includedir)/_gen
+nodist_geninclude_HEADERS = \
+ _gen/cli-Account.h \
+ _gen/cli-Account_Manager.h \
+ _gen/enums.h \
+ _gen/interfaces.h \
+ _gen/gtypes.h
+
+nodist_libmcclient_la_SOURCES = \
+ _gen/cli-Account-body.h \
+ _gen/cli-Account_Manager-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
+
+libmcclient_la_LIBADD = $(GCONF_LIBS) $(GLIB_LIBS) $(DBUS_LIBS) $(TELEPATHY_LIBS)
+
+libmcclient_la_LDFLAGS = $(common_ldflags) \
+ -export-symbols-regex "^(mc_)|(mission_control_)" \
+ -version-info 5:0:0
+
+%-marshal.h: %-marshal.list Makefile.am
+ glib-genmarshal --header --prefix=$(subst -,_,$*)_marshal $< > $*-marshal.h
+
+%-marshal.c: %-marshal.list Makefile.am
+ glib-genmarshal --body --prefix=$(subst -,_,$*)_marshal $< > $*-marshal.c
+
+
+EXTRA_DIST = \
+ $(libmcclient_include_DATA) \
+ 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/libmcclient/dbus-api.c b/libmcclient/dbus-api.c
new file mode 100644
index 00000000..d9cbcda4
--- /dev/null
+++ b/libmcclient/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 "dbus-api.h"
+
+/* auto-generated stubs */
+#include "_gen/gtypes-body.h"
+#include "_gen/interfaces-body.h"
diff --git a/libmcclient/dbus-api.h b/libmcclient/dbus-api.h
new file mode 100644
index 00000000..0a0329cb
--- /dev/null
+++ b/libmcclient/dbus-api.h
@@ -0,0 +1,38 @@
+/*
+ * 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 __LIBMCCLIENT_DBUS_API_H__
+#define __LIBMCCLIENT_DBUS_API_H__
+
+#include <glib/gquark.h>
+#include <glib-object.h>
+#include <dbus/dbus-glib.h>
+#include <telepathy-glib/errors.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 <libmcclient/_gen/enums.h>
+#include <libmcclient/_gen/gtypes.h>
+#include <libmcclient/_gen/interfaces.h>
+
+#endif
diff --git a/libmcclient/mc-account-manager.c b/libmcclient/mc-account-manager.c
new file mode 100644
index 00000000..e8c56b44
--- /dev/null
+++ b/libmcclient/mc-account-manager.c
@@ -0,0 +1,110 @@
+/*
+ * mc-account-manager.c - Telepathy Account Manager 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 "mc-account-manager.h"
+#include "dbus-api.h"
+
+#include <telepathy-glib/proxy-subclass.h>
+
+#include "_gen/cli-Account_Manager-body.h"
+
+/**
+ * SECTION:mc-account-manager
+ * @title: McAccountManager
+ * @short_description: proxy object for the Telepathy AccountManager D-Bus API
+ *
+ * This module provides a client-side proxy object for the Telepathy
+ * AccountManager D-Bus API.
+ *
+ * Since: FIXME
+ */
+
+/**
+ * McAccountManagerClass:
+ *
+ * The class of a #McAccountManager.
+ *
+ * Since: FIXME
+ */
+struct _McAccountManagerClass {
+ TpProxyClass parent_class;
+ /*<private>*/
+ gpointer priv;
+};
+
+/**
+ * McAccountManager:
+ *
+ * A proxy object for the Telepathy AccountManager D-Bus API. This is a
+ * subclass of #TpProxy.
+ *
+ * Since: FIXME
+ */
+struct _McAccountManager {
+ TpProxy parent;
+ /*<private>*/
+ gpointer priv;
+};
+
+G_DEFINE_TYPE (McAccountManager, mc_account_manager, TP_TYPE_PROXY);
+
+static void
+mc_account_manager_init (McAccountManager *self)
+{
+}
+
+static void
+mc_account_manager_class_init (McAccountManagerClass *klass)
+{
+ GType type = MC_TYPE_ACCOUNT_MANAGER;
+ 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_ACCOUNT_MANAGER;
+ tp_proxy_or_subclass_hook_on_interface_add (type, mc_cli_Account_Manager_add_signals);
+
+ tp_proxy_subclass_add_error_mapping (type, TP_ERROR_PREFIX, TP_ERRORS,
+ TP_TYPE_ERROR);
+}
+
+/**
+ * mc_account_manager_new:
+ * @dbus: a D-Bus daemon; may not be %NULL
+ *
+ * <!-- -->
+ *
+ * Returns: a new NMC 4.x proxy
+ *
+ * Since: FIXME
+ */
+McAccountManager *
+mc_account_manager_new (TpDBusDaemon *dbus)
+{
+ return MC_ACCOUNT_MANAGER (g_object_new (MC_TYPE_ACCOUNT_MANAGER,
+ "dbus-daemon", dbus,
+ "bus-name", MISSION_CONTROL_SERVICE,
+ "object-path", MISSION_CONTROL_PATH,
+ NULL));
+}
+
diff --git a/libmcclient/mc-account-manager.h b/libmcclient/mc-account-manager.h
new file mode 100644
index 00000000..5798393e
--- /dev/null
+++ b/libmcclient/mc-account-manager.h
@@ -0,0 +1,59 @@
+/*
+ * mc-account-manager.h - the Telepathy Account Manager 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 __LIBMCCLIENT_ACCOUNT_MANAGER_H__
+#define __LIBMCCLIENT_ACCOUNT_MANAGER_H__
+
+#include <telepathy-glib/proxy.h>
+
+G_BEGIN_DECLS
+
+typedef struct _McAccountManager McAccountManager;
+typedef struct _McAccountManagerClass McAccountManagerClass;
+typedef struct _McAccountManagerPrivate McAccountManagerPrivate;
+
+GType mc_account_manager_get_type (void);
+
+#define MC_TYPE_ACCOUNT_MANAGER \
+ (mc_account_manager_get_type ())
+#define MC_ACCOUNT_MANAGER(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST ((obj), MC_TYPE_ACCOUNT_MANAGER, \
+ McAccountManager))
+#define MC_ACCOUNT_MANAGER_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST ((klass), MC_TYPE_ACCOUNT_MANAGER, \
+ McAccountManagerClass))
+#define MC_IS_ACCOUNT_MANAGER(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MC_TYPE_ACCOUNT_MANAGER))
+#define MC_IS_ACCOUNT_MANAGER_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_TYPE ((klass), MC_TYPE_ACCOUNT_MANAGER))
+#define MC_ACCOUNT_MANAGER_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS ((obj), MC_TYPE_ACCOUNT_MANAGER, \
+ McAccountManagerClass))
+
+McAccountManager *mc_account_manager_new (TpDBusDaemon *dbus);
+
+G_END_DECLS
+
+/* auto-generated stubs */
+#include <libmcclient/_gen/cli-Account_Manager.h>
+
+#endif
diff --git a/libmcclient/mc-account.c b/libmcclient/mc-account.c
new file mode 100644
index 00000000..d1495918
--- /dev/null
+++ b/libmcclient/mc-account.c
@@ -0,0 +1,109 @@
+/*
+ * mc-account.c - Telepathy Account 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 "mc-account.h"
+#include "dbus-api.h"
+
+#include <telepathy-glib/proxy-subclass.h>
+
+#include "_gen/cli-Account-body.h"
+
+/**
+ * SECTION:mc-account
+ * @title: McAccount
+ * @short_description: proxy object for the Telepathy Account D-Bus API
+ *
+ * This module provides a client-side proxy object for the Telepathy
+ * Account D-Bus API.
+ *
+ * Since: FIXME
+ */
+
+/**
+ * McAccountClass:
+ *
+ * The class of a #McAccount.
+ *
+ * Since: FIXME
+ */
+struct _McAccountClass {
+ TpProxyClass parent_class;
+ /*<private>*/
+ gpointer priv;
+};
+
+/**
+ * McAccount:
+ *
+ * A proxy object for the Telepathy Account D-Bus API. This is a subclass of
+ * #TpProxy.
+ *
+ * Since: FIXME
+ */
+struct _McAccount {
+ TpProxy parent;
+ /*<private>*/
+ gpointer priv;
+};
+
+G_DEFINE_TYPE (McAccount, mc_account, TP_TYPE_PROXY);
+
+static void
+mc_account_init (McAccount *self)
+{
+}
+
+static void
+mc_account_class_init (McAccountClass *klass)
+{
+ GType type = MC_TYPE_ACCOUNT;
+ 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_ACCOUNT;
+ tp_proxy_or_subclass_hook_on_interface_add (type, mc_cli_Account_add_signals);
+
+ tp_proxy_subclass_add_error_mapping (type, TP_ERROR_PREFIX, TP_ERRORS,
+ TP_TYPE_ERROR);
+}
+
+/**
+ * mc_account_new:
+ * @dbus: a D-Bus daemon; may not be %NULL
+ *
+ * <!-- -->
+ *
+ * Returns: a new NMC 4.x proxy
+ *
+ * Since: FIXME
+ */
+McAccount *
+mc_account_new (TpDBusDaemon *dbus)
+{
+ return MC_ACCOUNT (g_object_new (MC_TYPE_ACCOUNT,
+ "dbus-daemon", dbus,
+ "bus-name", MISSION_CONTROL_SERVICE,
+ "object-path", MISSION_CONTROL_PATH,
+ NULL));
+}
+
diff --git a/libmcclient/mc-account.h b/libmcclient/mc-account.h
new file mode 100644
index 00000000..ec216bf3
--- /dev/null
+++ b/libmcclient/mc-account.h
@@ -0,0 +1,58 @@
+/*
+ * mc-account.h - the Telepathy Account 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 __LIBMCCLIENT_ACCOUNT_H__
+#define __LIBMCCLIENT_ACCOUNT_H__
+
+#include <telepathy-glib/proxy.h>
+
+G_BEGIN_DECLS
+
+typedef struct _McAccount McAccount;
+typedef struct _McAccountClass McAccountClass;
+typedef struct _McAccountPrivate McAccountPrivate;
+
+GType mc_account_get_type (void);
+
+#define MC_TYPE_ACCOUNT (mc_account_get_type ())
+#define MC_ACCOUNT(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST ((obj), MC_TYPE_ACCOUNT, \
+ McAccount))
+#define MC_ACCOUNT_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST ((klass), MC_TYPE_ACCOUNT, \
+ McAccountClass))
+#define MC_IS_ACCOUNT(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MC_TYPE_ACCOUNT))
+#define MC_IS_ACCOUNT_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_TYPE ((klass), MC_TYPE_ACCOUNT))
+#define MC_ACCOUNT_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS ((obj), MC_TYPE_ACCOUNT, \
+ McAccountClass))
+
+McAccount *mc_account_new (TpDBusDaemon *dbus);
+
+G_END_DECLS
+
+/* auto-generated stubs */
+#include <libmcclient/_gen/cli-Account.h>
+
+#endif
diff --git a/libmcclient/mc-signals-marshal.list b/libmcclient/mc-signals-marshal.list
new file mode 100644
index 00000000..72f99379
--- /dev/null
+++ b/libmcclient/mc-signals-marshal.list
@@ -0,0 +1 @@
+VOID:STRING,STRING
diff --git a/libmissioncontrol/dbus-api.h b/libmissioncontrol/dbus-api.h
index 24a4812f..d7a06694 100644
--- a/libmissioncontrol/dbus-api.h
+++ b/libmissioncontrol/dbus-api.h
@@ -23,6 +23,9 @@
#define __LIBMISSIONCONTROL_DBUS_API_H__
#include <glib/gquark.h>
+#include <glib-object.h>
+#include <dbus/dbus-glib.h>
+
#define MISSION_CONTROL_SERVICE "org.freedesktop.Telepathy.MissionControl"
#define MISSION_CONTROL_IFACE "org.freedesktop.Telepathy.MissionControl"
diff --git a/src/Makefile.am b/src/Makefile.am
index f4183809..df854c8c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -5,6 +5,8 @@ INCLUDES = $(GCONF_CFLAGS) $(TELEPATHY_CFLAGS) \
mission_control_includedir = $(includedir)/mission-control
mission_control_include = \
+ mcd-account.h \
+ mcd-account-manager.h \
mcd-debug.h \
mcd-mission.h \
mcd-operation.h \
@@ -22,17 +24,39 @@ mission_control_include = \
mcd-provisioning.h \
mcd-provisioning-factory.h
+genincludedir = $(mission_control_includedir)/_gen
+nodist_geninclude_HEADERS = \
+ _gen/enums.h \
+ _gen/interfaces.h \
+ _gen/gtypes.h \
+ _gen/svc-Account.h \
+ _gen/svc-Account_Manager.h
+
+nodist_mission_control_server_la_SOURCES = \
+ _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-Account.c \
+ _gen/svc-Account_Manager.c
+
+
mission_control_include_HEADERS = \
$(mission_control_include) \
mcd-enum-types.h
BUILT_SOURCES = \
+ _gen/all.xml \
mcd-service-gen.h \
mcd-signals-marshal.h \
mcd-signals-marshal.c \
mcd-enum-types.c \
mcd-enum-types.h \
- stamp-mcd-enum-types.h
+ stamp-mcd-enum-types.h \
+ $(nodist_mission_control_server_la_SOURCES) \
+ $(nodist_geninclude_HEADERS)
CLEANFILES = $(BUILT_SOURCES)
@@ -110,3 +134,83 @@ mcd-service-gen.h: $(top_builddir)/xml/MissionControl-gen.xml
dbus-binding-tool --mode=glib-server --prefix=mcd_service $< > $@
EXTRA_DIST = mcd-signals-marshal.list stamp-mcd-enum-types.h
+
+# ---- 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/xml/Account.xml b/xml/Account.xml
new file mode 100644
index 00000000..f8800739
--- /dev/null
+++ b/xml/Account.xml
@@ -0,0 +1,423 @@
+<?xml version="1.0" ?>
+<node name="/Account"
+ xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
+ <tp:copyright>Copyright (C) 2008 Collabora Ltd.</tp:copyright>
+ <tp:copyright>Copyright (C) 2008 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
+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.</p>
+
+<p>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.</p>
+
+<p>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 Street, Fifth Floor, Boston, MA 02110-1301, USA.
+</p>
+ </tp:license>
+ <interface name="org.freedesktop.Telepathy.Account">
+ <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
+ <p>An Account object encapsulates the necessary details to make a
+ Telepathy connection.</p>
+
+ <p>Accounts are uniquely identified by object path. The object path
+ of an Account MUST take the form
+ <code>/org/freedesktop/Telepathy/Account/<em>cm</em>/<em>proto</em>/<em>acct</em></code>, where:</p>
+
+ <ul>
+ <li><em>cm</em> is the same connection manager name that appears
+ in the connection manager's well-known bus name and object path</li>
+ <li><em>proto</em> is the protocol name as seen in
+ ConnectionManager.ListProtocols, but with "-" replaced with "_"
+ (i.e. the same as in the object-path of a Connection)</li>
+ <li><em>acct</em> is an arbitrary string of ASCII letters, digits
+ and underscores, starting with a letter or underscore, which
+ uniquely identifies this account</li>
+ <li>Clients SHOULD parse the object path to discover the
+ connection manager and protocol</li>
+ <li>Clients MUST NOT attempt to parse <em>acct</em></li>
+ <li>Clients MUST NOT assume that <em>acct</em> matches
+ the connection-specific part of a Connection's object-path and
+ bus name</li>
+ <li>The account manager SHOULD choose <em>acct</em> such that if
+ an account is deleted, its object path will be re-used if and only
+ if the new account is in some sense "the same"
+ (incorporating the 'account' parameter in some way is
+ recommended)</li>
+ </ul>
+
+ <tp:rationale>
+ <p>This API avoids specifying the "profiles" used in Mission Control
+ 4.x or the "presets" that have been proposed to replace them. An
+ optional interface will be provided for AM implementations
+ that want to provide presets.</p>
+
+ <p>There is deliberately no functionality here for opening channels;
+ we intend to provide that in the channel dispatcher.</p>
+
+ <p>Other missing features which would be better in their own
+ interfaces:</p>
+
+ <ul>
+ <li>dynamic parameter-providing (aka provisioning)</li>
+ <li>saved server capabilities</li>
+ <li>account conditions</li>
+ <li>account grouping</li>
+ </ul>
+ </tp:rationale>
+
+ </tp:docstring>
+
+ <!-- Missing functionality compared with NMC 4.x account + profile,
+ apart from as listed above:
+
+ * vCard field, + default profile for each vCard field
+ (vCard field is per protocol and should be chosen by the
+ Telepathy <-> address-book bridge?; default profile is now
+ meaningless)
+
+ * "normalized name" (normalized handle?)
+
+ * branding icon (what's this and how does it differ from the icon?)
+
+ * configuration UI (not our problem - perhaps the UI could special-case
+ by cm,protocol,preset tuples?)
+
+ * default account domain (somewhat meaningless in general; specialized
+ account config UI can hard-code this)
+
+ * SPLIT_ACCOUNT (pseudo-capability - this is a property of the protocol,
+ not the profile, and in any case only the account config UI cares)
+
+ Missing functionality compared with Decibel accounts:
+
+ * we don't really know, they take arbitrary key/value pairs...
+ but display name, protocol, presence/message, current, autoreconnect
+ are the ones given special status by the source, and we have all of them
+ -->
+
+ <property name="Interfaces" type="as" access="read">
+ <tp:docstring>
+ A list of the extra interfaces provided by this account.
+ </tp:docstring>
+ </property>
+
+ <method name="Remove">
+ <tp:docstring>Delete the account.</tp:docstring>
+ <tp:possible-errors>
+ <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
+ </tp:possible-errors>
+ </method>
+
+ <signal name="Removed">
+ <tp:docstring>
+ This account has been removed.
+
+ <tp:rationale>
+ This is redundant with AccountRemoved, but it's still worth having,
+ to avoid having to bind to AccountManager.AccountRemoved to tell
+ you whether your Account is valid - ideally, an account-editing UI
+ should only care about a single Account.
+ </tp:rationale>
+ </tp:docstring>
+ </signal>
+
+ <signal name="AccountPropertyChanged">
+ <tp:docstring>
+ The values of one or more properties on this interface (that do not
+ specify that this signal does not apply to them) may have changed.
+ This does not cover properties of other interfaces, which must
+ provide their own change notification if appropriate.
+ </tp:docstring>
+
+ <arg name="Properties" type="a{sv}">
+ <tp:docstring>
+ A map from property names in this namespace (e.g. Nickname) to
+ values. Properties whose values have not changed SHOULD be
+ omitted, but this need not be done.
+ </tp:docstring>
+ </arg>
+ </signal>
+
+ <property name="DisplayName" type="s" access="readwrite">
+ <tp:docstring>
+ The user-visible name of this account. This SHOULD be chosen by the
+ user at account creation time. The account creation user interface
+ is responsible for setting a reasonable default value in the user's
+ locale; something like "Jabber (bob@example.com)" would be sensible.
+
+ <tp:rationale>
+ This approximately corresponds to "display name" in NMC 4.x and
+ Decibel.
+ </tp:rationale>
+ </tp:docstring>
+ </property>
+
+ <property name="Icon" type="s" access="readwrite">
+ <tp:docstring>
+ The name of an icon in the system's icon theme, such as "im-msn",
+ or the empty string to not specify an icon. If the icon is set to
+ an empty string, the account manager or any client MAY derive a
+ default icon, for instance from the protocol.
+
+ <tp:rationale>
+ This approximately corresponds to mc_profile_get_icon_name
+ (or possibly mc_profile_get_branding_icon_name) in NMC 4.x.
+ It's accessed via the account rather than the profile because
+ we no longer have profiles as a core concept.
+ </tp:rationale>
+ </tp:docstring>
+ </property>
+
+ <property name="Valid" type="b" access="read">
+ <tp:docstring>
+ If true, this account is considered by the account manager to be
+ complete and usable. If false, user action is required to make it
+ usable, and it will never attempt to connect (for instance, this
+ might be caused by the absence of a required parameter).
+
+ <tp:rationale>
+ For connection managers with a plugin architecture, like
+ telepathy-haze, we have little or no control over the parameters
+ offered; for platforms with package management, we have little or
+ no control over the CMs offered. NMC 4.x would just pretend the
+ account didn't exist in these circumstances, but silent data loss
+ is bad, and UIs with CM-specific knowledge (or a user filling in
+ newly-required parameters) might be able to rescue a broken account.
+ </tp:rationale>
+ </tp:docstring>
+ </property>
+
+ <property name="Nickname" type="as" access="readwrite">
+ <tp:docstring>
+ The nickname to set on this account for display to other contacts,
+ as set by the user. When the account becomes connected, the
+ account manager SHOULD set this as the user's alias using SetAliases
+ if appropriate.
+
+ <tp:rationale>
+ In a later specification revision, we plan to separate the concepts
+ of a contact's nickname as set by themselves, and the local
+ name for them in our contact list (a "handle" or "pet name" as
+ described in XEP-0165 and its references). The terminology change
+ from alias to nickname here is a step in that direction.
+ This corresponds to NMC 4.x mc_account_get_alias.
+ </tp:rationale>
+ </tp:docstring>
+ </property>
+
+ <property name="Avatar" type="(ays)" access="readwrite">
+ <tp:docstring>
+ The avatar to set on this account for display to other contacts,
+ represented as a structure containing the bytes of the avatar,
+ and the MIME type as a string; may be set to an empty byte-array and
+ an empty string to indicate no avatar. When the account becomes
+ connected, the account manager SHOULD set this avatar using SetAvatar
+ if appropriate.
+
+ <tp:rationale>
+ This corresponds to NMC 4.x mc_account_get_avatar.
+ </tp:rationale>
+ </tp:docstring>
+ </property>
+
+ <property name="Parameters" type="a{sv}" access="read">
+ <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
+ <p>A map from connection manager parameter names (as in the
+ ConnectionManager interface) to their values. This property includes
+ only those parameters that are stored for this account, and SHOULD
+ only include those parameters that the user has explicitly set.
+ </p>
+ <p>This property cannot be altered using Set() - use
+ UpdateParameters instead.</p>
+
+ <tp:rationale>
+ This avoids NMC being tied to gconf as a matter of API.
+ </tp:rationale>
+ </tp:docstring>
+ </property>
+
+ <method name="UpdateParameters">
+ <tp:docstring>
+ Change the value of the Parameters property. Any changes will not
+ take effect until the next time the account is disconnected and
+ reconnected.
+
+ <tp:rationale>
+ Migration tools that twiddle the settings of all accounts shouldn't
+ cause an automatic disconnect and reconnect, probably. I could be
+ persuaded otherwise, though. Or we could add a Reconnect() method.
+ </tp:rationale>
+ </tp:docstring>
+
+ <arg name="Set" type="a{sv}" direction="in">
+ <tp:docstring>
+ A mapping from parameter names to their values. These parameters
+ should be stored for future use.
+ </tp:docstring>
+ </arg>
+ <arg name="Unset" type="as" direction="in">
+ <tp:docstring>
+ A list of the names of parameters to be removed from the set of
+ stored values, allowing the default values to be used.
+ If the given parameters were not, in fact, stored, or even if they
+ do not exist at all, the account manager MUST accept this without
+ error.
+ </tp:docstring>
+ </arg>
+
+ <tp:possible-errors>
+ <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
+ <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument"/>
+ </tp:possible-errors>
+ </method>
+
+ <tp:struct name="Account_Presence">
+ <tp:docstring>
+ A simplified form of the presence statuses seen in the Presence
+ interface.
+ </tp:docstring>
+
+ <tp:member name="Type" type="u" tp:type="Connection_Presence_Type">
+ <tp:docstring>
+ The presence type, e.g. Connection_Presence_Type_Away.
+ </tp:docstring>
+ </tp:member>
+
+ <tp:member name="Status" type="s">
+ <tp:docstring>
+ The connection-manager-specific string identifier of the presence
+ status, e.g. "brb".
+ </tp:docstring>
+ </tp:member>
+
+ <tp:member name="Message" type="s">
+ <tp:docstring>
+ The user-defined status message, e.g. "Back soon!". This will be
+ used as the value for the 'message' keyword in the Presence
+ interface's dictionary, if possible.
+ </tp:docstring>
+ </tp:member>
+ </tp:struct>
+
+ <property name="AutomaticPresence" type="(uss)" access="readwrite"
+ tp:type="Account_Presence">
+ <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
+ <p>The presence status that this account should have if it is brought
+ online.</p>
+
+ <p>Setting this property MUST NOT actually change the account's
+ status until the next time it is (re)connected for some reason.</p>
+
+ <p>The Connection_Presence_Type in the structure SHOULD NOT
+ be Offline or Unset.</p>
+
+ <tp:rationale>
+ In ITOS2007 and ITOS2008 this is a global preference, not visible
+ on D-Bus (the "default presence"). "Automatic presence" better
+ describes when it is used.
+ </tp:rationale>
+ </tp:docstring>
+ </property>
+
+ <property name="ConnectAutomatically" type="b" access="readwrite">
+ <tp:docstring>
+ If true, the account manager SHOULD attempt to put this account
+ online with the AutomaticPresence whenever possible (in the base
+ Account interface this is deliberately left vague). If false,
+ it MUST NOT put the account online automatically in response to,
+ for instance, connectivity changes, but SHOULD still put the account
+ online with the AutomaticPresence if requested by the user (for
+ instance, if the user tries to start a conversation using this
+ account).
+
+ <tp:rationale>
+ This approximately corresponds to NMC 4.x "enabled" and Decibel
+ "autoreconnect".
+ </tp:rationale>
+ </tp:docstring>
+ </property>
+
+ <property name="Connection" type="s" access="read">
+ <tp:docstring>
+ Either the well-known bus name of the connection to this account,
+ or the empty string if there is no connection.
+ </tp:docstring>
+ </property>
+
+ <property name="ConnectionStatus" type="u" access="read">
+ <tp:docstring>
+ If the Connection property is non-empty, the status of that connection.
+ If the Connection property is the empty string, this property may
+ either be Disconnected (indicating that the account manager is not
+ attempting to bring it online), or Connecting (indicating that the
+ account manager is attempting to connect).
+ The account manager is expected to set this by observing signals
+ from the Connection.
+
+ <tp:rationale>
+ If the AM is doing some sort of backoff/delay on reconnection
+ attempts, the account's status is conceptually "Connecting" even
+ though there is no Connection. This vaguely corresponds to
+ GetCurrentStatus in NMC 4.x.
+ </tp:rationale>
+ </tp:docstring>
+ </property>
+
+ <property name="ConnectionStatusReason" type="u" access="read">
+ <tp:docstring>
+ The reason for the last change to Connection_Status.
+ The account manager is expected to set this by observing signals
+ from the Connection.
+
+ <tp:rationale>
+ If you weren't watching the Connection at the time it failed,
+ you can't tell why - unless the AM can tell you. This is part
+ of GetCurrentStatus in NMC 4.x.
+ </tp:rationale>
+ </tp:docstring>
+ </property>
+
+ <property name="CurrentPresence" type="(uss)" access="read"
+ tp:type="Account_Presence">
+ <tp:docstring>
+ The actual presence. If the connection is not online, this should be
+ (Connection_Presence_Type_Offline, "", "").
+ If the connection is online but does not support the Presence
+ interface, this should be (Connection_Presence_Type_Unset, "", "").
+ The account manager is expected to set this by observing signals
+ from the Connection.
+
+ <tp:rationale>
+ This corresponds to GetPresenceActual in NMC 4.x.
+ </tp:rationale>
+ </tp:docstring>
+ </property>
+
+ <property name="RequestedPresence" type="(uss)" access="readwrite"
+ tp:type="Account_Presence">
+ <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
+ <p>The requested presence for this account. When this is changed, the
+ account manager should attempt to manipulate the connection manager
+ to make CurrentPresence match RequestedPresence as closely as
+ possible. It should not be saved to any sort of persistent
+ storage.</p>
+
+ <p>When the account manager automatically connects an account,
+ it must signal this by setting the RequestedPresence to the same
+ thing as the AutomaticPresence.</p>
+
+ <tp:rationale>
+ This corresponds to e.g. GetPresence and GetPresenceMessage
+ in NMC 4.x.
+ </tp:rationale>
+ </tp:docstring>
+ </property>
+
+ </interface>
+</node>
+<!-- vim:set sw=2 sts=2 et ft=xml: -->
diff --git a/xml/Account_Manager.xml b/xml/Account_Manager.xml
new file mode 100644
index 00000000..646affca
--- /dev/null
+++ b/xml/Account_Manager.xml
@@ -0,0 +1,165 @@
+<?xml version="1.0" ?>
+<node name="/Account_Manager"
+ xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
+ <tp:copyright>Copyright (C) 2008 Collabora Ltd.</tp:copyright>
+ <tp:copyright>Copyright (C) 2008 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
+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.</p>
+
+<p>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.</p>
+
+<p>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 Street, Fifth Floor, Boston, MA 02110-1301, USA.
+</p>
+ </tp:license>
+ <interface name="org.freedesktop.Telepathy.AccountManager">
+ <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
+ <p>The account manager is a central service used to store account
+ details.</p>
+
+ <p>The current account manager is defined to be the process that owns
+ the well-known bus name org.freedesktop.Telepathy.AccountManager on
+ the session bus. This process must export an
+ /org/freedesktop/Telepathy/AccountManager object with the
+ AccountManager interface.</p>
+ </tp:docstring>
+
+ <!-- Missing functionality compared with NMC 4.x:
+ * look up accounts by conditions (can be done client-side, less
+ efficiently, so not a blocker)
+ * global presence/... changes (can be done client-side, less efficiently -
+ we should add this)
+ * count used channels (what's this for?)
+ * get "average" status (not well-defined, UIs can do this)
+ * request channels (out of scope: Channel Dispatcher will do this)
+ * register filters (completely out of scope: Channel Dispatcher again)
+ -->
+
+ <property name="Interfaces" type="as" access="read">
+ <tp:docstring>
+ A list of the interfaces provided by the account manager object.
+ </tp:docstring>
+ </property>
+
+ <property name="ValidAccounts" type="ao" access="read">
+ <tp:docstring>
+ A list of the valid (complete, usable) accounts. Change notification
+ is via AccountValidityChanged.
+
+ <tp:rationale>
+ This split between valid and invalid accounts makes it easy to
+ ignore the invalid ones. The only things that should be manipulating
+ invalid accounts are account-editing UIs, which might be able to
+ rescue them.
+ </tp:rationale>
+ </tp:docstring>
+ </property>
+
+ <property name="InvalidAccounts" type="ao" access="read">
+ <tp:docstring>
+ A list of incomplete or otherwise unusable accounts. Change
+ notification is via AccountValidityChanged.
+ </tp:docstring>
+ </property>
+
+ <signal name="AccountRemoved">
+ <tp:docstring>
+ The given account has been removed.
+
+ <tp:rationale>
+ This is effectively change notification for the valid and invalid
+ accounts lists.
+ </tp:rationale>
+ </tp:docstring>
+
+ <arg name="Account" type="o">
+ <tp:docstring>
+ An Account, which must not be used any more.
+ </tp:docstring>
+ </arg>
+ </signal>
+
+ <signal name="AccountValidityChanged">
+ <tp:docstring>
+ The validity of the given account has changed. New accounts are
+ also indicated by this signal, as an account validity change
+ (usually to True) on an account that did not previously exist.
+
+ <tp:rationale>
+ This is effectively change notification for the valid and invalid
+ accounts lists.
+ </tp:rationale>
+ </tp:docstring>
+
+ <arg name="Account" type="o">
+ <tp:docstring>
+ An Account.
+ </tp:docstring>
+ </arg>
+
+ <arg name="Valid" type="b">
+ <tp:docstring>
+ True if the account is now valid.
+ </tp:docstring>
+ </arg>
+ </signal>
+
+ <method name="CreateAccount">
+ <tp:docstring>
+ Request the creation of a new account. The account manager SHOULD NOT
+ allow invalid accounts to be created. Accounts created through this
+ API SHOULD have an empty PresetParameters property.
+ </tp:docstring>
+
+ <arg name="Connection_Manager" direction="in" type="s"
+ tp:type="Connection_Manager_Name">
+ <tp:docstring>
+ The name of the connection manager, e.g. "salut".
+ </tp:docstring>
+ </arg>
+
+ <arg name="Protocol" direction="in" type="s"
+ tp:type="Protocol">
+ <tp:docstring>The protocol, e.g. "local-xmpp".</tp:docstring>
+ </arg>
+
+ <arg name="Display_Name" direction="in" type="s">
+ <tp:docstring>The initial value of the new account's DisplayName
+ property. The account manager MAY modify this to make it unique,
+ for instance by appending a number or the 'account'
+ parameter.</tp:docstring>
+ </arg>
+
+ <arg name="Parameters" direction="in" type="a{sv}">
+ <tp:docstring>Initial parameter values, as would be passed to
+ RequestConnection.</tp:docstring>
+ </arg>
+
+ <arg name="Account" direction="out" type="o">
+ <tp:docstring>The new account.</tp:docstring>
+ </arg>
+
+ <tp:possible-errors>
+ <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
+ <tp:docstring>The connection manager is not installed or does not
+ implement that protocol.</tp:docstring>
+ </tp:error>
+ <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
+ <tp:docstring>The parameters provided omit a required argument
+ or provide unsupported arguments.
+ </tp:docstring>
+ </tp:error>
+ </tp:possible-errors>
+ </method>
+
+ </interface>
+</node>
+<!-- vim:set sw=2 sts=2 et ft=xml: -->
+
diff --git a/xml/Makefile.am b/xml/Makefile.am
index e3056898..a53f7c14 100644
--- a/xml/Makefile.am
+++ b/xml/Makefile.am
@@ -3,7 +3,9 @@ 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 = MissionControl.xml \
+ Account_Manager.xml \
+ Account.xml
SPECS_GEN = ${SPECS:.xml=-gen.xml}
diff --git a/xml/all.xml b/xml/all.xml
index 3bcdc851..6ecdf36f 100644
--- a/xml/all.xml
+++ b/xml/all.xml
@@ -2,8 +2,19 @@
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>
+<tp:copyright>Copyright (C) 2008 Nokia Corporation</tp:copyright>
<xi:include href="nmc4.xml"/>
+<xi:include href="Account.xml"/>
+<xi:include href="Account_Manager.xml"/>
+
+<tp:generic-types>
+ <tp:external-type name="Connection_Presence_Type" type="u"
+ from="Telepathy specification (Connection)"/>
+ <tp:external-type name="Connection_Manager_Name" type="s"
+ from="Telepathy specification (ConnectionManager)"/>
+ <tp:external-type name="Protocol" type="s"
+ from="Telepathy specification (ConnectionManager)"/>
+</tp:generic-types>
</tp:spec>