Include _generated now so I get all the latest fancy stuff
[theonering] / src / tp / _generated / Channel_Type_Stream_Tube.py
1 # -*- coding: utf-8 -*-
2 # Generated from the Telepathy spec
3 """Copyright © 2008-2009 Collabora Limited
4 Copyright © 2008-2009 Nokia Corporation
5
6     This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
10
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public
17 License along with this library; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19   
20 """
21
22 import dbus.service
23
24
25 class ChannelTypeStreamTube(dbus.service.Interface):
26     """\
27       A stream tube is a transport for ordered, reliable data transfer,
28         similar to SOCK_STREAM sockets.
29
30       When offering a stream tube, the initiating client creates a local
31         listening socket and offers it to the recipient client using the
32         Offer method.  When a
33         recipient accepts a stream tube using the
34         Accept method, the
35         recipient's connection manager creates a new local listening socket.
36         Each time the recipient's client connects to this socket, the
37         initiator's connection manager proxies this connection to the
38         originally offered socket.
39
40     """
41
42     @dbus.service.method('org.freedesktop.Telepathy.Channel.Type.StreamTube', in_signature='uvua{sv}', out_signature='')
43     def Offer(self, address_type, address, access_control, parameters):
44         """
45         Offer a stream tube exporting the local socket specified.
46       
47         """
48         raise NotImplementedError
49   
50     @dbus.service.method('org.freedesktop.Telepathy.Channel.Type.StreamTube', in_signature='uuv', out_signature='v')
51     def Accept(self, address_type, access_control, access_control_param):
52         """
53         Accept a stream tube that's in the "local pending" state. The
54         connection manager will attempt to open the tube. The tube remains in
55         the "local pending" state until the TubeChannelStateChanged
56         signal is emitted.
57       
58         """
59         raise NotImplementedError
60   
61     @dbus.service.signal('org.freedesktop.Telepathy.Channel.Type.StreamTube', signature='uvu')
62     def NewRemoteConnection(self, Handle, Connection_Param, Connection_ID):
63         """
64         Emitted each time a participant opens a new connection to its
65         socket.
66
67         This signal is only fired on the offering side.
68       
69         """
70         pass
71   
72     @dbus.service.signal('org.freedesktop.Telepathy.Channel.Type.StreamTube', signature='u')
73     def NewLocalConnection(self, Connection_ID):
74         """
75         Emitted when the tube application connects to the CM's socket.
76
77         This signal is only fired on the accepting side.
78       
79         """
80         pass
81   
82     @dbus.service.signal('org.freedesktop.Telepathy.Channel.Type.StreamTube', signature='uss')
83     def ConnectionClosed(self, Connection_ID, Error, Message):
84         """
85         Emitted when a connection has been closed.
86       
87         """
88         pass
89