1 # -*- coding: utf-8 -*-
2 # Generated from the Telepathy spec
3 """Copyright © 2008-2009 Collabora Limited
4 Copyright © 2008-2009 Nokia Corporation
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.
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.
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.
25 class ChannelTypeStreamTube(dbus.service.Interface):
27 A stream tube is a transport for ordered, reliable data transfer,
28 similar to SOCK_STREAM sockets.
30 When offering a stream tube, the initiating client creates a local
31 listening socket and offers it to the recipient client using the
33 recipient accepts a stream tube using 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.
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):
45 Offer a stream tube exporting the local socket specified.
48 raise NotImplementedError
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):
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
59 raise NotImplementedError
61 @dbus.service.signal('org.freedesktop.Telepathy.Channel.Type.StreamTube', signature='uvu')
62 def NewRemoteConnection(self, Handle, Connection_Param, Connection_ID):
64 Emitted each time a participant opens a new connection to its
67 This signal is only fired on the offering side.
72 @dbus.service.signal('org.freedesktop.Telepathy.Channel.Type.StreamTube', signature='u')
73 def NewLocalConnection(self, Connection_ID):
75 Emitted when the tube application connects to the CM's socket.
77 This signal is only fired on the accepting side.
82 @dbus.service.signal('org.freedesktop.Telepathy.Channel.Type.StreamTube', signature='uss')
83 def ConnectionClosed(self, Connection_ID, Error, Message):
85 Emitted when a connection has been closed.