Reducing log noise
[theonering] / src / tp / _generated / Connection_Interface_Capabilities.py
1 # -*- coding: utf-8 -*-
2 # Generated from the Telepathy spec
3 """ Copyright (C) 2005, 2006 Collabora Limited 
4  Copyright (C) 2005, 2006 Nokia Corporation 
5  Copyright (C) 2006 INdT 
6
7     This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or (at your option) any later version.
11
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15 Lesser General Public License for more details.
16
17 You should have received a copy of the GNU Lesser General Public
18 License along with this library; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20   
21 """
22
23 import dbus.service
24
25
26 class ConnectionInterfaceCapabilities(dbus.service.Interface):
27     """\
28       An interface for connections where it is possible to know what channel
29         types may be requested before the request is made to the connection
30         object. Each capability represents a commitment by the connection
31         manager that it will ordinarily be able to create a channel when given
32         a request with the given type and handle.
33
34       Capabilities pertain to particular contact handles, and represent
35         activities such as having a text chat or a voice call with the user.
36         The activities are represented by the D-Bus interface name of the
37         channel type for that activity.
38
39       The generic capability flags are defined by
40         Connection_Capability_Flags.
41
42       In addition, channel types may have type specific capability flags of
43         their own, which are described in the documentation for each channel
44         type.
45
46       This interface also provides for user interfaces notifying the
47         connection manager of what capabilities to advertise for the user. This
48         is done by using the
49         AdvertiseCapabilities method, and deals
50         with the
51         interface names of channel types and the type specific flags pertaining
52         to them which are implemented by available client processes.
53     """
54
55     def __init__(self):
56         self._interfaces.add('org.freedesktop.Telepathy.Connection.Interface.Capabilities')
57
58     @dbus.service.method('org.freedesktop.Telepathy.Connection.Interface.Capabilities', in_signature='a(su)as', out_signature='a(su)')
59     def AdvertiseCapabilities(self, Add, Remove):
60         """
61         Used by user interfaces to indicate which channel types they are able
62         to handle on this connection. Because these may be provided by
63         different client processes, this method accepts channel types to add
64         and remove from the set already advertised on this connection. The type
65         of advertised capabilities (create versus invite) is protocol-dependent
66         and hence cannot be set by the this method. In the case of a client
67         adding an already advertised channel type but with new channel type
68         specific flags, the connection manager should simply add the new flags
69         to the set of advertised capabilities.
70
71         Upon a successful invocation of this method, the
72         CapabilitiesChanged
73         signal will be emitted for the user's own handle ( Connection.GetSelfHandle)
74         by the connection manager to indicate the changes
75         that have been made.  This signal should also be monitored to ensure
76         that the set is kept accurate - for example, a client may remove
77         capabilities or type specific capability flags when it exits
78         which are still provided by another client.
79
80         On connections managed by the ChannelDispatcher,
81           this method SHOULD NOT be used by clients other than the
82           ChannelDispatcher itself.
83       
84         """
85         raise NotImplementedError
86   
87     @dbus.service.method('org.freedesktop.Telepathy.Connection.Interface.Capabilities', in_signature='au', out_signature='a(usuu)')
88     def GetCapabilities(self, Handles):
89         """
90         Returns an array of capabilities for the given contact handles.
91       
92         """
93         raise NotImplementedError
94   
95     @dbus.service.signal('org.freedesktop.Telepathy.Connection.Interface.Capabilities', signature='a(usuuuu)')
96     def CapabilitiesChanged(self, Caps):
97         """
98         Announce that there has been a change of capabilities on the
99           given handle.
100
101         If the handle is zero, the capabilities refer to the connection
102           itself, in some poorly defined way. This usage is deprecated and
103           clients should ignore it.
104       
105         """
106         pass
107