diff options
author | Cosimo Alfarano <cosimo.alfarano@collabora.co.uk> | 2010-01-29 19:02:04 +0000 |
---|---|---|
committer | Cosimo Alfarano <cosimo.alfarano@collabora.co.uk> | 2010-01-29 19:02:04 +0000 |
commit | 2e520db643e63c674ad955212f143ce1997189f2 (patch) | |
tree | 5f6aad7531b1f38b176d69393a02b7d1642b3c5b /extensions | |
parent | deb5b0460352f8ae9031621360c64f33b5c1c70b (diff) | |
download | telepathy-logger-2e520db643e63c674ad955212f143ce1997189f2.tar.gz |
Added file for TP DBus extension support
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/Makefile.am | 86 | ||||
-rw-r--r-- | extensions/Telepathy_Logger.xml | 73 | ||||
-rw-r--r-- | extensions/all.xml | 157 |
3 files changed, 316 insertions, 0 deletions
diff --git a/extensions/Makefile.am b/extensions/Makefile.am new file mode 100644 index 0000000..61ba12d --- /dev/null +++ b/extensions/Makefile.am @@ -0,0 +1,86 @@ +tools_dir = $(top_srcdir)/tools + +EXTRA_DIST = \ + all.xml \ + Telepathy_Logger.xml + +noinst_LTLIBRARIES = libtelepathy-logger-extensions.la + +libtelepathy_logger_extensions_la_SOURCES = \ + extensions.c \ + extensions.h + +nodist_libtelepathy_logger_extensions_la_SOURCES = \ + _gen/signals-marshal.c \ + _gen/signals-marshal.h \ + _gen/signals-marshal.list \ + _gen/enums.h \ + _gen/gtypes.h \ + _gen/gtypes-body.h \ + _gen/interfaces.h \ + _gen/interfaces-body.h \ + _gen/svc.h \ + _gen/svc.c + +BUILT_SOURCES = \ + _gen/all.xml \ + $(nodist_libtelepathy_logger_extensions_la_SOURCES) \ + extensions.html + +CLEANFILES = $(BUILT_SOURCES) + +AM_CFLAGS = $(ERROR_CFLAGS) @DBUS_CFLAGS@ @GLIB_CFLAGS@ @TP_GLIB_CFLAGS@ @HANDLE_LEAK_DEBUG_CFLAGS@ +AM_LDFLAGS = @DBUS_LIBS@ @GLIB_LIBS@ @TP_GLIB_LIBS@ + +# Generated stuff + +DROP_NAMESPACE = sed -e 's@xmlns:tp="http://telepathy\.freedesktop\.org/wiki/DbusSpec.extensions-v0"@@g' +XSLTPROCFLAGS = --nonet --novalid + +_gen/all.xml: all.xml $(wildcard *.xml) Makefile.am + @$(mkdir_p) _gen + $(AM_V_GEN)$(PYTHON) $(tools_dir)/xincludator.py \ + $< > $@.tmp && mv $@.tmp $@ + +extensions.html: _gen/all.xml $(tools_dir)/doc-generator.xsl Makefile.am + $(AM_V_GEN)$(XSLTPROC) $(XSLTPROCFLAGS) \ + --param "allow-undefined-interfaces" "true()" \ + $(tools_dir)/doc-generator.xsl \ + $< > $@ + +_gen/svc.c _gen/svc.h: _gen/all.xml $(tools_dir)/glib-ginterface-gen.py \ + Makefile.am + $(AM_V_GEN)$(PYTHON) $(tools_dir)/glib-ginterface-gen.py \ + --filename=_gen/svc --signal-marshal-prefix=_gabble_ext \ + --include='<telepathy-glib/dbus.h>' \ + --include='"_gen/signals-marshal.h"' \ + --allow-unstable \ + --not-implemented-func='tp_dbus_g_method_return_not_implemented' \ + $< Gabble_Svc_ + +_gen/signals-marshal.list: _gen/all.xml \ + $(tools_dir)/glib-signals-marshal-gen.py \ + Makefile.am + $(AM_V_GEN)$(PYTHON) $(tools_dir)/glib-signals-marshal-gen.py $< > $@ + +_gen/signals-marshal.h: _gen/signals-marshal.list Makefile.am + $(AM_V_GEN)$(GLIB_GENMARSHAL) --header --prefix=_gabble_ext_marshal $< > $@ + +_gen/signals-marshal.c: _gen/signals-marshal.list Makefile.am + $(AM_V_GEN){ echo '#include "_gen/signals-marshal.h"' && \ + $(GLIB_GENMARSHAL) --body --prefix=_gabble_ext_marshal $< ; } > $@ + +_gen/enums.h: _gen/all.xml $(tools_dir)/c-constants-gen.py \ + Makefile.am + $(AM_V_GEN)$(PYTHON) $(tools_dir)/c-constants-gen.py Gabble $< > $@ + +_gen/interfaces.h _gen/interfaces-body.h: _gen/all.xml \ + $(tools_dir)/glib-interfaces-gen.py \ + Makefile.am + $(AM_V_GEN)$(PYTHON) $(tools_dir)/glib-interfaces-gen.py \ + Gabble _gen/interfaces-body.h _gen/interfaces.h $< + +_gen/gtypes.h _gen/gtypes-body.h: _gen/all.xml \ + $(tools_dir)/glib-gtypes-generator.py Makefile.am + $(AM_V_GEN)$(PYTHON) $(tools_dir)/glib-gtypes-generator.py \ + $< _gen/gtypes Gabble diff --git a/extensions/Telepathy_Logger.xml b/extensions/Telepathy_Logger.xml new file mode 100644 index 0000000..648f698 --- /dev/null +++ b/extensions/Telepathy_Logger.xml @@ -0,0 +1,73 @@ +<?xml version="1.0" ?> +<node name="/Telepathy_Logger" + xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0"> + <tp:copyright>Copyright © 2009 Collabora Ltd.</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.TelepathyLoggerService.DRAFT" + tp:causes-havoc="experimental"> + <tp:added version="0.1">(as a draft)</tp:added> + + <tp:struct name="Chat_Message_Field" array-name="Chat_Message_Field_List"> + <tp:member type="s" name="Sender"> + <tp:docstring> + The identifier of the contact who originated this message. + </tp:docstring> + </tp:member> + <tp:member type="s" name="Message"> + <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> + The body of the message sent to a 1-1 Chat or a Chat Room. + </tp:docstring> + </tp:member> + <tp:member type="u" name="Timestamp"> + <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> + Unix timestamp for the log entry + </tp:docstring> + </tp:member> + <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> + <p>It represents a single message, received or sent.</p> + <p>The receiver is implicit in the request: if the sender is the user, + the receiver is the identifier in chat_id paramenter, if the sender is + not the user, the user is consequently the receiver of the message<p> + </tp:docstring> + </tp:struct> + + <method name="LastChats" + tp:name-for-bindings="LastChats"> + <arg direction="in" name="Account" type="o" tp:type="Contact_Handle[]"> + <tp:docstring> + An array of handles representing contacts. + </tp:docstring> + </arg> + <arg direction="in" name="Identifier" type="s" + tp:type="Contact_Info_Map"> + <tp:docstring> + A dictionary mapping contact handles to information, whose keys are + the subset of the requested list of handles for which information was + cached. + </tp:docstring> + </arg> + <tp:docstring> + Request the last Lines entries of logs for the specified couple Account+Identifier. + </tp:docstring> + </method> + + <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> + An interface for requesting informatiosn about the Telepathy Logger entries. + </tp:docstring> + </interface> +</node> +<!-- vim:set sw=2 sts=2 et ft=xml: --> diff --git a/extensions/all.xml b/extensions/all.xml new file mode 100644 index 0000000..a750472 --- /dev/null +++ b/extensions/all.xml @@ -0,0 +1,157 @@ +<tp:spec + xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0" + xmlns:xi="http://www.w3.org/2001/XInclude"> + +<tp:title>TelepathyLogger-specific extensions to the Telepathy interfaces</tp:title> + +<tp:copyright>Copyright (C) 2009-2010 Collabora Limited</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 St, Fifth Floor, Boston, MA 02110-1301 USA</p> +</tp:license> + +<tp:generic-types> + <tp:external-type name="Room_Handle" type="u" + from="Telepathy specification"/> + <tp:external-type name="Handle_Type" type="u" + from="Telepathy specification"/> + <tp:external-type name="Contact_Handle" type="u" + from="Telepathy specification"/> + <tp:external-type name="DBus_Unique_Name" type="s" + from="Telepathy specification"/> +</tp:generic-types> + +<xi:include href="Telepathy_Logger.xml"/> + +<tp:generic-types> + <tp:external-type name="Contact_Handle" type="u" + from="Telepathy specification"/> + <tp:external-type name="DBus_Interface" type="s" + from="Telepathy specification"/> + <tp:external-type name="DBus_Qualified_Member" type="s" + from="Telepathy specification"/> + <tp:external-type name="Qualified_Property_Value_Map" type="a{sv}" + from="Telepathy specification"/> + <tp:external-type name="DBus_Error_Name" type="s" + from="Telepathy specification"/> + <tp:external-type name="DBus_Well_Known_Name" type="s" + from="Telepathy specification"/> + <tp:external-type name="Handler_Capability_Token" type="s" + from="Telepathy specification"/> + + <!-- for localisation --> + <tp:external-type name="Rich_Presence_Access_Control_Type" type="u" + from="Telepathy specification"/> + <tp:external-type name="Rich_Presence_Access_Control" type="(uv)" + from="Telepathy specification"/> + <tp:external-type name="Unix_Timestamp64" type="t" + from="Telepathy specification"/> + <tp:external-type name="Unix_Timestamp" type="u" + from="Telepathy specification"/> + <tp:external-type name="String_String_Map" type="a{ss}" + from="Telepathy specification"/> + + <tp:external-type name="String_Variant_Map" type="a{sv}" + from="Telepathy specification"/> + + <!-- use types from Connection_Interface_Requests --> + <tp:external-type name="Channel_Class" type="a{sv}" + from="Telepathy specification"/> + + <!-- use types from Channel_Type_Tubes --> + <tp:external-type name="Socket_Address_Type" type="u" + from="Telepathy specification"/> + <tp:external-type name="Socket_Access_Control" type="u" + from="Telepathy specification"/> + <tp:external-type name="Supported_Socket_Map" type="a{uau}" + from="Telepathy specification"/> + <tp:external-type name="DBus_Tube_Member" type="(us)" + from="Telepathy specification"/> + + <!-- use types from Connection_Interface_Contact_Capabilities --> + <tp:external-type name="Requestable_Channel_Class" type="(a{sv}as)" + from="Telepathy specification"/> + + <tp:external-type name="Connection_Status" type="u" + from="Telepathy specification"/> + + <!-- use types from Channel_Type_Streamed_Media.xml --> + <tp:enum name="Media_Stream_Type" type="u" + array-name="Media_Stream_Type_List"> + <tp:enumvalue suffix="Audio" value="0"> + <tp:docstring>An audio stream</tp:docstring> + </tp:enumvalue> + <tp:enumvalue suffix="Video" value="1"> + <tp:docstring>A video stream</tp:docstring> + </tp:enumvalue> + </tp:enum> + + <!-- use types from generic-types.xml --> + <tp:struct name="Socket_Address_IP" array-name="Socket_Address_IP_List"> + <tp:docstring>An IP address and port.</tp:docstring> + <tp:member type="s" name="Address"> + <tp:docstring>Either a dotted-quad IPv4 address literal as for + <tp:type>Socket_Address_IPv4</tp:type>, or an RFC2373 IPv6 address + as for <tp:type>Socket_Address_IPv6</tp:type>. + </tp:docstring> + </tp:member> + <tp:member type="q" name="Port"> + <tp:docstring>The TCP or UDP port number.</tp:docstring> + </tp:member> + </tp:struct> + + <tp:struct name="Socket_Address_IPv4"> + <tp:docstring>An IPv4 address and port.</tp:docstring> + <tp:member type="s" name="Address"> + <tp:docstring>A dotted-quad IPv4 address literal: four ASCII decimal + numbers, each between 0 and 255 inclusive, e.g. + "192.168.0.1".</tp:docstring> + </tp:member> + <tp:member type="q" name="Port"> + <tp:docstring>The TCP or UDP port number.</tp:docstring> + </tp:member> + </tp:struct> + + <tp:struct name="Socket_Address_IPv6"> + <tp:docstring>An IPv6 address and port.</tp:docstring> + <tp:member type="s" name="Address"> + <tp:docstring>An IPv6 address literal as specified by RFC2373 + section 2.2, e.g. "2001:DB8::8:800:200C:4171".</tp:docstring> + </tp:member> + <tp:member type="q" name="Port"> + <tp:docstring>The TCP or UDP port number.</tp:docstring> + </tp:member> + </tp:struct> + + <tp:enum name="Media_Stream_State" type="u"> + <tp:enumvalue suffix="Disconnected" value="0"> + <tp:docstring>The stream is disconnected.</tp:docstring> + </tp:enumvalue> + <tp:enumvalue suffix="Connecting" value="1"> + <tp:docstring>The stream is trying to connect.</tp:docstring> + </tp:enumvalue> + <tp:enumvalue suffix="Connected" value="2"> + <tp:docstring>The stream is connected.</tp:docstring> + </tp:enumvalue> + </tp:enum> + + <tp:simple-type name="Handle" type="u" array-name="Handle_List"> + <tp:docstring>An unsigned 32-bit integer representing a + handle</tp:docstring> + </tp:simple-type> +</tp:generic-types> + + +</tp:spec> |