Include _generated now so I get all the latest fancy stuff
[theonering] / src / tp / _generated / Channel_Type_Tubes.py
1 # -*- coding: utf-8 -*-
2 # Generated from the Telepathy spec
3 """
4     Copyright © 2007-2009 Collabora Limited
5   
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 ChannelTypeTubes(dbus.service.Interface):
27     """\
28       A "tube" is a mechanism for arbitrary data transfer. Two types of
29         data transfer are currently specified: D-Bus messages, and streams of
30         bytes. Each tube has a service name, which is a string specifying the
31         kind of communication that takes place over it, and a dictionary of
32         arbitrary parameters. Tube parameters are commonly used for bootstrap
33         information such as usernames and passwords. Each tube is identified
34         by a locally unique identifier.
35
36        The Tubes channel type may be requested for handles of type
37          HANDLE_TYPE_CONTACT and HANDLE_TYPE_ROOM.
38
39        Stream tubes specify listening addresses using pairs of parameters
40          with signature 'u', 'v', where the integer 'u' is a member of
41          Socket_Address_Type and the v is dependent on the type of address.
42     """
43
44     @dbus.service.method('org.freedesktop.Telepathy.Channel.Type.Tubes', in_signature='', out_signature='a{uau}')
45     def GetAvailableStreamTubeTypes(self):
46         """List the available address types and access-control types
47         for stream tubes.
48         """
49         raise NotImplementedError
50   
51     @dbus.service.method('org.freedesktop.Telepathy.Channel.Type.Tubes', in_signature='', out_signature='au')
52     def GetAvailableTubeTypes(self):
53         """
54         """
55         raise NotImplementedError
56   
57     @dbus.service.method('org.freedesktop.Telepathy.Channel.Type.Tubes', in_signature='', out_signature='a(uuusa{sv}u)')
58     def ListTubes(self):
59         """
60         """
61         raise NotImplementedError
62   
63     @dbus.service.method('org.freedesktop.Telepathy.Channel.Type.Tubes', in_signature='sa{sv}', out_signature='u')
64     def OfferDBusTube(self, Service, Parameters):
65         """
66         Offers a D-Bus tube providing the service specified.
67       
68         """
69         raise NotImplementedError
70   
71     @dbus.service.method('org.freedesktop.Telepathy.Channel.Type.Tubes', in_signature='sa{sv}uvuv', out_signature='u')
72     def OfferStreamTube(self, Service, Parameters, Address_Type, Address, Access_Control, Access_Control_Param):
73         """
74         Offer a stream tube exporting the local socket specified.
75       
76         """
77         raise NotImplementedError
78   
79     @dbus.service.method('org.freedesktop.Telepathy.Channel.Type.Tubes', in_signature='u', out_signature='s')
80     def AcceptDBusTube(self, ID):
81         """
82         Accept a D-Bus tube that's in the "local pending" state. The
83         connection manager will attempt to open the tube. The tube remains in
84         the "local pending" state until the TubeStateChanged signal is
85         emitted.
86       
87         """
88         raise NotImplementedError
89   
90     @dbus.service.method('org.freedesktop.Telepathy.Channel.Type.Tubes', in_signature='uuuv', out_signature='v')
91     def AcceptStreamTube(self, ID, Address_Type, Access_Control, Access_Control_Param):
92         """
93         Accept a stream tube that's in the "local pending" state. The
94         connection manager will attempt to open the tube. The tube remains in
95         the "local pending" state until the TubeStateChanged signal is
96         emitted.
97       
98         """
99         raise NotImplementedError
100   
101     @dbus.service.method('org.freedesktop.Telepathy.Channel.Type.Tubes', in_signature='u', out_signature='')
102     def CloseTube(self, ID):
103         """
104         Close a tube.
105       
106         """
107         raise NotImplementedError
108   
109     @dbus.service.method('org.freedesktop.Telepathy.Channel.Type.Tubes', in_signature='u', out_signature='s')
110     def GetDBusTubeAddress(self, ID):
111         """
112         For a D-Bus tube, return a string describing the address of the
113         private bus.
114       
115         """
116         raise NotImplementedError
117   
118     @dbus.service.method('org.freedesktop.Telepathy.Channel.Type.Tubes', in_signature='u', out_signature='a(us)')
119     def GetDBusNames(self, ID):
120         """
121         For a multi-user (i.e. Handle_Type_Room) D-Bus tube, obtain a mapping
122         between contact handles and their unique bus names on this tube.
123       
124         """
125         raise NotImplementedError
126   
127     @dbus.service.method('org.freedesktop.Telepathy.Channel.Type.Tubes', in_signature='u', out_signature='uv')
128     def GetStreamTubeSocketAddress(self, ID):
129         """
130         For a stream tube, obtain the address of the socket used to
131         communicate over this tube.
132       
133         """
134         raise NotImplementedError
135   
136     @dbus.service.signal('org.freedesktop.Telepathy.Channel.Type.Tubes', signature='uuusa{sv}u')
137     def NewTube(self, ID, Initiator, Type, Service, Parameters, State):
138         """
139         Emitted when a tube is created.
140       
141         """
142         pass
143   
144     @dbus.service.signal('org.freedesktop.Telepathy.Channel.Type.Tubes', signature='uu')
145     def TubeStateChanged(self, ID, State):
146         """
147         Emitted when the state of a tube changes.
148       
149         """
150         pass
151   
152     @dbus.service.signal('org.freedesktop.Telepathy.Channel.Type.Tubes', signature='u')
153     def TubeClosed(self, ID):
154         """
155        Emitted when a tube has been closed. The ID of a closed tube is no
156        longer valid. The ID may later be reused for a new tube.
157       
158         """
159         pass
160   
161     @dbus.service.signal('org.freedesktop.Telepathy.Channel.Type.Tubes', signature='ua(us)au')
162     def DBusNamesChanged(self, ID, Added, Removed):
163         """
164         Emitted on a multi-user (i.e. Handle_Type_Room) D-Bus tube when a
165         participant opens or closes the tube.
166       
167         """
168         pass
169   
170     @dbus.service.signal('org.freedesktop.Telepathy.Channel.Type.Tubes', signature='uu')
171     def StreamTubeNewConnection(self, ID, Handle):
172         """
173         Emitted on a stream tube when a participant opens a new connection
174         to its socket.
175       
176         """
177         pass
178