Blame ibus/interface/inotifications.py

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__ = ("INotifications", )
Packit 3ff832
Packit 3ff832
import dbus.service
Packit 3ff832
from ibus.common import \
Packit 3ff832
    IBUS_IFACE_NOTIFICATIONS
Packit 3ff832
Packit 3ff832
class INotifications(dbus.service.Object):
Packit 3ff832
    # define method decorator.
Packit 3ff832
    method = lambda **args: \
Packit 3ff832
        dbus.service.method(dbus_interface = IBUS_IFACE_NOTIFICATIONS, \
Packit 3ff832
                            **args)
Packit 3ff832
Packit 3ff832
    # define signal decorator.
Packit 3ff832
    signal = lambda **args: \
Packit 3ff832
        dbus.service.signal(dbus_interface = IBUS_IFACE_NOTIFICATIONS, \
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_NOTIFICATIONS, \
Packit 3ff832
                            async_callbacks = ("reply_cb", "error_cb"), \
Packit 3ff832
                            **args)
Packit 3ff832
Packit 3ff832
    @method(in_signature="usssasi", out_signature="u")
Packit 3ff832
    def Notify(self, replaces_id, app_icon, summary, body, actions, expire_timeout): pass
Packit 3ff832
    
Packit 3ff832
    @method(in_signature="u")
Packit 3ff832
    def CloseNotification(self, id): pass
Packit 3ff832
Packit 3ff832
    #signals
Packit 3ff832
    @signal(signature="uu")
Packit 3ff832
    def NotificationClosed(self, id, reason): pass
Packit 3ff832
    
Packit 3ff832
    @signal(signature="us")
Packit 3ff832
    def ActionInvoked(self, id, action_key): pass