comparison libervia.py @ 14:9bf8ed012adc

- Group microblog management, first draft - Bad connexion issue fixed
author Goffi <goffi@goffi.org>
date Thu, 07 Apr 2011 22:27:36 +0200
parents 0110d4e1d816
children 099c05a0dcab
comparison
equal deleted inserted replaced
13:0110d4e1d816 14:9bf8ed012adc
74 self.cb={} 74 self.cb={}
75 75
76 class BridgeCall(LiberviaJsonProxy): 76 class BridgeCall(LiberviaJsonProxy):
77 def __init__(self): 77 def __init__(self):
78 LiberviaJsonProxy.__init__(self, "/json_api", 78 LiberviaJsonProxy.__init__(self, "/json_api",
79 ["getContacts", "sendMblog"]) 79 ["getContacts", "sendMblog", "getMblogNodes"])
80 80
81 class BridgeSignals(LiberviaJsonProxy): 81 class BridgeSignals(LiberviaJsonProxy):
82 def __init__(self): 82 def __init__(self):
83 LiberviaJsonProxy.__init__(self, "/json_signal_api", 83 LiberviaJsonProxy.__init__(self, "/json_signal_api",
84 ["getSignals"]) 84 ["getSignals"])
327 327
328 #it's time to fill the page 328 #it's time to fill the page
329 self.bridge.call('getContacts', self._getContactsCB) 329 self.bridge.call('getContacts', self._getContactsCB)
330 self.bridge_signals.call('getSignals', self._getSignalsCB) 330 self.bridge_signals.call('getSignals', self._getSignalsCB)
331 331
332
333 def _getContactsCB(self, contacts_data): 332 def _getContactsCB(self, contacts_data):
334 for contact in contacts_data: 333 for contact in contacts_data:
335 jid, attributes, groups = contact 334 jid, attributes, groups = contact
336 self.contactPanel.addContact(jid, attributes, groups) 335 self.contactPanel.addContact(jid, attributes, groups)
337 336