Changeset 2:47f1cb624f14 for wokkel/iwokkel.py
- Timestamp:
- Aug 22, 2007, 3:43:43 PM (15 years ago)
- Branch:
- default
- Convert:
- svn:b33ecbfc-034c-dc11-8662-000475d9059e/trunk@3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
wokkel/iwokkel.py
r1 r2 89 89 @type nodeIdentifier: C{unicode} 90 90 """ 91 92 93 class IPubSubClient(Interface): 94 95 def itemsReceived(notifier, node, items): 96 """ 97 Called when items have been received from a node. 98 99 @param notifier: the entity from which the notification was received. 100 @type notifier: L{jid.JID} 101 @param node: identifier of the node the items belong to. 102 @type node: C{unicode} 103 @param items: list of received items as domish elements. 104 @type items: C{list} of L{domish.Element} 105 """ 106 107 def createNode(node=None): 108 """ 109 Create a new publish subscribe node. 110 111 @param node: optional suggestion for the new node's identifier. If 112 omitted, the creation of an instant node will be 113 attempted. 114 @type node: L{unicode} 115 @return: a deferred that fires with the identifier of the newly created 116 node. Note that this can differ from the suggested identifier 117 if the publish subscribe service chooses to modify or ignore 118 the suggested identifier. 119 @rtype: L{defer.Deferred} 120 """ 121 122 def deleteNode(node): 123 """ 124 Delete a node. 125 126 @param node: identifier of the node to be deleted. 127 @type node: L{unicode} 128 @rtype: L{defer.Deferred} 129 """ 130 131 def subscribe(node, subscriber): 132 """ 133 Subscribe to a node with a given JID. 134 135 @param node: identifier of the node to subscribe to. 136 @type node: L{unicode} 137 @param subscriber: JID to subscribe to the node. 138 @type subscriber: L{jid.JID} 139 @rtype: L{defer.Deferred} 140 """ 141 142 def publish(requestor, node, items=[]): 143 """ 144 Publish to a node. 145 146 Node that the C{items} parameter is optional, because so-called 147 transient, notification-only nodes do not use items and publish 148 actions only signify a change in some resource. 149 150 @param node: identifier of the node to publish to. 151 @type node: L{unicode} 152 @param items: list of item elements. 153 @type items: L{list} of L{Item} 154 @rtype: L{defer.Deferred} 155 """ 156 91 157 92 158 class IPubSubService(Interface):
Note: See TracChangeset
for help on using the changeset viewer.