core, frontends: callMenu is now async and don't use callback_id anymore

This commit is contained in:
Goffi 2013-12-24 15:18:31 +01:00
commit 71c1def32a
2 changed files with 93 additions and 56 deletions

View file

@ -191,6 +191,12 @@ class DbusObject(dbus.service.Object):
def addContact(self, entity_jid, profile_key="@DEFAULT@"):
return self._callback("addContact", unicode(entity_jid), unicode(profile_key))
@dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
in_signature='ssss', out_signature='s',
async_callbacks=('callback', 'errback'))
def asyncCallMenu(self, category, name, menu_type, profile_key, callback=None, errback=None):
return self._callback("asyncCallMenu", unicode(category), unicode(name), unicode(menu_type), unicode(profile_key), callback=callback, errback=errback)
@dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
in_signature='s', out_signature='',
async_callbacks=('callback', 'errback'))
@ -209,12 +215,6 @@ class DbusObject(dbus.service.Object):
def asyncGetParamA(self, name, category, attribute="value", security_limit=-1, profile_key="@DEFAULT@", callback=None, errback=None):
return self._callback("asyncGetParamA", unicode(name), unicode(category), unicode(attribute), security_limit, unicode(profile_key), callback=callback, errback=errback)
@dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
in_signature='ssss', out_signature='s',
async_callbacks=None)
def callMenu(self, category, name, menu_type, profile_key):
return self._callback("callMenu", unicode(category), unicode(name), unicode(menu_type), unicode(profile_key))
@dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
in_signature='sba{ss}s', out_signature='',
async_callbacks=None)

View file

@ -574,10 +574,10 @@ sig_in=
sig_out=a(sss)
doc=Get all additional menus
doc_return=list of tuple with the following value:
- category: Category of the menu
- name: Name of the menu
- menu_type: Type which can be:
* NORMAL: Classical application menu
- category: Category of the menu
- name: Name of the menu
[getMenuHelp]
type=method
@ -591,7 +591,8 @@ doc_param_1=name: Name of the menu
doc_param_2=menu_type: Type of the menu as in [getMenus] return value
doc_return=Help string
[callMenu]
[asyncCallMenu]
async=
type=method
category=core
sig_in=ssss
@ -601,4 +602,4 @@ doc_param_0=category: as in [getMenuHelp]
doc_param_1=name: as in [getMenuHelp]
doc_param_2=menu_type: as in [getMenuHelp]
doc_param_3=%(doc_profile_key)s
doc_return=return an actionId or the empty string if something went wrong
doc_return=return a XMLUI or empty string if it is a one shot action