35 """DBus service of a 'Settings' instance.""" 38 super(SettingsProxyDBusService, self).
__init__(object_path)
43 if settings
is not None:
45 self.
_group = settings._group
50 @dbus.service.method(
'org.ros.qt_gui.Settings', in_signature=
's', out_signature=
'av')
52 return self._settings_proxy.all_keys(self.
_group +
'/' + group)
54 @dbus.service.method(
'org.ros.qt_gui.Settings', in_signature=
's', out_signature=
'as')
56 return self._settings_proxy.child_groups(self.
_group +
'/' + group)
58 @dbus.service.method(
'org.ros.qt_gui.Settings', in_signature=
's', out_signature=
'as')
60 return self._settings_proxy.child_keys(self.
_group +
'/' + group)
62 @dbus.service.method(
'org.ros.qt_gui.Settings', in_signature=
'ss', out_signature=
'b')
64 return self._settings_proxy.contains(self.
_group +
'/' + group, key)
66 @dbus.service.method(
'org.ros.qt_gui.Settings', in_signature=
'ss', out_signature=
'')
68 self._settings_proxy.remove(self.
_group +
'/' + group, key)
70 @dbus.service.method(
'org.ros.qt_gui.Settings', in_signature=
'ssv', out_signature=
'')
73 self._settings_proxy.set_value(self.
_group +
'/' + group, key, value)
75 @dbus.service.method(
'org.ros.qt_gui.Settings', in_signature=
'ssv', out_signature=
'v')
76 def value(self, group, key, default_value=None):
77 return self._settings_proxy.value(self.
_group +
'/' + group, key, default_value)
81 if isinstance(value, dbus.Boolean):
83 elif isinstance(value,
84 (dbus.Byte, dbus.Int16, dbus.Int32, dbus.Int64,
85 dbus.UInt16, dbus.UInt32, dbus.UInt64)):
87 elif isinstance(value, dbus.Double):
89 elif isinstance(value, dbus.String):
91 elif isinstance(value, dbus.UTF8String):
93 value = unicode(value)
def contains(self, group, key)
def child_keys(self, group)
def remove(self, group, key)
def set_settings(self, settings)
def child_groups(self, group)
def all_keys(self, group)
def _sanitize_value(self, value)
def value(self, group, key, default_value=None)
def __init__(self, object_path)
def set_value(self, group, key, value)