comparison frontends/src/bridge/DBus.py @ 893:308a96bc7c1b

core, frontends: add method asyncDeleteProfile, remove synchronous methods createProfile and deleteProfile
author souliane <souliane@mailoo.org>
date Mon, 03 Mar 2014 09:59:10 +0100
parents 1fe00f0c9a91
children a9401694d2dc
comparison
equal deleted inserted replaced
892:58107179cd97 893:308a96bc7c1b
102 return self.db_core_iface.asyncConnect(profile_key, reply_handler=callback, error_handler=lambda err:errback(err._dbus_error_name[len(const_ERROR_PREFIX)+1:])) 102 return self.db_core_iface.asyncConnect(profile_key, reply_handler=callback, error_handler=lambda err:errback(err._dbus_error_name[len(const_ERROR_PREFIX)+1:]))
103 103
104 def asyncCreateProfile(self, profile, callback=None, errback=None): 104 def asyncCreateProfile(self, profile, callback=None, errback=None):
105 return self.db_core_iface.asyncCreateProfile(profile, reply_handler=callback, error_handler=lambda err:errback(err._dbus_error_name[len(const_ERROR_PREFIX)+1:])) 105 return self.db_core_iface.asyncCreateProfile(profile, reply_handler=callback, error_handler=lambda err:errback(err._dbus_error_name[len(const_ERROR_PREFIX)+1:]))
106 106
107 def asyncDeleteProfile(self, profile, callback=None, errback=None):
108 return self.db_core_iface.asyncDeleteProfile(profile, reply_handler=callback, error_handler=lambda err:errback(err._dbus_error_name[len(const_ERROR_PREFIX)+1:]))
109
107 def asyncGetParamA(self, name, category, attribute="value", security_limit=-1, profile_key="@DEFAULT@", callback=None, errback=None): 110 def asyncGetParamA(self, name, category, attribute="value", security_limit=-1, profile_key="@DEFAULT@", callback=None, errback=None):
108 return unicode(self.db_core_iface.asyncGetParamA(name, category, attribute, security_limit, profile_key, reply_handler=callback, error_handler=lambda err:errback(err._dbus_error_name[len(const_ERROR_PREFIX)+1:]))) 111 return unicode(self.db_core_iface.asyncGetParamA(name, category, attribute, security_limit, profile_key, reply_handler=callback, error_handler=lambda err:errback(err._dbus_error_name[len(const_ERROR_PREFIX)+1:])))
109 112
110 def confirmationAnswer(self, id, accepted, data, profile): 113 def confirmationAnswer(self, id, accepted, data, profile):
111 return self.db_core_iface.confirmationAnswer(id, accepted, data, profile) 114 return self.db_core_iface.confirmationAnswer(id, accepted, data, profile)
112 115
113 def connect(self, profile_key="@DEFAULT@"): 116 def connect(self, profile_key="@DEFAULT@"):
114 return self.db_core_iface.connect(profile_key) 117 return self.db_core_iface.connect(profile_key)
115 118
116 def createProfile(self, profile):
117 return self.db_core_iface.createProfile(profile)
118
119 def delContact(self, entity_jid, profile_key="@DEFAULT@"): 119 def delContact(self, entity_jid, profile_key="@DEFAULT@"):
120 return self.db_core_iface.delContact(entity_jid, profile_key) 120 return self.db_core_iface.delContact(entity_jid, profile_key)
121 121
122 def deleteProfile(self, profile):
123 return self.db_core_iface.deleteProfile(profile)
124
125 def disconnect(self, profile_key="@DEFAULT@"): 122 def disconnect(self, profile_key="@DEFAULT@"):
126 return self.db_core_iface.disconnect(profile_key) 123 return self.db_core_iface.disconnect(profile_key)
127 124
128 def getConfig(self, section, name): 125 def getConfig(self, section, name):
129 return unicode(self.db_core_iface.getConfig(section, name)) 126 return unicode(self.db_core_iface.getConfig(section, name))