comparison sat_bridge/DBus.py @ 135:7452ac3818e7

Core, wix: added profile management for RegisterNewAccount method, and LaunchAction
author Goffi <goffi@goffi.org>
date Fri, 16 Jul 2010 20:16:13 +0800
parents 2240f34f6452
children 556c2bd7c344
comparison
equal deleted inserted replaced
134:7201851d9aed 135:7452ac3818e7
124 124
125 @dbus.service.method(const_INT_PREFIX+const_REQ_SUFFIX, 125 @dbus.service.method(const_INT_PREFIX+const_REQ_SUFFIX,
126 in_signature='s', out_signature='i') 126 in_signature='s', out_signature='i')
127 def createProfile(self, name): 127 def createProfile(self, name):
128 info ('Profile creation asked') 128 info ('Profile creation asked')
129 return self.cb["createProfile"](str(name)) 129 return self.cb["createProfile"](unicode(name))
130 130
131 @dbus.service.method(const_INT_PREFIX+const_REQ_SUFFIX, 131 @dbus.service.method(const_INT_PREFIX+const_REQ_SUFFIX,
132 in_signature='s', out_signature='i') 132 in_signature='s', out_signature='i')
133 def deleteProfile(self, name): 133 def deleteProfile(self, name):
134 info ('Profile deletion asked') 134 info ('Profile deletion asked')
241 def delContact(self, entity, profile_key='@DEFAULT@'): 241 def delContact(self, entity, profile_key='@DEFAULT@'):
242 debug("Unsubscription asked for %s (profile %s)", entity, profile_key) 242 debug("Unsubscription asked for %s (profile %s)", entity, profile_key)
243 return self.cb["delContact"](entity, profile_key) 243 return self.cb["delContact"](entity, profile_key)
244 244
245 @dbus.service.method(const_INT_PREFIX+const_REQ_SUFFIX, 245 @dbus.service.method(const_INT_PREFIX+const_REQ_SUFFIX,
246 in_signature='sa{ss}', out_signature='s') 246 in_signature='sa{ss}s', out_signature='s')
247 def launchAction(self, type, data): 247 def launchAction(self, type, data, profile_key='@DEFAULT@'):
248 return self.cb["launchAction"](type, data) 248 return self.cb["launchAction"](type, data, profile_key)
249 249
250 @dbus.service.method(const_INT_PREFIX+const_REQ_SUFFIX, 250 @dbus.service.method(const_INT_PREFIX+const_REQ_SUFFIX,
251 in_signature='sba{ss}', out_signature='') 251 in_signature='sba{ss}', out_signature='')
252 def confirmationAnswer(self, id, accepted, data): 252 def confirmationAnswer(self, id, accepted, data):
253 debug("Answer for confirmation [%s]: %s", id, "Accepted" if accepted else "Refused") 253 debug("Answer for confirmation [%s]: %s", id, "Accepted" if accepted else "Refused")