changeset 1352:56c14cb29e0f frontends_multi_profiles

quick_frontend: register the 'personalEvent' signal
author souliane <souliane@mailoo.org>
date Fri, 06 Mar 2015 14:22:49 +0100
parents ec43552f5f8b
children 361b0fe72961
files frontends/src/quick_frontend/quick_app.py
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/frontends/src/quick_frontend/quick_app.py	Thu Mar 05 13:48:49 2015 +0100
+++ b/frontends/src/quick_frontend/quick_app.py	Fri Mar 06 14:22:49 2015 +0100
@@ -269,6 +269,7 @@
         self.registerSignal("quizGameTimerExpired", iface="plugin")
         self.registerSignal("quizGameTimerRestarted", iface="plugin")
         self.registerSignal("chatStateReceived", iface="plugin")
+        self.registerSignal("personalEvent", iface="plugin")
 
         self.current_action_ids = set() # FIXME: to be removed
         self.current_action_ids_cb = {} # FIXME: to be removed
@@ -688,6 +689,16 @@
             if from_jid == C.ENTITY_ALL or from_jid.bare == widget.target.bare:
                 widget.updateChatState(from_jid, state)
 
+    def personalEventHandler(self, sender, event_type, data):
+        """Called when a PEP event is received.
+
+        @param sender (jid.JID): event sender
+        @param event_type (unicode): event type, e.g. 'MICROBLOG' or 'MICROBLOG_DELETE'
+        @param data (dict): event data
+        """
+        # FIXME move some code from Libervia to here and put the magic strings to constants
+        pass
+
     def _subscribe_cb(self, answer, data):
         entity, profile = data
         type_ = "subscribed" if answer else "unsubscribed"