comparison src/plugins/plugin_xep_0050.py @ 916:1a759096ccbd

core: use of Const for profile_key + replaced '@DEFAULT@' default profile_key by '@NONE@'
author Goffi <goffi@goffi.org>
date Fri, 21 Mar 2014 16:27:09 +0100
parents 38bc9abd6722
children c6d8fc63b1db
comparison
equal deleted inserted replaced
915:6f96ee4d8cc0 916:1a759096ccbd
16 16
17 # You should have received a copy of the GNU Affero General Public License 17 # You should have received a copy of the GNU Affero General Public License
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. 18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
19 19
20 from sat.core.i18n import _, D_ 20 from sat.core.i18n import _, D_
21 from sat.core.constants import Const as C
21 from logging import debug, info, warning, error 22 from logging import debug, info, warning, error
22 from twisted.words.protocols.jabber import jid 23 from twisted.words.protocols.jabber import jid
23 from twisted.words.protocols.jabber import error as xmpp_error 24 from twisted.words.protocols.jabber import error as xmpp_error
24 from twisted.words.xish import domish 25 from twisted.words.xish import domish
25 from twisted.internet import defer, reactor 26 from twisted.internet import defer, reactor
394 d = client.disco.requestItems(to_jid, NS_COMMANDS) 395 d = client.disco.requestItems(to_jid, NS_COMMANDS)
395 d.addCallback(self._items2XMLUI) 396 d.addCallback(self._items2XMLUI)
396 return d 397 return d
397 398
398 def addAdHocCommand(self, callback, label, node="", features = None, timeout = 600, allowed_jids = None, allowed_groups = None, 399 def addAdHocCommand(self, callback, label, node="", features = None, timeout = 600, allowed_jids = None, allowed_groups = None,
399 allowed_magics = None, forbidden_jids = None, forbidden_groups = None, profile_key="@NONE@"): 400 allowed_magics = None, forbidden_jids = None, forbidden_groups = None, profile_key=C.PROF_KEY_NONE):
400 """ 401 """
401 402
402 Add an ad-hoc command for the current profile 403 Add an ad-hoc command for the current profile
403 404
404 @param callback: method associated with this ad-hoc command which return the payload data (see AdHocCommand._sendAnswer), can return a deferred 405 @param callback: method associated with this ad-hoc command which return the payload data (see AdHocCommand._sendAnswer), can return a deferred