1 # -*- coding: utf-8 -*-
2 # Generated from the Telepathy spec
3 """Copyright © 2005-2009 Collabora Limited
4 Copyright © 2005-2009 Nokia Corporation
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.
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.
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.
26 class Channel(dbus.service.Object):
28 All communication in the Telepathy framework is carried out via channel
29 objects which are created and managed by connections. This interface must
30 be implemented by all channel objects, along with one single channel type,
31 such as Channel.Type.ContactList
32 which represents a list of people (such as a buddy list) or a Channel.Type.Text which
33 represents a channel over which textual messages are sent and received.
35 Each Channel's object path MUST start with the object path of
36 its associated Connection, followed
37 by '/'. There MAY be any number of additional object-path components,
38 which clients MUST NOT attempt to parse.
41 This ensures that Channel object paths are unique, even between
42 Connections and CMs, because Connection object paths are
43 guaranteed-unique via their link to the well-known bus name.
45 If all connection managers in use are known to comply with at least
46 spec version 0.17.10, then the Connection's object path can
47 even be determined from the Channel's without any additional
48 information, by taking the first 7 components.
51 Each channel may have an immutable handle associated with it, which
52 may be any handle type, such as a contact, room or list handle,
53 indicating that the channel is for communicating with that handle.
55 If a channel does not have a handle (an "anonymous channel" with
56 Target_Handle = 0 and Target_Handle_Type = Handle_Type_None), it
57 means that the channel is defined by some other terms, such as it
58 may be a transient group defined only by its members as visible
59 through the Channel.Interface.Group
62 Other optional interfaces can be implemented to indicate other available
63 functionality, such as Channel.Interface.Group
64 if the channel contains a number of contacts, Channel.Interface.Password
65 to indicate that a channel may have a password set to require entry, and
67 extra data about channels which represent chat rooms or voice calls. The
68 interfaces implemented may not vary after the channel's creation has been
69 signalled to the bus (with the connection's NewChannel
72 Specific connection manager implementations may implement channel types and
73 interfaces which are not contained within this specification in order to
74 support further functionality. To aid interoperability between client and
75 connection manager implementations, the interfaces specified here should be
76 used wherever applicable, and new interfaces made protocol-independent
77 wherever possible. Because of the potential for 3rd party interfaces adding
78 methods or signals with conflicting names, the D-Bus interface names should
79 always be used to invoke methods and bind signals.
82 @dbus.service.method('org.freedesktop.Telepathy.Channel', in_signature='', out_signature='')
85 Request that the channel be closed. This is not the case until
86 the Closed signal has been emitted, and
87 depending on the connection
88 manager this may simply remove you from the channel on the server,
89 rather than causing it to stop existing entirely. Some channels
90 such as contact list channels may not be closed.
93 raise NotImplementedError
95 @dbus.service.method('org.freedesktop.Telepathy.Channel', in_signature='', out_signature='s')
96 def GetChannelType(self):
98 Returns the interface name for the type of this channel. Clients
99 SHOULD use the ChannelType property
100 instead, falling back to this method only if necessary.
103 The GetAll method lets clients retrieve all properties in one
108 raise NotImplementedError
110 @dbus.service.method('org.freedesktop.Telepathy.Channel', in_signature='', out_signature='uu')
113 Returns the handle type and number if this channel represents a
114 communication with a particular contact, room or server-stored list, or
115 zero if it is transient and defined only by its contents. Clients
116 SHOULD use the TargetHandle and
117 TargetHandleType properties instead,
118 falling back to this method only if necessary.
121 The GetAll method lets clients retrieve all properties in one
126 raise NotImplementedError
128 @dbus.service.method('org.freedesktop.Telepathy.Channel', in_signature='', out_signature='as')
129 def GetInterfaces(self):
131 Get the optional interfaces implemented by the channel.
132 Clients SHOULD use the Interfaces
133 property instead, falling back to this method only if necessary.
136 The GetAll method lets clients retrieve all properties in one
141 raise NotImplementedError
143 @dbus.service.signal('org.freedesktop.Telepathy.Channel', signature='')
146 Emitted when the channel has been closed. Method calls on the
147 channel are no longer valid after this signal has been emitted,
148 and the connection manager may then remove the object from the bus