comparison frontends/src/bridge/DBus.py @ 777:5642939d254e

core, bridge: new method paramsRegisterApp to register frontend's specific parameters
author souliane <souliane@mailoo.org>
date Fri, 27 Dec 2013 13:28:26 +0100
parents eac23b1aad90
children 1fe00f0c9a91
comparison
equal deleted inserted replaced
776:f89173f44850 777:5642939d254e
150 return self.db_core_iface.getMenus(language, security_limit) 150 return self.db_core_iface.getMenus(language, security_limit)
151 151
152 def getParamA(self, name, category, attribute="value", profile_key="@DEFAULT@"): 152 def getParamA(self, name, category, attribute="value", profile_key="@DEFAULT@"):
153 return unicode(self.db_core_iface.getParamA(name, category, attribute, profile_key)) 153 return unicode(self.db_core_iface.getParamA(name, category, attribute, profile_key))
154 154
155 def getParams(self, security_limit=-1, profile_key="@DEFAULT@", callback=None, errback=None): 155 def getParams(self, security_limit=-1, app='', profile_key="@DEFAULT@", callback=None, errback=None):
156 return unicode(self.db_core_iface.getParams(security_limit, profile_key, reply_handler=callback, error_handler=lambda err:errback(err._dbus_error_name[len(const_ERROR_PREFIX)+1:]))) 156 return unicode(self.db_core_iface.getParams(security_limit, app, profile_key, reply_handler=callback, error_handler=lambda err:errback(err._dbus_error_name[len(const_ERROR_PREFIX)+1:])))
157 157
158 def getParamsCategories(self, ): 158 def getParamsCategories(self, ):
159 return self.db_core_iface.getParamsCategories() 159 return self.db_core_iface.getParamsCategories()
160 160
161 def getParamsForCategory(self, category, security_limit=-1, profile_key="@DEFAULT@", callback=None, errback=None): 161 def getParamsForCategory(self, category, security_limit=-1, app='', profile_key="@DEFAULT@", callback=None, errback=None):
162 return unicode(self.db_core_iface.getParamsForCategory(category, security_limit, profile_key, reply_handler=callback, error_handler=lambda err:errback(err._dbus_error_name[len(const_ERROR_PREFIX)+1:]))) 162 return unicode(self.db_core_iface.getParamsForCategory(category, security_limit, app, profile_key, reply_handler=callback, error_handler=lambda err:errback(err._dbus_error_name[len(const_ERROR_PREFIX)+1:])))
163 163
164 def getParamsUI(self, security_limit=-1, profile_key="@DEFAULT@", callback=None, errback=None): 164 def getParamsUI(self, security_limit=-1, app='', profile_key="@DEFAULT@", callback=None, errback=None):
165 return unicode(self.db_core_iface.getParamsUI(security_limit, profile_key, reply_handler=callback, error_handler=lambda err:errback(err._dbus_error_name[len(const_ERROR_PREFIX)+1:]))) 165 return unicode(self.db_core_iface.getParamsUI(security_limit, app, profile_key, reply_handler=callback, error_handler=lambda err:errback(err._dbus_error_name[len(const_ERROR_PREFIX)+1:])))
166 166
167 def getPresenceStatus(self, profile_key="@DEFAULT@"): 167 def getPresenceStatus(self, profile_key="@DEFAULT@"):
168 return self.db_core_iface.getPresenceStatus(profile_key) 168 return self.db_core_iface.getPresenceStatus(profile_key)
169 169
170 def getProfileName(self, profile_key="@DEFAULT@"): 170 def getProfileName(self, profile_key="@DEFAULT@"):
189 return self.db_core_iface.isConnected(profile_key) 189 return self.db_core_iface.isConnected(profile_key)
190 190
191 def launchAction(self, callback_id, data, profile_key="@DEFAULT@", callback=None, errback=None): 191 def launchAction(self, callback_id, data, profile_key="@DEFAULT@", callback=None, errback=None):
192 return self.db_core_iface.launchAction(callback_id, data, profile_key, reply_handler=callback, error_handler=lambda err:errback(err._dbus_error_name[len(const_ERROR_PREFIX)+1:])) 192 return self.db_core_iface.launchAction(callback_id, data, profile_key, reply_handler=callback, error_handler=lambda err:errback(err._dbus_error_name[len(const_ERROR_PREFIX)+1:]))
193 193
194 def paramsRegisterApp(self, xml, security_limit=-1, app=''):
195 return self.db_core_iface.paramsRegisterApp(xml, security_limit, app)
196
194 def registerNewAccount(self, login, password, email, host, port=5222): 197 def registerNewAccount(self, login, password, email, host, port=5222):
195 return unicode(self.db_core_iface.registerNewAccount(login, password, email, host, port)) 198 return unicode(self.db_core_iface.registerNewAccount(login, password, email, host, port))
196 199
197 def sendMessage(self, to_jid, message, subject='', mess_type="auto", extra={}, profile_key="@NONE@", callback=None, errback=None): 200 def sendMessage(self, to_jid, message, subject='', mess_type="auto", extra={}, profile_key="@NONE@", callback=None, errback=None):
198 return self.db_core_iface.sendMessage(to_jid, message, subject, mess_type, extra, profile_key, reply_handler=callback, error_handler=lambda err:errback(err._dbus_error_name[len(const_ERROR_PREFIX)+1:])) 201 return self.db_core_iface.sendMessage(to_jid, message, subject, mess_type, extra, profile_key, reply_handler=callback, error_handler=lambda err:errback(err._dbus_error_name[len(const_ERROR_PREFIX)+1:]))