Ignore:
Timestamp:
Jul 7, 2008, 4:39:05 PM (13 years ago)
Author:
Ralph Meijer <ralphm@…>
Branch:
default
Convert:
svn:b33ecbfc-034c-dc11-8662-000475d9059e/trunk@57
Message:

Implement SHIM support.

Author: ralphm.
Fixes #14.

This changes the signature of PubSubClient's itemsReceived and friends, to
have an object to represent the event, for easier addition of new information
from the event's message stanza, like these SHIM headers.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wokkel/iwokkel.py

    r25 r27  
    138138class IPubSubClient(Interface):
    139139
    140     def itemsReceived(recipient, service, nodeIdentifier, items):
     140    def itemsReceived(event):
    141141        """
    142142        Called when an items notification has been received for a node.
     
    146146        accompanied with an item identifier in the C{id} attribute.
    147147
    148         @param recipient: The entity to which the notification was sent.
    149         @type recipient: L{jid.JID}
    150         @param service: The entity from which the notification was received.
    151         @type service: L{jid.JID}
    152         @param nodeIdentifier: Identifier of the node the items belong to.
    153         @type nodeIdentifier: C{unicode}
    154         @param items: List of received items as domish elements.
    155         @type items: C{list} of L{domish.Element}
    156         """
    157 
    158     def deleteReceived(recipient, service, nodeIdentifier):
     148        @param event: The items event.
     149        @type event: L{ItemsEvent<wokkel.pubsub.ItemsEvent>}
     150        """
     151
     152
     153    def deleteReceived(event):
    159154        """
    160155        Called when a deletion notification has been received for a node.
    161156
    162         @param recipient: The entity to which the notification was sent.
    163         @type recipient: L{jid.JID}
    164         @param service: The entity from which the notification was received.
    165         @type service: L{jid.JID}
    166         @param nodeIdentifier: Identifier of the node that has been deleted.
    167         @type nodeIdentifier: C{unicode}
    168         """
    169 
    170     def purgeReceived(recipient, service, nodeIdentifier):
     157        @param event: The items event.
     158        @type event: L{ItemsEvent<wokkel.pubsub.DeleteEvent>}
     159        """
     160
     161
     162    def purgeReceived(event):
    171163        """
    172164        Called when a purge notification has been received for a node.
     
    175167        considered retracted.
    176168
    177         @param recipient: The entity to which the notification was sent.
    178         @type recipient: L{jid.JID}
    179         @param service: The entity from which the notification was received.
    180         @type service: L{jid.JID}
    181         @param nodeIdentifier: Identifier of the node that has been purged.
    182         @type nodeIdentifier: C{unicode}
     169        @param event: The items event.
     170        @type event: L{ItemsEvent<wokkel.pubsub.PurgeEvent>}
    183171        """
    184172
Note: See TracChangeset for help on using the changeset viewer.