comparison sat_bridge/DBus.py @ 37:a61beb21d16d

Gateway registration, unregistration & edition - default values added in form - DBus bridge: fixed array of struct management when adding dynamically a method - fixed doc for some methods - ugly fix for presence status - added dependency for XEP-0077 in XEP-0100 plugin - Wix: added unregister button in gateways manager - Wix: added privacy warning in gateways manager
author Goffi <goffi@goffi.org>
date Tue, 15 Dec 2009 01:27:32 +1100
parents 6491b7956c80
children 9c79eb49d51f
comparison
equal deleted inserted replaced
36:6491b7956c80 37:a61beb21d16d
184 in_signature='sba{ss}', out_signature='') 184 in_signature='sba{ss}', out_signature='')
185 def confirmationAnswer(self, id, accepted, data): 185 def confirmationAnswer(self, id, accepted, data):
186 debug("Answer for confirmation [%s]: %s", id, "Accepted" if accepted else "Refused") 186 debug("Answer for confirmation [%s]: %s", id, "Accepted" if accepted else "Refused")
187 return self.cb["confirmationAnswer"](id, accepted, data) 187 return self.cb["confirmationAnswer"](id, accepted, data)
188 188
189 @dbus.service.method(const_INT_PREFIX+const_REQ_SUFFIX,
190 in_signature='sa(ss)', out_signature='s')
191 def submitForm(self, target, fields):
192 info ("Form submited")
193 return self.cb["submitForm"](target, fields)
194 189
195 @dbus.service.method(const_INT_PREFIX+const_REQ_SUFFIX, 190 @dbus.service.method(const_INT_PREFIX+const_REQ_SUFFIX,
196 in_signature='s', out_signature='a{ss}') 191 in_signature='s', out_signature='a{ss}')
197 def getProgress(self, id): 192 def getProgress(self, id):
198 #debug("Progress asked for %s", id) 193 #debug("Progress asked for %s", id)
212 if in_sign[i] == 'a': 207 if in_sign[i] == 'a':
213 while (True): 208 while (True):
214 i+=1 209 i+=1
215 if i>=len(in_sign): 210 if i>=len(in_sign):
216 raise Exception #FIXME: create an exception here (the '}' is not presend) 211 raise Exception #FIXME: create an exception here (the '}' is not presend)
217 if in_sign[i] == '}': 212 if in_sign[i] == '}' or in_sign[i] == ')':
218 break 213 break
219 i+=1 214 i+=1
220 return attr_string 215 return attr_string
221 216
222 217