|
Packit |
3ff832 |
# vim:set et sts=4 sw=4:
|
|
Packit |
3ff832 |
#
|
|
Packit |
3ff832 |
# ibus - The Input Bus
|
|
Packit |
3ff832 |
#
|
|
Packit |
3ff832 |
# Copyright (c) 2007-2010 Peng Huang <shawn.p.huang@gmail.com>
|
|
Packit |
3ff832 |
# Copyright (c) 2007-2010 Red Hat, Inc.
|
|
Packit |
3ff832 |
#
|
|
Packit |
3ff832 |
# This library is free software; you can redistribute it and/or
|
|
Packit |
3ff832 |
# modify it under the terms of the GNU Lesser General Public
|
|
Packit |
3ff832 |
# License as published by the Free Software Foundation; either
|
|
Packit |
3ff832 |
# version 2.1 of the License, or (at your option) any later version.
|
|
Packit |
3ff832 |
#
|
|
Packit |
3ff832 |
# This library is distributed in the hope that it will be useful,
|
|
Packit |
3ff832 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
3ff832 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit |
3ff832 |
# Lesser General Public License for more details.
|
|
Packit |
3ff832 |
#
|
|
Packit |
3ff832 |
# You should have received a copy of the GNU Lesser General Public
|
|
Packit |
3ff832 |
# License along with this library; if not, write to the Free Software
|
|
Packit |
3ff832 |
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
|
|
Packit |
3ff832 |
# USA
|
|
Packit |
3ff832 |
|
|
Packit |
3ff832 |
__all__ = ("IConfig", )
|
|
Packit |
3ff832 |
|
|
Packit |
3ff832 |
import dbus.service
|
|
Packit |
3ff832 |
from ibus.common import \
|
|
Packit |
3ff832 |
IBUS_IFACE_CONFIG
|
|
Packit |
3ff832 |
|
|
Packit |
3ff832 |
class IConfig(dbus.service.Object):
|
|
Packit |
3ff832 |
# define method decorator.
|
|
Packit |
3ff832 |
method = lambda **args: \
|
|
Packit |
3ff832 |
dbus.service.method(dbus_interface=IBUS_IFACE_CONFIG, \
|
|
Packit |
3ff832 |
**args)
|
|
Packit |
3ff832 |
|
|
Packit |
3ff832 |
# define signal decorator.
|
|
Packit |
3ff832 |
signal = lambda **args: \
|
|
Packit |
3ff832 |
dbus.service.signal(dbus_interface=IBUS_IFACE_CONFIG, \
|
|
Packit |
3ff832 |
**args)
|
|
Packit |
3ff832 |
|
|
Packit |
3ff832 |
# define async method decorator.
|
|
Packit |
3ff832 |
async_method = lambda **args: \
|
|
Packit |
3ff832 |
dbus.service.method(dbus_interface=IBUS_IFACE_CONFIG, \
|
|
Packit |
3ff832 |
async_callbacks=("reply_cb", "error_cb"), \
|
|
Packit |
3ff832 |
**args)
|
|
Packit |
3ff832 |
|
|
Packit |
3ff832 |
@method(in_signature="ss", out_signature="v")
|
|
Packit |
3ff832 |
def GetValue(self, section, name): pass
|
|
Packit |
3ff832 |
|
|
Packit |
3ff832 |
@method(in_signature="s", out_signature="s{sv}")
|
|
Packit |
3ff832 |
def GetValues(self, section): pass
|
|
Packit |
3ff832 |
|
|
Packit |
3ff832 |
@method(in_signature="ssv")
|
|
Packit |
3ff832 |
def SetValue(self, section, name, value): pass
|
|
Packit |
3ff832 |
|
|
Packit |
3ff832 |
@method(in_signature="ss")
|
|
Packit |
3ff832 |
def UnsetValue(self, section, name): pass
|
|
Packit |
3ff832 |
|
|
Packit |
3ff832 |
@method()
|
|
Packit |
3ff832 |
def Destroy(self): pass
|
|
Packit |
3ff832 |
|
|
Packit |
3ff832 |
@signal(signature="ssv")
|
|
Packit |
3ff832 |
def ValueChanged(self, section, name, value): pass
|
|
Packit |
3ff832 |
|