comparison idavoll/iidavoll.py @ 173:246911bcb699

Make node type part of node configuration.
author Ralph Meijer <ralphm@ik.nu>
date Wed, 09 Apr 2008 11:43:16 +0000
parents ef22e4150caa
children c61034369463
comparison
equal deleted inserted replaced
172:9bfb00edd0cc 173:246911bcb699
137 137
138 def publish(node_id, items, requestor): 138 def publish(node_id, items, requestor):
139 """ Publish items to a pubsub node. 139 """ Publish items to a pubsub node.
140 140
141 @return: a deferred that fires when the items have been published. 141 @return: a deferred that fires when the items have been published.
142 @rtype: L{Deferred<twisted.internet.defer.Deferred>}
142 """ 143 """
143 144
144 def register_notifier(observerfn, *args, **kwargs): 145 def register_notifier(observerfn, *args, **kwargs):
145 """ Register callback which is called for notification. """ 146 """ Register callback which is called for notification. """
146 147
182 Return all NodeIDs. 183 Return all NodeIDs.
183 184
184 @return: deferred that returns a list of NodeIDs (L{str}). 185 @return: deferred that returns a list of NodeIDs (L{str}).
185 """ 186 """
186 187
187 def create_node(node_id, owner, config = None, type='leaf'): 188 def create_node(node_id, owner, config=None):
188 """ 189 """
189 Create new node. 190 Create new node.
190 191
191 The implementation should make sure, the passed owner JID is stripped 192 The implementation should make sure, the passed owner JID is stripped
192 of the resource (e.g. using C{owner.userhostJID()}). 193 of the resource (e.g. using C{owner.userhostJID()}).
194 @param node_id: NodeID of the new node. 195 @param node_id: NodeID of the new node.
195 @type node_id: L{str} 196 @type node_id: L{str}
196 @param owner: JID of the new nodes's owner. 197 @param owner: JID of the new nodes's owner.
197 @type owner: L{jid.JID} 198 @type owner: L{jid.JID}
198 @param config: Configuration 199 @param config: Configuration
199 @param type: Node type. Can be either C{'leaf'} or C{'collection'}.
200 @return: deferred that fires on creation. 200 @return: deferred that fires on creation.
201 """ 201 """
202 202
203 def delete_node(node_id): 203 def delete_node(node_id):
204 """ 204 """