diff options
author | Will Thompson <will.thompson@collabora.co.uk> | 2011-08-31 14:45:51 +0100 |
---|---|---|
committer | Will Thompson <will.thompson@collabora.co.uk> | 2011-08-31 15:37:17 +0100 |
commit | 7e0173a046b381856992faef292ade59cef31cad (patch) | |
tree | 88a8b2eb21b075eae0a9ee37edbc297982b2022a | |
parent | 576fdc7e1657e42f4411123124d7b8dd651e883d (diff) |
Remove local copies of ContactCaps and PowerSaving
These have been in tp-glib for ages.
-rw-r--r-- | src/Makefile.am | 4 | ||||
-rw-r--r-- | src/mcd-connection.c | 24 | ||||
-rw-r--r-- | xml/Connection_Interface_Contact_Capabilities.xml | 245 | ||||
-rw-r--r-- | xml/Connection_Interface_Power_Saving.xml | 109 | ||||
-rw-r--r-- | xml/Makefile.am | 4 | ||||
-rw-r--r-- | xml/nmc5.xml | 3 |
6 files changed, 4 insertions, 385 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 094b7f51..fe840836 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -52,8 +52,6 @@ endif mc_gen_headers = \ _gen/cli-Connection_Manager_Interface_Account_Storage.h \ - _gen/cli-Connection_Interface_Contact_Capabilities.h \ - _gen/cli-Connection_Interface_Power_Saving.h \ _gen/enums.h \ _gen/interfaces.h \ _gen/svc-Account_Interface_Addressing.h \ @@ -69,8 +67,6 @@ mc_gen_headers = \ nodist_libmcd_convenience_la_SOURCES = \ _gen/cli-Connection_Manager_Interface_Account_Storage-body.h \ - _gen/cli-Connection_Interface_Contact_Capabilities-body.h \ - _gen/cli-Connection_Interface_Power_Saving-body.h \ _gen/register-dbus-glib-marshallers-body.h \ _gen/signals-marshal.c \ _gen/signals-marshal.h \ diff --git a/src/mcd-connection.c b/src/mcd-connection.c index 80d362d4..15a2652b 100644 --- a/src/mcd-connection.c +++ b/src/mcd-connection.c @@ -70,10 +70,6 @@ #include "sp_timestamp.h" #include "mcd-signals-marshal.h" -#include "_gen/cli-Connection_Interface_Contact_Capabilities.h" -#include "_gen/cli-Connection_Interface_Contact_Capabilities-body.h" -#include "_gen/cli-Connection_Interface_Power_Saving.h" -#include "_gen/cli-Connection_Interface_Power_Saving-body.h" #define INITIAL_RECONNECTION_TIME 3 /* seconds */ #define RECONNECTION_MULTIPLIER 3 @@ -1050,7 +1046,7 @@ _mcd_connection_setup_power_saving (McdConnection *connection) DEBUG ("is %sactive", mcd_slacker_is_inactive (priv->slacker) ? "in" : ""); if (mcd_slacker_is_inactive (priv->slacker)) - mc_cli_connection_interface_power_saving_call_set_power_saving (priv->tp_conn, -1, + tp_cli_connection_interface_power_saving_call_set_power_saving (priv->tp_conn, -1, TRUE, NULL, NULL, NULL, NULL); } @@ -1603,7 +1599,7 @@ on_connection_ready (TpConnection *tp_conn, const GError *error, priv->has_contact_capabilities_if = tp_proxy_has_interface_by_id (tp_conn, TP_IFACE_QUARK_CONNECTION_INTERFACE_CONTACT_CAPABILITIES); priv->has_power_saving_if = tp_proxy_has_interface_by_id (tp_conn, - MC_IFACE_QUARK_CONNECTION_INTERFACE_POWER_SAVING); + TP_IFACE_QUARK_CONNECTION_INTERFACE_POWER_SAVING); if (priv->has_presence_if) _mcd_connection_setup_presence (connection); @@ -2027,7 +2023,7 @@ on_inactivity_changed (McdSlacker *slacker, priv->has_power_saving_if ? "has" : "doesn't"); if (priv->has_power_saving_if) - mc_cli_connection_interface_power_saving_call_set_power_saving (priv->tp_conn, -1, + tp_cli_connection_interface_power_saving_call_set_power_saving (priv->tp_conn, -1, inactive, NULL, NULL, NULL, NULL); } @@ -2326,18 +2322,6 @@ _mcd_connection_request_channel (McdConnection *connection, McdChannel *channel) } static void -mcd_connection_add_signals (TpProxy *self, - guint quark, - DBusGProxy *proxy, - gpointer data) -{ - mc_cli_Connection_Interface_Contact_Capabilities_add_signals (self, quark, - proxy, data); - mc_cli_Connection_Interface_Power_Saving_add_signals (self, quark, - proxy, data); -} - -static void mcd_connection_class_init (McdConnectionClass * klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); @@ -2355,8 +2339,6 @@ mcd_connection_class_init (McdConnectionClass * klass) _mcd_ext_register_dbus_glib_marshallers (); tp_connection_init_known_interfaces (); - tp_proxy_or_subclass_hook_on_interface_add (TP_TYPE_CONNECTION, - mcd_connection_add_signals); /* Properties */ g_object_class_install_property diff --git a/xml/Connection_Interface_Contact_Capabilities.xml b/xml/Connection_Interface_Contact_Capabilities.xml deleted file mode 100644 index 6596ecbb..00000000 --- a/xml/Connection_Interface_Contact_Capabilities.xml +++ /dev/null @@ -1,245 +0,0 @@ -<?xml version="1.0" ?> -<node name="/Connection_Interface_Contact_Capabilities" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0"> - <tp:copyright> Copyright (C) 2005, 2006, 2008 Collabora Limited </tp:copyright> - <tp:copyright> Copyright (C) 2005, 2006, 2008 Nokia Corporation </tp:copyright> - <tp:copyright> Copyright (C) 2006 INdT </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.Connection.Interface.ContactCapabilities"> - <tp:requires interface="org.freedesktop.Telepathy.Connection"/> - <tp:added version="0.17.28">(as stable API)</tp:added> - - <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> - <p>Contact capabilities describe the channel classes which may be - created with a given contact in advance of attempting to create a - channel. Each capability represents a commitment by the - connection manager that it will ordinarily be able to create a channel - with a contact when given a request with the properties defined by the - channel class.</p> - - <p>Capabilities pertain to particular contact handles, and represent - activities such as having a text chat, a voice call with the user or a - stream tube of a defined type.</p> - - <p>This interface also enables user interfaces to notify the connection - manager what capabilities to advertise for the user to other contacts. - This is done by using the - <tp:member-ref>UpdateCapabilities</tp:member-ref> method.</p> - - <tp:rationale> - <p>XMPP is a major user of this interface: XMPP contacts will not, - in general, be callable using VoIP unless they advertise suitable - Jingle capabilities.</p> - - <p>Many other protocols also have some concept of capability flags, - which this interface exposes in a protocol-independent way.</p> - </tp:rationale> - </tp:docstring> - - <tp:struct name="Handler_Capabilities" - array-name="Handler_Capabilities_List"> - <tp:docstring> - A structure representing the capabilities of a single client. - </tp:docstring> - - <tp:member name="Well_Known_Name" type="s" tp:type="DBus_Well_Known_Name"> - <tp:docstring> - For implementations of the <tp:dbus-ref - namespace="org.freedesktop.Telepathy">Client</tp:dbus-ref> - interface, the well-known bus name name of the client; for any other - process, any other reversed domain name that uniquely identifies it. - </tp:docstring> - </tp:member> - - <tp:member name="Channel_Classes" type="aa{sv}" - tp:type="String_Variant_Map[]"> - <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> - An array of channel classes that can be handled by this client. - This will usually be a copy of the client's <tp:dbus-ref - namespace="org.freedesktop.Telepathy.Client.Handler">HandlerChannelFilter</tp:dbus-ref> - property. - </tp:docstring> - </tp:member> - - <tp:member name="Capabilities" - type="as" tp:type="Handler_Capability_Token[]"> - <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> - An array of client capabilities supported by this client, to be - used by the connection manager to determine what capabilities to - advertise. This will usually be a copy of the client's <tp:dbus-ref - namespace="org.freedesktop.Telepathy.Client.Handler">Capabilities</tp:dbus-ref> - property. - </tp:docstring> - </tp:member> - </tp:struct> - - <method name="UpdateCapabilities" tp:name-for-bindings="Update_Capabilities"> - <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> - <p>Alter the connection's advertised capabilities to include - the intersection of the given clients' capabilities with what the - connection manager is able to implement.</p> - - <p>On connections managed by the ChannelDispatcher, processes other - than the ChannelDispatcher SHOULD NOT call this method, and the - ChannelDispatcher SHOULD use this method to advertise the - capabilities of all the registered <tp:dbus-ref - namespace="org.freedesktop.Telepathy">Client.Handler</tp:dbus-ref> - implementations.On connections not managed by the ChannelDispatcher, - clients MAY use this method directly, to indicate the channels they - will handle and the extra capabilities they have.</p> - - <p>Upon a successful invocation of this method, the connection manager - will only emit the - <tp:member-ref>ContactCapabilitiesChanged</tp:member-ref> signal - for the user's <tp:dbus-ref - namespace="org.freedesktop.Telepathy.Connection">SelfHandle</tp:dbus-ref> - if, in the underlying protocol, the new capabilities are distinct - from the previous state.</p> - - <tp:rationale> - <p>The connection manager will essentially intersect the provided - capabilities and the channel classes it implements. Therefore, - certain properties which are never fixed for a channel class - (such as the target handle, or the Parameters property of a tube - channel) will almost certainly not be advertised.</p> - </tp:rationale> - - <p>This method MAY be called on a newly-created connection while it - is still in the DISCONNECTED state, to request that when the - connection connects, it will do so with the appropriate - capabilities. Doing so MUST NOT fail.</p> - </tp:docstring> - - <arg direction="in" name="Handler_Capabilities" type="a(saa{sv}as)" - tp:type="Handler_Capabilities[]"> - <tp:docstring> - <p>The capabilities of one or more clients.</p> - - <p>For each client in the given list, any capabilities previously - advertised for the same client name are discarded, then replaced by - the capabilities indicated.</p> - - <p>As a result, if a client becomes unavailable, this method SHOULD - be called with a <tp:type>Handler_Capabilities</tp:type> structure - containing its name, an empty list of channel classes, and an - empty list of capabilities. When this is done, the connection - manager SHOULD free all memory associated with that client name.</p> - - <tp:rationale> - <p>This method takes a list of clients so that - when the channel dispatcher first calls it (with a list of all - the Handlers that are initially available), the changes can be - made atomically, with only one transmission of updated - capabilities to the network. Afterwards, the channel dispatcher - will call this method with a single-element list every time - a Handler becomes available or unavailable.</p> - </tp:rationale> - - <p>The connection manager MUST ignore any channel classes and client - capabilities for which there is no representation in the protocol - or no support in the connection manager.</p> - </tp:docstring> - </arg> - - <tp:possible-errors> - <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/> - </tp:possible-errors> - </method> - - <method name="GetContactCapabilities" - tp:name-for-bindings="Get_Contact_Capabilities"> - <arg direction="in" name="handles" type="au" tp:type="Contact_Handle[]"> - <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> - <p>An array of contact handles for this connection.</p> - - <p>The handle zero MUST NOT be included in the request.</p> - </tp:docstring> - </arg> - <arg direction="out" type="a{ua(a{sv}as)}" - tp:type="Contact_Capabilities_Map" name="Contact_Capabilities"> - <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> - An array of structures containing: - <ul> - <li>a dictionary mapping the channel properties to their values.</li> - <li>an array of additional allowed properties</li> - </ul> - </tp:docstring> - </arg> - <tp:docstring> - Returns an array of enhanced capabilities for the given contact handles. - </tp:docstring> - <tp:possible-errors> - <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/> - <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle"> - <tp:docstring> - The handle does not represent a contact. Zero is always invalid. - </tp:docstring> - </tp:error> - </tp:possible-errors> - </method> - - <signal name="ContactCapabilitiesChanged" - tp:name-for-bindings="Contact_Capabilities_Changed"> - <arg name="caps" type="a{ua(a{sv}as)}" - tp:type="Contact_Capabilities_Map"> - <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> - All the capabilities of the contacts - </tp:docstring> - </arg> - <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> - <p>Announce that there has been a change of capabilities on the - given handles. A single signal can be emitted for several - contacts.</p> - - <tp:rationale> - <p>The underlying protocol can get several contacts' capabilities at - the same time.</p> - </tp:rationale> - - </tp:docstring> - </signal> - - <tp:mapping name="Contact_Capabilities_Map" - array-name="Contact_Capabilities_Map_List"> - <tp:docstring>A mapping from contact handle to their capabilities. - </tp:docstring> - <tp:member type="u" name="Key" tp:type="Contact_Handle"> - <tp:docstring> - A contact handle. - </tp:docstring> - </tp:member> - <tp:member type="a(a{sv}as)" name="Value" - tp:type="Requestable_Channel_Class[]"> - <tp:docstring> - The contact capabilities. - </tp:docstring> - </tp:member> - </tp:mapping> - - <tp:contact-attribute name="capabilities" - type="a(a{sv}as)" tp:type="Requestable_Channel_Class[]"> - <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> - <p>The same structs that would be returned by - <tp:member-ref>GetContactCapabilities</tp:member-ref>. - Omitted from the result if the contact's capabilities - are not known; present in the result as an empty array if the - contact is known to have no capabilities at all.</p> - </tp:docstring> - </tp:contact-attribute> - - </interface> -</node> -<!-- vim:set sw=2 sts=2 et ft=xml: --> diff --git a/xml/Connection_Interface_Power_Saving.xml b/xml/Connection_Interface_Power_Saving.xml deleted file mode 100644 index d9690325..00000000 --- a/xml/Connection_Interface_Power_Saving.xml +++ /dev/null @@ -1,109 +0,0 @@ -<?xml version="1.0" ?> -<node name="/Connection_Interface_Power_Saving" - xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0" - > - <tp:copyright> Copyright © 2007-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 -Library 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.Connection.Interface.PowerSaving"> - <tp:added version="0.21.UNRELEASED">(as stable API)</tp:added> - <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> - <p>Some protocols support mechanisms for reducing bandwidth usage—and - hence power usage, on mobile devices—when the user is not directly - interacting with their IM client. For instance, Google Talk's XMPP - server supports queueing incoming presence updates at the client's - instruction; the client can instruct the server to deliver all - outstanding presence updates at a later time. This interface may be - used to instruct the connection manager to enable and disable such - protocol-level features when a screensaver is activated, the device - screen is locked, and so on, by calling the - <tp:member-ref>SetPowerSaving</tp:member-ref> method.</p> - - <p>Enabling power saving SHOULD NOT change behaviour in any way - that is noticable to a user not actively interacting with their client. - For example, delaying presence updates somewhat is unlikely to be - noticed by a user not staring at their device waiting for a contact to - come online; on the other hand, requesting that the server queue - incoming messages would be noticable by the user, so is not an - acceptable effect of calling - <tp:member-ref>SetPowerSaving</tp:member-ref>.</p> - </tp:docstring> - - <method name="SetPowerSaving" tp:name-for-bindings="Set_Power_Saving"> - <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> - <p>Turn power saving mode on or off.</p> - - <tp:rationale> - <p>Depending on the device's activity level, the - connection can have its power saving mode turned on or off.</p> - </tp:rationale> - - <p>Errors raised by this method indicate that power saving could not be - enabled, which SHOULD NOT generally be treated as fatal.</p> - - <tp:rationale> - If the CM cannot switch modes, either because of the - protocol (<code>NotImplemented</code>), or because of the service - (<code>NotAvailable</code>), Mission Control (or whoever manages this) - should be made aware. The error could be ignored or, in the extreme, - be fascist and disconnect the account. - </tp:rationale> - </tp:docstring> - - <arg direction="in" name="Activate" type="b"> - <tp:docstring> - <code>True</code> if protocol-level power saving features should be - activated; <code>False</code> if they should be de-activated. - </tp:docstring> - </arg> - - <tp:possible-errors> - <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable"> - <tp:docstring> - The current connection has no power saving features. - </tp:docstring> - </tp:error> - <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented"/> - </tp:possible-errors> - </method> - - <property name="PowerSavingActive" type="b" access="read" - tp:name-for-bindings="Power_Saving_Active"> - <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> - <p><code>True</code> if protocol-level power saving features are - currently activated. This property can be changed using the - <tp:member-ref>SetPowerSaving</tp:member-ref> method; change - notifications is via the - <tp:member-ref>PowerSavingChanged</tp:member-ref> signal.</p> - </tp:docstring> - </property> - - <signal name="PowerSavingChanged" - tp:name-for-bindings="Power_Saving_Changed"> - <arg name="Active" type="b"> - <tp:docstring> - The new state of the power saving feature. - </tp:docstring> - </arg> - <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> - The <tp:member-ref>PowerSavingActive</tp:member-ref> - property changed. - </tp:docstring> - </signal> - </interface> -</node> -<!-- vim:set sw=2 sts=2 et ft=xml: --> diff --git a/xml/Makefile.am b/xml/Makefile.am index 055de0fa..c7fd9b83 100644 --- a/xml/Makefile.am +++ b/xml/Makefile.am @@ -26,9 +26,7 @@ SPECS = \ Client_Interface_Requests.xml \ Client_Observer.xml \ Connection_Manager_Interface_Account_Storage.xml \ - Connection_Interface_Contact_Capabilities.xml \ - Channel_Dispatcher_Interface_Messages_DRAFT.xml \ - Connection_Interface_Power_Saving.xml + Channel_Dispatcher_Interface_Messages_DRAFT.xml SPECS_GEN = ${SPECS:%.xml=_gen/introspect-%.xml} diff --git a/xml/nmc5.xml b/xml/nmc5.xml index a9beb086..3b87a053 100644 --- a/xml/nmc5.xml +++ b/xml/nmc5.xml @@ -29,7 +29,4 @@ <xi:include href="Connection_Manager_Interface_Account_Storage.xml"/> -<xi:include href="Connection_Interface_Contact_Capabilities.xml"/> -<xi:include href="Connection_Interface_Power_Saving.xml"/> - </tp:spec> |