diff MoinMoin/events/__init__.py @ 2091:7af58454aafa

Send an event when user changes her jabber id, force jid to be unique.
author Karol 'grzywacz' Nowak <grzywacz@sul.uni.lodz.pl>
date Sun, 03 Jun 2007 21:56:02 +0200
parents c8bc6df45964
children 9ee68c8b409b
line wrap: on
line diff
--- a/MoinMoin/events/__init__.py	Sun Jun 03 20:30:08 2007 +0200
+++ b/MoinMoin/events/__init__.py	Sun Jun 03 21:56:02 2007 +0200
@@ -21,20 +21,19 @@
 modules = pysupport.getPackageModules(__file__)
 
 
-class Observable:
+class Event:
     """A class handling information common to all events."""
-    
     def __init__(self, request):
         self.request = request
 
         
-class PageEvent(Observable):
+class PageEvent(Event):
     """An event related to a page change"""
 
         
 class PageChangedEvent(PageEvent):
     def __init__(self, request, page, comment, trivial):
-        Observable.__init__(self, request)
+        Event.__init__(self, request)
         self.page = page
         self.comment = comment
         self.trivial = trivial
@@ -50,7 +49,7 @@
 
 class PageRevertedEvent(PageEvent):
     def __init__(self, request, pagename, previous, current):
-        Observable.__init__(self, request)
+        Event.__init__(self, request)
         self.pagename = pagename
         self.previous = previous
         self.current = current    
@@ -58,11 +57,18 @@
 
 class SubscribedToPageEvent(PageEvent):
     def __init__(self, request, pagename, username):
-        Observable.__init__(self, request)    
+        Event.__init__(self, request)    
         self.pagename = pagename
         self.username = username
 
 
+class JabberIDSetEvent(Event):
+    """ Sent when user changes her Jabber ID """
+    def __init__(self, request, jid):
+        Event.__init__(self, request)
+        self.jid = jid
+        
+
 def register_handlers(cfg):
     """Create a list of available event handlers.