comparison src/core/sat_main.py @ 1599:e2ed8009e66e

backend, bridge, frontends: actionNew has now a security_limit argument + added some docstring to explain data argument
author Goffi <goffi@goffi.org>
date Sat, 14 Nov 2015 19:21:56 +0100
parents b144babc2658
children 2b82d846848e
comparison
equal deleted inserted replaced
1598:b144babc2658 1599:e2ed8009e66e
783 else: 783 else:
784 cb = client._waiting_conf[conf_id][-1] 784 cb = client._waiting_conf[conf_id][-1]
785 del client._waiting_conf[conf_id] 785 del client._waiting_conf[conf_id]
786 cb(conf_id, accepted, data, profile) 786 cb(conf_id, accepted, data, profile)
787 787
788 def actionNew(self, action_data, profile): 788 def actionNew(self, action_data, security_limit=C.NO_SECURITY_LIMIT, profile=C.PROF_KEY_NONE):
789 """Shortcut to bridge.actionNew which generate and id 789 """Shortcut to bridge.actionNew which generate and id
790 790
791 @param action_data(dict): action data (see bridge documentation) 791 @param action_data(dict): action data (see bridge documentation)
792 @param security_limit: %(doc_security_limit)s
792 @param profile: %(doc_profile)s 793 @param profile: %(doc_profile)s
793 """ 794 """
794 id_ = unicode(uuid.uuid4()) 795 id_ = unicode(uuid.uuid4())
795 self.bridge.actionNew(action_data, id_, profile) 796 self.bridge.actionNew(action_data, id_, security_limit, profile)
796 797
797 def registerProgressCb(self, progress_id, callback, profile): 798 def registerProgressCb(self, progress_id, callback, profile):
798 """Register a callback called when progress is requested for id""" 799 """Register a callback called when progress is requested for id"""
799 client = self.getClient(profile) 800 client = self.getClient(profile)
800 if progress_id in client._progress_cb: 801 if progress_id in client._progress_cb: