1 # -*- coding: utf-8 -*-
2 # Generated from the Telepathy spec
3 """ Copyright (C) 2005-2007 Collabora Limited
4 Copyright (C) 2005, 2006 Nokia Corporation
5 Copyright (C) 2006 INdT
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 PropertiesInterface(dbus.service.Interface):
28 Interface for channels and other objects, to allow querying and setting
29 properties. ListProperties returns which properties are valid for
30 the given channel, including their type, and an integer handle used to
31 refer to them in GetProperties, SetProperties, and the PropertiesChanged
32 signal. The values are represented by D-Bus variant types, and are
33 accompanied by flags indicating whether or not the property is readable or
36 Each property also has a flags value to indicate what methods are
37 available. This is a bitwise OR of PropertyFlags values.
41 self._interfaces.add('org.freedesktop.Telepathy.Properties')
43 @dbus.service.method('org.freedesktop.Telepathy.Properties', in_signature='au', out_signature='a(uv)')
44 def GetProperties(self, Properties):
46 Returns an array of (identifier, value) pairs containing the current
47 values of the given properties.
50 raise NotImplementedError
52 @dbus.service.method('org.freedesktop.Telepathy.Properties', in_signature='', out_signature='a(ussu)')
53 def ListProperties(self):
55 Returns a dictionary of the properties available on this channel.
58 raise NotImplementedError
60 @dbus.service.method('org.freedesktop.Telepathy.Properties', in_signature='a(uv)', out_signature='')
61 def SetProperties(self, Properties):
63 Takes an array of (identifier, value) pairs containing desired
64 values to set the given properties. In the case of any errors, no
65 properties will be changed. When the changes have been acknowledged
66 by the server, the PropertiesChanged signal will be emitted.
68 All properties given must have the PROPERTY_FLAG_WRITE flag, or
69 PermissionDenied will be returned. If any variants are of the wrong
70 type, NotAvailable will be returned. If any given property identifiers
71 are invalid, InvalidArgument will be returned.
74 raise NotImplementedError
76 @dbus.service.signal('org.freedesktop.Telepathy.Properties', signature='a(uv)')
77 def PropertiesChanged(self, Properties):
79 Emitted when the value of readable properties has changed.
84 @dbus.service.signal('org.freedesktop.Telepathy.Properties', signature='a(uu)')
85 def PropertyFlagsChanged(self, Properties):
87 Emitted when the flags of some room properties have changed.