core, bridge, frontends: removed deprecated bridge method askConfirmation, confirmationAnswer, actionResult, actionResultExt and getWaitingConf

This commit is contained in:
Goffi 2016-08-28 19:23:58 +02:00
commit 55357178ef
3 changed files with 6 additions and 309 deletions

View file

@ -130,21 +130,6 @@ class DbusObject(dbus.service.Object):
def actionNew(self, action_data, id, security_limit, profile):
pass
@dbus.service.signal(const_INT_PREFIX+const_CORE_SUFFIX,
signature='ssa{ss}s')
def actionResult(self, answer_type, id, data, profile):
pass
@dbus.service.signal(const_INT_PREFIX+const_CORE_SUFFIX,
signature='ssa{sa{ss}}s')
def actionResultExt(self, answer_type, id, data, profile):
pass
@dbus.service.signal(const_INT_PREFIX+const_CORE_SUFFIX,
signature='ssa{ss}s')
def askConfirmation(self, id, conf_type, data, profile):
pass
@dbus.service.signal(const_INT_PREFIX+const_CORE_SUFFIX,
signature='ss')
def connected(self, profile, jid_s):
@ -170,11 +155,6 @@ class DbusObject(dbus.service.Object):
def messageNew(self, uid, timestamp, from_jid, to_jid, message, subject, mess_type, extra, profile):
pass
@dbus.service.signal(const_INT_PREFIX+const_CORE_SUFFIX,
signature='ssss')
def newAlert(self, message, title, alert_type, profile):
pass
@dbus.service.signal(const_INT_PREFIX+const_CORE_SUFFIX,
signature='sa{ss}ass')
def newContact(self, contact_jid, attributes, groups, profile):
@ -254,12 +234,6 @@ class DbusObject(dbus.service.Object):
def asyncGetParamsValuesFromCategory(self, category, security_limit=-1, profile_key="@DEFAULT@", callback=None, errback=None):
return self._callback("asyncGetParamsValuesFromCategory", unicode(category), security_limit, unicode(profile_key), callback=callback, errback=errback)
@dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
in_signature='sba{ss}s', out_signature='',
async_callbacks=None)
def confirmationAnswer(self, id, accepted, data, profile):
return self._callback("confirmationAnswer", unicode(id), accepted, data, unicode(profile))
@dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
in_signature='ss', out_signature='',
async_callbacks=('callback', 'errback'))
@ -386,12 +360,6 @@ class DbusObject(dbus.service.Object):
def getVersion(self, ):
return self._callback("getVersion", )
@dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
in_signature='s', out_signature='a(ssa{ss})',
async_callbacks=None)
def getWaitingConf(self, profile_key):
return self._callback("getWaitingConf", unicode(profile_key))
@dbus.service.method(const_INT_PREFIX+const_CORE_SUFFIX,
in_signature='s', out_signature='a{ss}',
async_callbacks=None)
@ -605,15 +573,6 @@ class DBusBridge(Bridge):
def actionNew(self, action_data, id, security_limit, profile):
self.dbus_bridge.actionNew(action_data, id, security_limit, profile)
def actionResult(self, answer_type, id, data, profile):
self.dbus_bridge.actionResult(answer_type, id, data, profile)
def actionResultExt(self, answer_type, id, data, profile):
self.dbus_bridge.actionResultExt(answer_type, id, data, profile)
def askConfirmation(self, id, conf_type, data, profile):
self.dbus_bridge.askConfirmation(id, conf_type, data, profile)
def connected(self, profile, jid_s):
self.dbus_bridge.connected(profile, jid_s)
@ -629,9 +588,6 @@ class DBusBridge(Bridge):
def messageNew(self, uid, timestamp, from_jid, to_jid, message, subject, mess_type, extra, profile):
self.dbus_bridge.messageNew(uid, timestamp, from_jid, to_jid, message, subject, mess_type, extra, profile)
def newAlert(self, message, title, alert_type, profile):
self.dbus_bridge.newAlert(message, title, alert_type, profile)
def newContact(self, contact_jid, attributes, groups, profile):
self.dbus_bridge.newContact(contact_jid, attributes, groups, profile)

View file

@ -167,11 +167,13 @@ class Constructor(object):
def getArguments(self, signature, name=None, default=None, unicode_protect=False):
"""Return arguments to user given a signature
@param signature: signature in the short form (using s,a,i,b etc)
@param name: dictionary of arguments name like given by getArguments
@param default: dictionary of default values, like given by getDefault
@param unicode_protect: activate unicode protection on strings (return strings as unicode(str))
@return: list of arguments that correspond to a signature (e.g.: "sss" return "arg1, arg2, arg3")"""
@return: list of arguments that correspond to a signature (e.g.: "sss" return "arg1, arg2, arg3")
"""
idx = 0
attr_string = []
@ -276,7 +278,6 @@ class MediawikiConstructor(Constructor):
for section in sections:
function = self.getValues(section)
print ("Adding %s %s" % (section, function["type"]))
default = self.getDefault(section)
async_msg = """<br />'''This method is asynchronous'''"""
deprecated_msg = """<br />'''<font color="#FF0000">/!\ WARNING /!\ : This method is deprecated, please don't use it !</font>'''"""
signature_signal = \
@ -516,7 +517,7 @@ class DbusXmlConstructor(Constructor):
'a{i(ss)}': 'HistoryT',
'a(sss)': 'QList<MenuT>',
'a{sa{s(sia{ss})}}': 'PresenceStatusT',
'a{sa{ss}}': 'ActionResultExtDataT'}
}
def generateCoreSide(self):
try:
@ -536,7 +537,6 @@ class DbusXmlConstructor(Constructor):
print ("Adding %s %s" % (section, function["type"]))
new_elt = doc.createElement('method' if function["type"] == 'method' else 'signal')
new_elt.setAttribute('name', section)
args_in_str = self.getArguments(function['sig_in'])
idx = 0
args_doc = self.getArgumentsDoc(section)

View file

@ -54,19 +54,6 @@ doc_param_7=extra: extra message information, can have data added by plugins and
- info_type: subtype for info messages
doc_param_8=%(doc_profile)s
[newAlert]
deprecated=
type=signal
category=core
sig_in=ssss
doc=A new alert happened
doc_param_0=message: Body of the alert
doc_param_1=title: Title of the alert
doc_param_2=alert_type: Type of the alert, can be:
- INFO: Informative message
- ERROR: something went wrong
doc_param_3=%(doc_profile)s
[presenceUpdate]
type=signal
category=core
@ -105,19 +92,6 @@ doc=A contact has been supressed from roster
doc_param_0=entity_jid: JID of the contact removed from roster
doc_param_1=%(doc_profile)s
[askConfirmation]
deprecated=
type=signal
category=core
sig_in=ssa{ss}s
doc=A confirmation is needed for an action
doc_param_0=id: Id of the confirmation query
doc_param_1=conf_type: Type of the confirmation, can be:
- YES/NO: A question which need a yes or no answer
- FILE_TRANSFER: A confirmation is needed before transfering a file
doc_param_2=data: conf_type dependent data
doc_param_3=%(doc_profile)s
[actionNew]
type=signal
category=core
@ -138,33 +112,6 @@ doc_param_1=id: action id
doc_param_2=%(doc_security_limit)s
doc_param_3=%(doc_profile)s
[actionResult]
deprecated=
type=signal
category=core
sig_in=ssa{ss}s
doc=Requested result of an action
doc_param_0=answer_type: Type of the answer, can be:
- SUPPRESS: The action is managed, the id MUST be removed from queue
- XMLUI: A SàT XMLUI interface is sent
- ERROR: Something went wrong when doing the action
- RESULT: General result, interpretation depend of the action
doc_param_1=id: Id of the action
doc_param_2=data: answer_type specific data
doc_param_3=%(doc_profile)s
[actionResultExt]
deprecated=
type=signal
category=core
sig_in=ssa{sa{ss}}s
doc=Requested result of an action (Extended)
doc_param_0=answer_type: Same as for [actionResult] but with the following additional one:
- DICT_DICT: As RESULT, but returned as a dictionary of dictionary
doc_param_1=id: Id of the action
doc_param_2=data: answer_type specific data
doc_param_3=%(doc_profile)s
[entityDataUpdated]
type=signal
category=core
@ -432,16 +379,6 @@ doc=Get subscription requests in queue
doc_param_0=%(doc_profile_key)s
doc_return=Dict where contact JID is the key, and value is the subscription type
[getWaitingConf]
type=method
category=core
sig_in=s
sig_out=a(ssa{ss})
doc=Get confirmations requests in queue
doc_param_0=%(doc_profile_key)s
doc_return=List of confirmation request data, same as for [askConfirmation]
[messageSend]
async=
type=method
@ -667,18 +604,6 @@ doc=Get all not yet answered actions
doc_param_0=%(doc_profile_key)s
doc_return=list of data as for [actionNew] (without the profile)
[confirmationAnswer]
deprecated=
type=method
category=core
sig_in=sba{ss}s
sig_out=
doc=Give answer to a confirmation request
doc_param_0=id: id of the confirmation request
doc_param_1=accepted: True if the action is confirmed
doc_param_2=data: action specific data
doc_param_3=%(doc_profile)s
[progressGet]
type=method
category=core