[Telepathy-commits] [telepathy-mission-control/master] Define the Stats interface for accounts

Alberto Mardegan alberto.mardegan at nokia.com
Mon Jan 5 01:40:43 PST 2009


---
 xml/Account_Interface_Stats.xml |   46 +++++++++++++++++++++++++++++++++++++++
 xml/Makefile.am                 |    1 +
 xml/generic-types.xml           |    6 +++++
 xml/nmc5.xml                    |    1 +
 4 files changed, 54 insertions(+), 0 deletions(-)
 create mode 100644 xml/Account_Interface_Stats.xml

diff --git a/xml/Account_Interface_Stats.xml b/xml/Account_Interface_Stats.xml
new file mode 100644
index 0000000..8348168
--- /dev/null
+++ b/xml/Account_Interface_Stats.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" ?>
+<node name="/Account_Interface_Stats"
+  xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
+  <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="com.nokia.Account.Interface.Stats">
+
+    <property name="ChannelCount" tp:name-for-bindings="Channel_Count"
+      type="a{su}" tp:type="Channel_Count_Map" access="read">
+      <tp:docstring>
+        A dictionary of channel types and their count.
+      </tp:docstring>
+    </property>
+
+    <signal name="StatsChanged" tp:name-for-bindings="Stats_Changed">
+      <tp:docstring>
+        Emitted when a property in this interface changes.
+      </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>
+
+  </interface>
+</node>
+<!-- vim:set sw=2 sts=2 et ft=xml: -->
diff --git a/xml/Makefile.am b/xml/Makefile.am
index b3d7765..7a1b799 100644
--- a/xml/Makefile.am
+++ b/xml/Makefile.am
@@ -13,6 +13,7 @@ SPECS = MissionControl.xml \
 	Account_Interface_ChannelRequests.xml \
 	Account_Interface_Compat.xml \
 	Account_Interface_Conditions.xml \
+	Account_Interface_Stats.xml \
 	Client.xml \
 	Client_Approver.xml \
 	Client_Handler.xml \
diff --git a/xml/generic-types.xml b/xml/generic-types.xml
index 9d8501d..0283962 100644
--- a/xml/generic-types.xml
+++ b/xml/generic-types.xml
@@ -97,4 +97,10 @@
     <tp:member type="s" name="Value"/>
   </tp:mapping>
 
+  <tp:mapping name="Channel_Count_Map">
+    <tp:docstring>A mapping from strings representing channel types to their usage count</tp:docstring>
+    <tp:member type="s" name="Key"/>
+    <tp:member type="u" name="Value"/>
+  </tp:mapping>
+
 </tp:generic-types>
diff --git a/xml/nmc5.xml b/xml/nmc5.xml
index 1418c29..5a71b35 100644
--- a/xml/nmc5.xml
+++ b/xml/nmc5.xml
@@ -9,6 +9,7 @@
 <xi:include href="Account_Interface_ChannelRequests.xml"/>
 <xi:include href="Account_Interface_Compat.xml"/>
 <xi:include href="Account_Interface_Conditions.xml"/>
+<xi:include href="Account_Interface_Stats.xml"/>
 <xi:include href="Account_Manager.xml"/>
 <xi:include href="Account_Manager_Interface_Query.xml"/>
 <xi:include href="Account_Manager_Interface_Creation.xml"/>
-- 
1.5.6.5




More information about the Telepathy-commits mailing list