Changeset 166:d9c10a5b5c0d for wokkel
Legend:
- Unmodified
- Added
- Removed
-
wokkel/component.py
r165 r166 76 76 77 77 @ivar domains: Domains (as C{str}) this component will handle traffic for. 78 @type domains: L{set}78 @type domains: C{set} 79 79 """ 80 80 … … 251 251 252 252 @ivar routes: Routes based on the host part of JIDs. Maps host names to the 253 L{EventDispatcher<utility.EventDispatcher>}s that should 254 receive the traffic. A key of C{None} means the default 255 route. 253 L{EventDispatcher<twisted.words.xish.utility.EventDispatcher>}s that 254 should receive the traffic. A key of C{None} means the default route. 256 255 @type routes: C{dict} 257 256 """ … … 271 270 @param destination: Destination of the route to be added as a host name 272 271 or C{None} for the default route. 273 @type destination: C{str} or C{NoneType}. 272 @type destination: C{str} or C{NoneType} 273 274 274 @param xs: XML Stream to register the route for. 275 @type xs: L{EventDispatcher<utility.EventDispatcher>}. 275 @type xs: 276 L{EventDispatcher<twisted.words.xish.utility.EventDispatcher>} 276 277 """ 277 278 self.routes[destination] = xs … … 285 286 @param destination: Destination of the route that should be removed. 286 287 @type destination: C{str}. 288 287 289 @param xs: XML Stream to remove the route for. 288 @type xs: L{EventDispatcher<utility.EventDispatcher>}. 290 @type xs: 291 L{EventDispatcher<twisted.words.xish.utility.EventDispatcher>} 289 292 """ 290 293 xs.removeObserver('/*', self.route) -
wokkel/disco.py
r165 r166 456 456 Protocol implementation for XMPP Service Discovery. 457 457 458 This handler will listen to XMPP service discovery requests and 459 query the other handlers in L{parent} (see L{XMPPHandlerContainer}) for 460 their identities, features and items according to L{IDisco}. 458 This handler will listen to XMPP service discovery requests and query the 459 other handlers in C{parent} (see 460 L{twisted.words.protocols.jabber.xmlstream.XMPPHandlerCollection}) 461 for their identities, features and items according to L{IDisco}. 461 462 """ 462 463 -
wokkel/iwokkel.py
r165 r166 42 42 43 43 @param requestor: The entity the request originated from. 44 @type requestor: L{ jid.JID}44 @type requestor: L{JID<twisted.words.protocols.jabber.jid.JID>} 45 45 @param target: The target entity to which the request is made. 46 @type target: L{jid.JID} 46 @type target: L{JID<twisted.words.protocols.jabber.jid.JID>} 47 @param nodeIdentifier: The optional identifier of the node at this 48 entity to retrieve the identify and features of. The default is 49 C{''}, meaning the root node. 50 @type nodeIdentifier: C{unicode} 51 """ 52 53 def getDiscoItems(requestor, target, nodeIdentifier=''): 54 """ 55 Get contained items for this entity, node. 56 57 @param requestor: The entity the request originated from. 58 @type requestor: L{JID<twisted.words.protocols.jabber.jid.JID>} 59 @param target: The target entity to which the request is made. 60 @type target: L{JID<twisted.words.protocols.jabber.jid.JID>} 47 61 @param nodeIdentifier: The optional identifier of the node at this 48 62 entity to retrieve the identify and features of. … … 51 65 """ 52 66 53 def getDiscoItems(requestor, target, nodeIdentifier=''):54 """55 Get contained items for this entity, node.56 57 @param requestor: The entity the request originated from.58 @type requestor: L{jid.JID}59 @param target: The target entity to which the request is made.60 @type target: L{jid.JID}61 @param nodeIdentifier: The optional identifier of the node at this62 entity to retrieve the identify and features of.63 The default is C{''}, meaning the root node.64 @type nodeIdentifier: C{unicode}65 """66 67 67 68 68 … … 107 107 108 108 @param service: The publish-subscribe service entity. 109 @type service: L{ jid.JID}109 @type service: L{JID<twisted.words.protocols.jabber.jid.JID>} 110 110 @param nodeIdentifier: Optional suggestion for the new node's 111 111 identifier. If omitted, the creation of an 112 112 instant node will be attempted. 113 @type nodeIdentifier: L{unicode}113 @type nodeIdentifier: C{unicode} 114 114 @return: a deferred that fires with the identifier of the newly created 115 115 node. Note that this can differ from the suggested identifier 116 116 if the publish subscribe service chooses to modify or ignore 117 117 the suggested identifier. 118 @rtype: L{ defer.Deferred}118 @rtype: L{Deferred<twisted.internet.defer.Deferred>} 119 119 """ 120 120 … … 124 124 125 125 @param service: The publish-subscribe service entity. 126 @type service: L{ jid.JID}126 @type service: L{JID<twisted.words.protocols.jabber.jid.JID>} 127 127 @param nodeIdentifier: Identifier of the node to be deleted. 128 @type nodeIdentifier: L{unicode}129 @rtype: L{ defer.Deferred}128 @type nodeIdentifier: C{unicode} 129 @rtype: L{Deferred<twisted.internet.defer.Deferred>} 130 130 """ 131 131 … … 135 135 136 136 @param service: The publish-subscribe service entity. 137 @type service: L{ jid.JID}137 @type service: L{JID<twisted.words.protocols.jabber.jid.JID>} 138 138 @param nodeIdentifier: Identifier of the node to subscribe to. 139 @type nodeIdentifier: L{unicode}139 @type nodeIdentifier: C{unicode} 140 140 @param subscriber: JID to subscribe to the node. 141 @type subscriber: L{ jid.JID}142 @rtype: L{ defer.Deferred}141 @type subscriber: L{JID<twisted.words.protocols.jabber.jid.JID>} 142 @rtype: L{Deferred<twisted.internet.defer.Deferred>} 143 143 """ 144 144 … … 148 148 149 149 @param service: The publish-subscribe service entity. 150 @type service: L{ jid.JID}150 @type service: L{JID<twisted.words.protocols.jabber.jid.JID>} 151 151 @param nodeIdentifier: Identifier of the node to unsubscribe from. 152 @type nodeIdentifier: L{unicode}152 @type nodeIdentifier: C{unicode} 153 153 @param subscriber: JID to unsubscribe from the node. 154 @type subscriber: L{ jid.JID}155 @rtype: L{ defer.Deferred}154 @type subscriber: L{JID<twisted.words.protocols.jabber.jid.JID>} 155 @rtype: L{Deferred<twisted.internet.defer.Deferred>} 156 156 """ 157 157 … … 165 165 166 166 @param service: The publish-subscribe service entity. 167 @type service: L{ jid.JID}167 @type service: L{JID<twisted.words.protocols.jabber.jid.JID>} 168 168 @param nodeIdentifier: Identifier of the node to publish to. 169 @type nodeIdentifier: L{unicode}169 @type nodeIdentifier: C{unicode} 170 170 @param items: List of item elements. 171 @type items: L{list} of L{Item}172 @rtype: L{ defer.Deferred}171 @type items: C{list} of L{Item} 172 @rtype: L{Deferred<twisted.internet.defer.Deferred>} 173 173 """ 174 174 … … 190 190 191 191 @param service: The entity the notifications will originate from. 192 @type service: L{ jid.JID}192 @type service: L{JID<twisted.words.protocols.jabber.jid.JID>} 193 193 @param nodeIdentifier: The identifier of the node that was published 194 194 to. 195 195 @type nodeIdentifier: C{unicode} 196 196 @param notifications: The notifications as tuples of subscriber, the 197 list of subscriptions and the list of items to be198 notified.199 @type notifications: C{list} of (L{jid.JID}, C{list} of200 L{Subscription<wokkel.pubsub.Subscription>},201 C{list} of L{domish.Element})197 list of subscriptions and the list of items to be notified. 198 @type notifications: C{list} of 199 (L{JID<twisted.words.protocols.jabber.jid.JID>}, C{list} of 200 L{Subscription<wokkel.pubsub.Subscription>}, C{list} of 201 L{Element<twisted.words.xish.domish.Element>}) 202 202 """ 203 203 … … 209 209 210 210 @param service: The entity the notifications will originate from. 211 @type service: L{ jid.JID}211 @type service: L{JID<twisted.words.protocols.jabber.jid.JID>} 212 212 @param nodeIdentifier: The identifier of the node that was deleted. 213 213 @type nodeIdentifier: C{unicode} 214 @param subscribers: The subscribers for which a notification should 215 be sent out. 216 @type subscribers: C{list} of L{jid.JID} 214 @param subscribers: The subscribers for which a notification should be 215 sent out. 216 @type subscribers: C{list} of 217 L{JID<twisted.words.protocols.jabber.jid.JID>} 217 218 @param redirectURI: Optional XMPP URI of another node that subscribers 218 219 are redirected to. 219 220 @type redirectURI: C{str} 220 221 """ … … 225 226 226 227 @param requestor: The entity the request originated from. 227 @type requestor: L{ jid.JID}228 @param service: The entity the request was addressed to. 229 @type service: L{ jid.JID}228 @type requestor: L{JID<twisted.words.protocols.jabber.jid.JID>} 229 @param service: The entity the request was addressed to. 230 @type service: L{JID<twisted.words.protocols.jabber.jid.JID>} 230 231 @param nodeIdentifier: The identifier of the node to publish to. 231 232 @type nodeIdentifier: C{unicode} 232 @param items: The items to be published as L{domish}elements.233 @type items: C{list} of C{ domish.Element}233 @param items: The items to be published as elements. 234 @type items: C{list} of C{Element<twisted.words.xish.domish.Element>} 234 235 @return: deferred that fires on success. 235 @rtype: L{ defer.Deferred}236 @rtype: L{Deferred<twisted.internet.defer.Deferred>} 236 237 """ 237 238 … … 241 242 242 243 @param requestor: The entity the request originated from. 243 @type requestor: L{ jid.JID}244 @param service: The entity the request was addressed to. 245 @type service: L{ jid.JID}244 @type requestor: L{JID<twisted.words.protocols.jabber.jid.JID>} 245 @param service: The entity the request was addressed to. 246 @type service: L{JID<twisted.words.protocols.jabber.jid.JID>} 246 247 @param nodeIdentifier: The identifier of the node to subscribe to. 247 248 @type nodeIdentifier: C{unicode} 248 249 @param subscriber: The entity to be subscribed. 249 @type subscriber: L{ jid.JID}250 @type subscriber: L{JID<twisted.words.protocols.jabber.jid.JID>} 250 251 @return: A deferred that fires with a 251 252 L{Subscription<wokkel.pubsub.Subscription>}. 252 @rtype: L{ defer.Deferred}253 @rtype: L{Deferred<twisted.internet.defer.Deferred>} 253 254 """ 254 255 … … 258 259 259 260 @param requestor: The entity the request originated from. 260 @type requestor: L{ jid.JID}261 @param service: The entity the request was addressed to. 262 @type service: L{ jid.JID}261 @type requestor: L{JID<twisted.words.protocols.jabber.jid.JID>} 262 @param service: The entity the request was addressed to. 263 @type service: L{JID<twisted.words.protocols.jabber.jid.JID>} 263 264 @param nodeIdentifier: The identifier of the node to unsubscribe from. 264 265 @type nodeIdentifier: C{unicode} 265 266 @param subscriber: The entity to be unsubscribed. 266 @type subscriber: L{ jid.JID}267 @type subscriber: L{JID<twisted.words.protocols.jabber.jid.JID>} 267 268 @return: A deferred that fires with C{None} when unsubscription has 268 269 succeeded. 269 @rtype: L{ defer.Deferred}270 @rtype: L{Deferred<twisted.internet.defer.Deferred>} 270 271 """ 271 272 … … 275 276 276 277 @param requestor: The entity the request originated from. 277 @type requestor: L{ jid.JID}278 @param service: The entity the request was addressed to. 279 @type service: L{ jid.JID}278 @type requestor: L{JID<twisted.words.protocols.jabber.jid.JID>} 279 @param service: The entity the request was addressed to. 280 @type service: L{JID<twisted.words.protocols.jabber.jid.JID>} 280 281 @return: A deferred that fires with a C{list} of subscriptions as 281 282 L{Subscription<wokkel.pubsub.Subscription>}. 282 @rtype: L{ defer.Deferred}283 @rtype: L{Deferred<twisted.internet.defer.Deferred>} 283 284 """ 284 285 … … 288 289 289 290 @param requestor: The entity the request originated from. 290 @type requestor: L{ jid.JID}291 @param service: The entity the request was addressed to. 292 @type service: L{ jid.JID}291 @type requestor: L{JID<twisted.words.protocols.jabber.jid.JID>} 292 @param service: The entity the request was addressed to. 293 @type service: L{JID<twisted.words.protocols.jabber.jid.JID>} 293 294 @return: A deferred that fires with a C{list} of affiliations as 294 C{tuple}s of (node identifier as C{unicode}, affiliation state295 as C{str}). The affiliation can be C{'owner'}, C{'publisher'},296 orC{'outcast'}.297 @rtype: L{ defer.Deferred}295 C{tuple}s of (node identifier as C{unicode}, affiliation state as 296 C{str}). The affiliation can be C{'owner'}, C{'publisher'}, or 297 C{'outcast'}. 298 @rtype: L{Deferred<twisted.internet.defer.Deferred>} 298 299 """ 299 300 … … 303 304 304 305 @param requestor: The entity the request originated from. 305 @type requestor: L{jid.JID} 306 @param service: The entity the request was addressed to. 307 @type service: L{jid.JID} 308 @param nodeIdentifier: The suggestion for the identifier of the node to 309 be created. If the request did not include a 310 suggestion for the node identifier, the value 311 is C{None}. 306 @type requestor: L{JID<twisted.words.protocols.jabber.jid.JID>} 307 @param service: The entity the request was addressed to. 308 @type service: L{JID<twisted.words.protocols.jabber.jid.JID>} 309 @param nodeIdentifier: The suggestion for the identifier of the node 310 to be created. If the request did not include a suggestion for the 311 node identifier, the value is C{None}. 312 312 @type nodeIdentifier: C{unicode} or C{NoneType} 313 313 @return: A deferred that fires with a C{unicode} that represents 314 314 the identifier of the new node. 315 @rtype: L{ defer.Deferred}315 @rtype: L{Deferred<twisted.internet.defer.Deferred>} 316 316 """ 317 317 … … 356 356 357 357 @param requestor: The entity the request originated from. 358 @type requestor: L{ jid.JID}359 @param service: The entity the request was addressed to. 360 @type service: L{ jid.JID}358 @type requestor: L{JID<twisted.words.protocols.jabber.jid.JID>} 359 @param service: The entity the request was addressed to. 360 @type service: L{JID<twisted.words.protocols.jabber.jid.JID>} 361 361 @param nodeType: The type of node for which the configuration is 362 362 retrieved, C{'leaf'} or C{'collection'}. … … 366 366 field name. Values can be of types C{unicode}, C{int} or 367 367 C{bool}. 368 @rtype: L{ defer.Deferred}368 @rtype: L{Deferred<twisted.internet.defer.Deferred>} 369 369 """ 370 370 … … 374 374 375 375 @param requestor: The entity the request originated from. 376 @type requestor: L{ jid.JID}377 @param service: The entity the request was addressed to. 378 @type service: L{ jid.JID}376 @type requestor: L{JID<twisted.words.protocols.jabber.jid.JID>} 377 @param service: The entity the request was addressed to. 378 @type service: L{JID<twisted.words.protocols.jabber.jid.JID>} 379 379 @param nodeIdentifier: The identifier of the node to retrieve the 380 380 configuration from. 381 381 @type nodeIdentifier: C{unicode} 382 382 @return: A deferred that fires with a C{dict} representing the node 383 384 385 @rtype: L{ defer.Deferred}383 configuration. Keys are C{str}s that represent the field name. 384 Values can be of types C{unicode}, C{int} or C{bool}. 385 @rtype: L{Deferred<twisted.internet.defer.Deferred>} 386 386 """ 387 387 … … 391 391 392 392 @param requestor: The entity the request originated from. 393 @type requestor: L{ jid.JID}394 @param service: The entity the request was addressed to. 395 @type service: L{ jid.JID}393 @type requestor: L{JID<twisted.words.protocols.jabber.jid.JID>} 394 @param service: The entity the request was addressed to. 395 @type service: L{JID<twisted.words.protocols.jabber.jid.JID>} 396 396 @param nodeIdentifier: The identifier of the node to change the 397 397 configuration of. … … 399 399 @return: A deferred that fires with C{None} when the node's 400 400 configuration has been changed. 401 @rtype: L{ defer.Deferred}401 @rtype: L{Deferred<twisted.internet.defer.Deferred>} 402 402 """ 403 403 … … 407 407 408 408 @param requestor: The entity the request originated from. 409 @type requestor: L{ jid.JID}410 @param service: The entity the request was addressed to. 411 @type service: L{ jid.JID}409 @type requestor: L{JID<twisted.words.protocols.jabber.jid.JID>} 410 @param service: The entity the request was addressed to. 411 @type service: L{JID<twisted.words.protocols.jabber.jid.JID>} 412 412 @param nodeIdentifier: The identifier of the node to retrieve items 413 413 from. … … 420 420 421 421 @param requestor: The entity the request originated from. 422 @type requestor: L{ jid.JID}423 @param service: The entity the request was addressed to. 424 @type service: L{ jid.JID}422 @type requestor: L{JID<twisted.words.protocols.jabber.jid.JID>} 423 @param service: The entity the request was addressed to. 424 @type service: L{JID<twisted.words.protocols.jabber.jid.JID>} 425 425 @param nodeIdentifier: The identifier of the node to retract items 426 426 from. … … 433 433 434 434 @param requestor: The entity the request originated from. 435 @type requestor: L{ jid.JID}436 @param service: The entity the request was addressed to. 437 @type service: L{ jid.JID}435 @type requestor: L{JID<twisted.words.protocols.jabber.jid.JID>} 436 @param service: The entity the request was addressed to. 437 @type service: L{JID<twisted.words.protocols.jabber.jid.JID>} 438 438 @param nodeIdentifier: The identifier of the node to be purged. 439 439 @type nodeIdentifier: C{unicode} … … 445 445 446 446 @param requestor: The entity the request originated from. 447 @type requestor: L{ jid.JID}448 @param service: The entity the request was addressed to. 449 @type service: L{ jid.JID}447 @type requestor: L{JID<twisted.words.protocols.jabber.jid.JID>} 448 @param service: The entity the request was addressed to. 449 @type service: L{JID<twisted.words.protocols.jabber.jid.JID>} 450 450 @param nodeIdentifier: The identifier of the node to be delete. 451 451 @type nodeIdentifier: C{unicode} … … 470 470 471 471 @param requestor: The entity the request originated from. 472 @type requestor: L{ jid.JID}472 @type requestor: L{JID<twisted.words.protocols.jabber.jid.JID>} 473 473 @param service: The publish-subscribe service entity. 474 @type service: L{ jid.JID}474 @type service: L{JID<twisted.words.protocols.jabber.jid.JID>} 475 475 @param nodeIdentifier: Identifier of the node to request the info for. 476 @type nodeIdentifier: L{unicode}476 @type nodeIdentifier: C{unicode} 477 477 @return: A deferred that fires with a dictionary. If not empty, 478 478 it must have the keys C{'type'} and C{'meta-data'} to keep 479 479 respectively the node type and a dictionary with the meta 480 480 data for that node. 481 @rtype: L{ defer.Deferred}481 @rtype: L{Deferred<twisted.internet.defer.Deferred>} 482 482 """ 483 483 … … 488 488 489 489 @param requestor: The entity the request originated from. 490 @type requestor: L{ jid.JID}490 @type requestor: L{JID<twisted.words.protocols.jabber.jid.JID>} 491 491 @param service: The publish-subscribe service entity. 492 @type service: L{jid.JID} 493 @param nodeIdentifier: Identifier of the node to request the childs for. 494 @type nodeIdentifier: L{unicode} 492 @type service: L{JID<twisted.words.protocols.jabber.jid.JID>} 493 @param nodeIdentifier: Identifier of the node to request the childs 494 for. 495 @type nodeIdentifier: C{unicode} 495 496 @return: A deferred that fires with a list of child node identifiers. 496 @rtype: L{ defer.Deferred}497 @rtype: L{Deferred<twisted.internet.defer.Deferred>} 497 498 """ 498 499 … … 541 542 @type request: L{wokkel.pubsub.PubSubRequest} 542 543 @return: deferred that fires on success. 543 @rtype: L{ defer.Deferred}544 @rtype: L{Deferred<twisted.internet.defer.Deferred>} 544 545 """ 545 546 … … 553 554 @return: A deferred that fires with a 554 555 L{Subscription<wokkel.pubsub.Subscription>}. 555 @rtype: L{ defer.Deferred}556 @rtype: L{Deferred<twisted.internet.defer.Deferred>} 556 557 """ 557 558 … … 565 566 @return: A deferred that fires with C{None} when unsubscription has 566 567 succeeded. 567 @rtype: L{ defer.Deferred}568 @rtype: L{Deferred<twisted.internet.defer.Deferred>} 568 569 """ 569 570 … … 577 578 @return: A deferred that fires with a C{list} of subscriptions as 578 579 L{Subscription<wokkel.pubsub.Subscription>}. 579 @rtype: L{ defer.Deferred}580 @rtype: L{Deferred<twisted.internet.defer.Deferred>} 580 581 """ 581 582 … … 588 589 @type request: L{wokkel.pubsub.PubSubRequest} 589 590 @return: A deferred that fires with a C{list} of affiliations as 590 C{tuple}s of (node identifier as C{unicode}, affiliation state591 as C{str}). The affiliation can be C{'owner'}, C{'publisher'},592 orC{'outcast'}.593 @rtype: L{ defer.Deferred}591 C{tuple}s of (node identifier as C{unicode}, affiliation state as 592 C{str}). The affiliation can be C{'owner'}, C{'publisher'}, or 593 C{'outcast'}. 594 @rtype: L{Deferred<twisted.internet.defer.Deferred>} 594 595 """ 595 596 … … 603 604 @return: A deferred that fires with a C{unicode} that represents 604 605 the identifier of the new node. 605 @rtype: L{ defer.Deferred}606 @rtype: L{Deferred<twisted.internet.defer.Deferred>} 606 607 """ 607 608 … … 617 618 field name. Values can be of types C{unicode}, C{int} or 618 619 C{bool}. 619 @rtype: L{ defer.Deferred}620 @rtype: L{Deferred<twisted.internet.defer.Deferred>} 620 621 """ 621 622 … … 628 629 @type request: L{wokkel.pubsub.PubSubRequest} 629 630 @return: A deferred that fires with a C{dict} representing the node 630 631 632 @rtype: L{ defer.Deferred}631 configuration. Keys are C{str}s that represent the field name. 632 Values can be of types C{unicode}, C{int} or C{bool}. 633 @rtype: L{Deferred<twisted.internet.defer.Deferred>} 633 634 """ 634 635 … … 642 643 @return: A deferred that fires with C{None} when the node's 643 644 configuration has been changed. 644 @rtype: L{ defer.Deferred}645 @rtype: L{Deferred<twisted.internet.defer.Deferred>} 645 646 """ 646 647 … … 653 654 @type request: L{wokkel.pubsub.PubSubRequest} 654 655 @return: A deferred that fires with a C{list} of L{pubsub.Item}. 655 @rtype: L{ defer.Deferred}656 @rtype: L{Deferred<twisted.internet.defer.Deferred>} 656 657 """ 657 658 … … 665 666 @return: A deferred that fires with C{None} when the given items have 666 667 been retracted. 667 @rtype: L{ defer.Deferred}668 @rtype: L{Deferred<twisted.internet.defer.Deferred>} 668 669 """ 669 670 … … 677 678 @return: A deferred that fires with C{None} when the node has been 678 679 purged. 679 @rtype: L{ defer.Deferred}680 @rtype: L{Deferred<twisted.internet.defer.Deferred>} 680 681 """ 681 682 … … 689 690 @return: A deferred that fires with C{None} when the node has been 690 691 deleted. 691 @rtype: L{ defer.Deferred}692 @rtype: L{Deferred<twisted.internet.defer.Deferred>} 692 693 """ 693 694 … … 695 696 def affiliationsGet(request): 696 697 """ 697 Called when a affiliations retrieval request (owner) hasbeen received.698 Called when an owner affiliations retrieval request been received. 698 699 699 700 @param request: The publish-subscribe request. 700 701 @type request: L{wokkel.pubsub.PubSubRequest} 701 702 @return: A deferred that fires with a C{dict} of affiliations with the 702 entity as key (L{JID }) and the affiliation state as value703 (C{unicode}). The affiliation can be C{u'owner'}, C{u'publisher'},704 or C{u'outcast'}.705 @rtype: L{ defer.Deferred}703 entity as key (L{JID<twisted.words.protocols.jabber.jid.JID>}) and 704 the affiliation state as value (C{unicode}). The affiliation can 705 be C{u'owner'}, C{u'publisher'}, or C{u'outcast'}. 706 @rtype: L{Deferred<twisted.internet.defer.Deferred>} 706 707 707 708 @note: Affiliations are always on the bare JID. An implementation of … … 716 717 @param request: The publish-subscribe request. 717 718 @type request: L{wokkel.pubsub.PubSubRequest} 719 718 720 @return: A deferred that fires with C{None} when the affiliation 719 721 changes were succesfully processed.. 720 @rtype: L{ defer.Deferred}722 @rtype: L{Deferred<twisted.internet.defer.Deferred>} 721 723 722 724 @note: Affiliations are always on the bare JID. The JIDs in 723 L{wokkel.pubsub.PubSubRequest.affiliations} are already stripped of724 any resource.725 L{wokkel.pubsub.PubSubRequest}'s C{affiliations} attribute are 726 already stripped of any resource. 725 727 """ 726 728 … … 736 738 def receivedSubject(room, user, subject): 737 739 """ 738 A subject is received when you join a room and when the subject is changed. This 739 method is triggered by one of those two events. 740 The room subject has been received. 741 742 A subject is received when you join a room and when the subject is 743 changed. 740 744 741 745 @param room: The room the subject was accepted for. … … 752 756 def receivedHistory(room, user, message): 753 757 """ 754 Past messages from a chat room has been received. This occurs when you join a room. 758 Past messages from a chat room have been received. 759 760 This occurs when you join a room. 755 761 """ 756 762 … … 761 767 762 768 @param roomJID: The room to configure. 763 @type roomJID: L{jid.JID} 764 765 @param options: A mapping of field names to values, or C{None} to cancel. 769 @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>} 770 771 @param options: A mapping of field names to values, or C{None} to 772 cancel. 766 773 @type options: C{dict} 767 774 """ … … 775 782 776 783 @param roomJID: The bare JID of the room. 777 @type roomJID: L{ jid.JID}784 @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>} 778 785 779 786 @return: A deferred that fires with the room's configuration form as … … 788 795 789 796 @param roomJID: The JID of the room the entity is joining. 790 @type roomJID: L{ jid.JID}797 @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>} 791 798 792 799 @param nick: The nick name for the entitity joining the room. … … 812 819 813 820 @param roomJID: The JID of the room, i.e. without a resource. 814 @type roomJID: L{ jid.JID}821 @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>} 815 822 816 823 @param nick: The new nick name within the room. … … 826 833 827 834 @param roomJID: The Room JID of the room to leave. 828 @type roomJID: L{ jid.JID}835 @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>} 829 836 """ 830 837 … … 858 865 859 866 @param occupantJID: The Room JID of the other user. 860 @type occupantJID: L{ jid.JID}867 @type occupantJID: L{JID<twisted.words.protocols.jabber.jid.JID>} 861 868 """ 862 869 … … 867 874 868 875 @param roomJID: The bare JID of the room. 869 @type roomJID: L{ jid.JID}876 @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>} 870 877 871 878 @param options: A mapping of field names to values, or C{None} to … … 882 889 883 890 @param roomJID: The bare JID of the room. 884 @type roomJID: L{ jid.JID}891 @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>} 885 892 886 893 @param subject: The subject you want to set. … … 894 901 895 902 @param roomJID: The room jabber/xmpp entity id. 896 @type roomJID: L{ jid.JID}903 @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>} 897 904 """ 898 905 … … 905 912 906 913 @param roomJID: The room jabber/xmpp entity id. 907 @type roomJID: L{ jid.JID}914 @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>} 908 915 909 916 @param messages: The history to send to the room as an ordered list of 910 message, represented by a dictionary with the keys 911 C{'stanza'}, holding the original stanza a 912 L{domish.Element}, and C{'timestamp'} with the 913 timestamp. 914 @type messages: L{list} of L{domish.Element} 917 message, represented by a dictionary with the keys C{'stanza'}, 918 holding the original stanza a 919 L{Element<twisted.words.xish.domish.Element>}, and C{'timestamp'} 920 with the timestamp. 921 @type messages: C{list} of 922 L{Element<twisted.words.xish.domish.Element>} 915 923 """ 916 924 … … 921 929 922 930 @param roomJID: The bare JID of the room. 923 @type roomJID: L{ jid.JID}931 @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>} 924 932 925 933 @param entity: The bare JID of the entity to be banned. 926 @type entity: L{ jid.JID}934 @type entity: L{JID<twisted.words.protocols.jabber.jid.JID>} 927 935 928 936 @param reason: The reason for banning the entity. … … 930 938 931 939 @param sender: The entity sending the request. 932 @type sender: L{ jid.JID}940 @type sender: L{JID<twisted.words.protocols.jabber.jid.JID>} 933 941 """ 934 942 … … 939 947 940 948 @param roomJID: The bare JID of the room. 941 @type roomJID: L{ jid.JID}949 @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>} 942 950 943 951 @param nick: The occupant to be banned. 944 @type nick: L{jid.JID} or C{unicode} 952 @type nick: L{JID<twisted.words.protocols.jabber.jid.JID>} or 953 C{unicode} 945 954 946 955 @param reason: The reason given for the kick. … … 948 957 949 958 @param sender: The entity sending the request. 950 @type sender: L{ jid.JID}959 @type sender: L{JID<twisted.words.protocols.jabber.jid.JID>} 951 960 """ 952 961 -
wokkel/muc.py
r162 r166 228 228 229 229 @param alternate: Optional room JID of an alternate venue. 230 @type alternate: L{ jid.JID}230 @type alternate: L{JID<twisted.words.protocols.jabber.jid.JID>} 231 231 232 232 @param password: Optional password for entering the alternate venue. … … 398 398 399 399 @ivar entity: The real JID of the entity this presence is from. 400 @type entity: L{ jid.JID}400 @type entity: L{JID<twisted.words.protocols.jabber.jid.JID>} 401 401 402 402 @ivar mucStatuses: Set of one or more status codes from L{STATUS_CODE}. … … 500 500 Called when the XML stream has been initialized. 501 501 502 It initializes several XPath events to handle MUC stanzas that come in. 503 After those are initialized the method L{initialized} is called to 504 signal that we have finished. 502 It initializes several XPath events to handle MUC stanzas that come 503 in. 505 504 """ 506 505 xmppim.BasePresenceProtocol.connectionInitialized(self) … … 547 546 @param timeout: The number of seconds to wait before the deferred is 548 547 timed out. 549 @type timeout: L{int}548 @type timeout: C{int} 550 549 551 550 The deferred object L{defer.Deferred} is returned. … … 590 589 591 590 @param roomJID: The JID of the room the entity is joining. 592 @type roomJID: L{ jid.JID}591 @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>} 593 592 594 593 @param nick: The nick name for the entitity joining the room. … … 623 622 624 623 @param roomJID: The JID of the room. 625 @type roomJID: L{ jid.JID}624 @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>} 626 625 627 626 @param nick: The new nick name within the room. … … 640 639 641 640 @param roomJID: The Room JID of the room. 642 @type roomJID: L{ jid.JID}641 @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>} 643 642 644 643 @param show: The availability of the entity. Common values are xa, … … 662 661 663 662 @param roomJID: The JID of the room. 664 @type roomJID: L{ jid.JID}663 @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>} 665 664 """ 666 665 occupantJID = self._roomOccupantMap[roomJID] … … 686 685 687 686 @param occupantJID: The Room JID of the other user. 688 @type occupantJID: L{ jid.JID}687 @type occupantJID: L{JID<twisted.words.protocols.jabber.jid.JID>} 689 688 """ 690 689 message = PrivateChat(recipient=occupantJID, body=body) … … 699 698 700 699 @param roomJID: The bare JID of the room. 701 @type roomJID: L{ jid.JID}700 @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>} 702 701 703 702 @param subject: The subject you want to set. … … 715 714 716 715 @param roomJID: The bare JID of the room. 717 @type roomJID: L{ jid.JID}716 @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>} 718 717 719 718 @param invitee: The entity that is being invited. 720 @type invitee: L{ jid.JID}719 @type invitee: L{JID<twisted.words.protocols.jabber.jid.JID>} 721 720 722 721 @param reason: The reason for the invite. … … 734 733 @param room: The room jabber/xmpp entity id for the requested 735 734 registration form. 736 @type room: L{ jid.JID}735 @type room: L{JID<twisted.words.protocols.jabber.jid.JID>} 737 736 """ 738 737 def cb(response): … … 751 750 752 751 @param roomJID: The bare JID of the room. 753 @type roomJID: L{ jid.JID}752 @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>} 754 753 755 754 @param options: A mapping of field names to values, or C{None} to … … 768 767 769 768 @param roomJID: The room jabber/xmpp entity id. 770 @type roomJID: L{ jid.JID}769 @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>} 771 770 """ 772 771 message = VoiceRequest(recipient=roomJID) … … 781 780 782 781 @param roomJID: The room jabber/xmpp entity id. 783 @type roomJID: L{ jid.JID}782 @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>} 784 783 785 784 @param messages: The history to send to the room as an ordered list of … … 788 787 L{domish.Element}, and C{'timestamp'} with the 789 788 timestamp. 790 @type messages: L{list} of L{domish.Element}789 @type messages: C{list} of L{domish.Element} 791 790 """ 792 791 … … 817 816 818 817 @param roomJID: The bare JID of the room. 819 @type roomJID: L{ jid.JID}818 @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>} 820 819 821 820 @return: A deferred that fires with the room's configuration form as … … 838 837 839 838 @param roomJID: The room to configure. 840 @type roomJID: L{ jid.JID}839 @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>} 841 840 842 841 @param options: A mapping of field names to values, or C{None} to … … 885 884 886 885 @param roomJID: The bare JID of the room. 887 @type roomJID: L{ jid.JID}886 @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>} 888 887 """ 889 888 return self._getAffiliationList(roomJID, 'member') … … 895 894 896 895 @param roomJID: The bare JID of the room. 897 @type roomJID: L{ jid.JID}896 @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>} 898 897 """ 899 898 return self._getAffiliationList(roomJID, 'admin') … … 905 904 906 905 @param roomJID: The bare JID of the room. 907 @type roomJID: L{ jid.JID}906 @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>} 908 907 """ 909 908 return self._getAffiliationList(roomJID, 'outcast') … … 915 914 916 915 @param roomJID: The bare JID of the room. 917 @type roomJID: L{ jid.JID}916 @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>} 918 917 """ 919 918 return self._getAffiliationList(roomJID, 'owner') … … 925 924 926 925 @param roomJID: The bare JID of the room. 927 @type roomJID: L{ jid.JID}926 @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>} 928 927 """ 929 928 d = self._getRoleList(roomJID, 'moderator') … … 961 960 962 961 @param roomJID: The bare JID of the room. 963 @type roomJID: L{ jid.JID}962 @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>} 964 963 965 964 @param entities: The list of entities to change for a room. 966 @type entities: L{list} of L{jid.JID} 965 @type entities: C{list} of 966 L{JID<twisted.words.protocols.jabber.jid.JID>} 967 967 968 968 @param affiliation: The affilation to the entities will acquire. … … 970 970 971 971 @param sender: The entity sending the request. 972 @type sender: L{ jid.JID}972 @type sender: L{JID<twisted.words.protocols.jabber.jid.JID>} 973 973 974 974 """ … … 986 986 987 987 @param roomJID: The bare JID of the room. 988 @type roomJID: L{ jid.JID}988 @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>} 989 989 990 990 @param nick: The nick name for the user in this room. … … 995 995 996 996 @param sender: The entity sending the request. 997 @type sender: L{ jid.JID}997 @type sender: L{JID<twisted.words.protocols.jabber.jid.JID>} 998 998 """ 999 999 return self._setRole(roomJID, nick=nick, … … 1009 1009 1010 1010 @param roomJID: The bare JID of the room. 1011 @type roomJID: L{ jid.JID}1011 @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>} 1012 1012 1013 1013 @param nick: The nick name for the user in this room. … … 1018 1018 1019 1019 @param sender: The entity sending the request. 1020 @type sender: L{ jid.JID}1020 @type sender: L{JID<twisted.words.protocols.jabber.jid.JID>} 1021 1021 """ 1022 1022 return self._setRole(roomJID, nick=nick, role='visitor', … … 1029 1029 1030 1030 @param roomJID: The bare JID of the room. 1031 @type roomJID: L{ jid.JID}1031 @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>} 1032 1032 1033 1033 @param nick: The nick name for the user in this room. … … 1038 1038 1039 1039 @param sender: The entity sending the request. 1040 @type sender: L{ jid.JID}1040 @type sender: L{JID<twisted.words.protocols.jabber.jid.JID>} 1041 1041 """ 1042 1042 return self._setRole(roomJID, nick=nick, role='moderator', … … 1049 1049 1050 1050 @param roomJID: The bare JID of the room. 1051 @type roomJID: L{ jid.JID}1051 @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>} 1052 1052 1053 1053 @param entity: The bare JID of the entity to be banned. 1054 @type entity: L{ jid.JID}1054 @type entity: L{JID<twisted.words.protocols.jabber.jid.JID>} 1055 1055 1056 1056 @param reason: The reason for banning the entity. … … 1058 1058 1059 1059 @param sender: The entity sending the request. 1060 @type sender: L{ jid.JID}1060 @type sender: L{JID<twisted.words.protocols.jabber.jid.JID>} 1061 1061 """ 1062 1062 return self._setAffiliation(roomJID, entity, 'outcast', … … 1069 1069 1070 1070 @param roomJID: The bare JID of the room. 1071 @type roomJID: L{ jid.JID}1071 @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>} 1072 1072 1073 1073 @param nick: The occupant to be banned. … … 1078 1078 1079 1079 @param sender: The entity sending the request. 1080 @type sender: L{ jid.JID}1080 @type sender: L{JID<twisted.words.protocols.jabber.jid.JID>} 1081 1081 """ 1082 1082 return self._setRole(roomJID, nick, 'none', … … 1089 1089 1090 1090 @param roomJID: The JID of the room. 1091 @type roomJID: L{ jid.JID}1091 @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>} 1092 1092 1093 1093 @param reason: The reason for the destruction of the room. … … 1095 1095 1096 1096 @param alternate: The JID of the room suggested as an alternate venue. 1097 @type alternate: L{ jid.JID}1097 @type alternate: L{JID<twisted.words.protocols.jabber.jid.JID>} 1098 1098 1099 1099 """ … … 1129 1129 1130 1130 @ivar roomJID: The Room JID of the MUC room. 1131 @type roomJID: L{JID }1131 @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>} 1132 1132 1133 1133 @ivar nick: The nick name for the client in this room. … … 1136 1136 @ivar occupantJID: The JID of the occupant in the room. Generated from 1137 1137 roomJID and nick. 1138 @type occupantJID: L{ jid.JID}1138 @type occupantJID: L{JID<twisted.words.protocols.jabber.jid.JID>} 1139 1139 1140 1140 @ivar locked: Flag signalling a locked room. A locked room first needs … … 1208 1208 Multi-User Chat client protocol. 1209 1209 1210 This is a subclass of L{XMPPHandler} and implements L{IMUCC Lient}.1210 This is a subclass of L{XMPPHandler} and implements L{IMUCClient}. 1211 1211 1212 1212 @ivar _rooms: Collection of occupied rooms, keyed by the bare JID of the … … 1244 1244 the L{Room} instance associated with it. 1245 1245 1246 @type occupantJID: L{ jid.JID}1246 @type occupantJID: L{JID<twisted.words.protocols.jabber.jid.JID>} 1247 1247 """ 1248 1248 return self._rooms.get(roomJID) … … 1437 1437 1438 1438 @param roomJID: The JID of the room the entity is joining. 1439 @type roomJID: L{ jid.JID}1439 @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>} 1440 1440 1441 1441 @param nick: The nick name for the entitity joining the room. … … 1481 1481 1482 1482 @param roomJID: The JID of the room, i.e. without a resource. 1483 @type roomJID: L{ jid.JID}1483 @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>} 1484 1484 1485 1485 @param nick: The new nick name within the room. … … 1505 1505 1506 1506 @param roomJID: The Room JID of the room to leave. 1507 @type roomJID: L{ jid.JID}1507 @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>} 1508 1508 """ 1509 1509 def cb(presence): … … 1522 1522 1523 1523 @param roomJID: The Room JID of the room. 1524 @type roomJID: L{ jid.JID}1524 @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>} 1525 1525 1526 1526 @param show: The availability of the entity. Common values are xa, … … 1542 1542 1543 1543 @param roomJID: The JID of the room. 1544 @type roomJID: L{ jid.JID}1544 @type roomJID: L{JID<twisted.words.protocols.jabber.jid.JID>} 1545 1545 1546 1546 @param reason: The reason for the destruction of the room. … … 1548 1548 1549 1549 @param alternate: The JID of the room suggested as an alternate venue. 1550 @type alternate: L{ jid.JID}1550 @type alternate: L{JID<twisted.words.protocols.jabber.jid.JID>} 1551 1551 1552 1552 """ -
wokkel/ping.py
r165 r166 34 34 35 35 @param entity: Entity to be pinged. 36 @type entity: L{ jid.JID}36 @type entity: L{JID<twisted.words.protocols.jabber.jid.JID>} 37 37 38 38 @return: A deferred that fires upon receiving a response. 39 @rtype: L{ defer.Deferred}39 @rtype: L{Deferred<twisted.internet.defer.Deferred>} 40 40 41 41 @param sender: Optional sender address. 42 @type sender: L{ jid.JID}42 @type sender: L{JID<twisted.words.protocols.jabber.jid.JID>} 43 43 """ 44 44 def cb(response): -
wokkel/pubsub.py
r165 r166 169 169 """ 170 170 @param id: optional item identifier 171 @type id: L{unicode}171 @type id: C{unicode} 172 172 @param payload: optional item payload. Either as a domish element, or 173 173 as serialized XML. 174 @type payload: object providing L{domish.IElement} or L{unicode}.174 @type payload: object providing L{domish.IElement} or C{unicode}. 175 175 """ 176 176 … … 194 194 C{None}. 195 195 196 @ivar verb: The type of publish-subscribe request. See L{_requestVerbMap}.196 @ivar verb: The type of publish-subscribe request. See C{_requestVerbMap}. 197 197 @type verb: C{str}. 198 198 199 199 @ivar affiliations: Affiliations to be modified. 200 200 @type affiliations: C{set} 201 201 202 @ivar items: The items to be published, as L{domish.Element}s. 202 203 @type items: C{list} 204 203 205 @ivar itemIdentifiers: Identifiers of the items to be retrieved or 204 206 retracted. 205 207 @type itemIdentifiers: C{set} 208 206 209 @ivar maxItems: Maximum number of items to retrieve. 207 210 @type maxItems: C{int}. 211 208 212 @ivar nodeIdentifier: Identifier of the node the request is about. 209 213 @type nodeIdentifier: C{unicode} 214 210 215 @ivar nodeType: The type of node that should be created, or for which the 211 216 configuration is retrieved. C{'leaf'} or C{'collection'}. 212 217 @type nodeType: C{str} 218 213 219 @ivar options: Configurations options for nodes, subscriptions and publish 214 220 requests. 215 221 @type options: L{data_form.Form} 222 216 223 @ivar subscriber: The subscribing entity. 217 @type subscriber: L{JID} 224 @type subscriber: L{JID<twisted.words.protocols.jabber.jid.JID>} 225 218 226 @ivar subscriptionIdentifier: Identifier for a specific subscription. 219 227 @type subscriptionIdentifier: C{unicode} 228 220 229 @ivar subscriptions: Subscriptions to be modified, as a set of 221 230 L{Subscription}. 222 231 @type subscriptions: C{set} 232 223 233 @ivar affiliations: Affiliations to be modified, as a dictionary of entity 224 (L{JID} to affiliation (C{unicode}). 234 (L{JID<twisted.words.protocols.jabber.jid.JID>} to affiliation 235 (C{unicode}). 225 236 @type affiliations: C{dict} 226 237 """ … … 599 610 600 611 @param xs: The XML stream to send the request on. 601 @type xs: L{ xmlstream.XmlStream}612 @type xs: L{twisted.words.protocols.jabber.xmlstream.XmlStream} 602 613 @rtype: L{defer.Deferred}. 603 614 """ … … 637 648 @type nodeIdentifier: C{unicode} 638 649 @param headers: SHIM headers, see L{wokkel.shim.extractHeaders}. 639 @type headers: L{dict}650 @type headers: C{dict} 640 651 """ 641 652 … … 758 769 759 770 @param service: The publish subscribe service to create the node at. 760 @type service: L{JID }771 @type service: L{JID<twisted.words.protocols.jabber.jid.JID>} 761 772 @param nodeIdentifier: Optional suggestion for the id of the node. 762 773 @type nodeIdentifier: C{unicode} … … 793 804 794 805 @param service: The publish subscribe service to delete the node from. 795 @type service: L{JID }806 @type service: L{JID<twisted.words.protocols.jabber.jid.JID>} 796 807 @param nodeIdentifier: The identifier of the node. 797 808 @type nodeIdentifier: C{unicode} … … 810 821 811 822 @param service: The publish subscribe service that keeps the node. 812 @type service: L{JID }823 @type service: L{JID<twisted.words.protocols.jabber.jid.JID>} 813 824 814 825 @param nodeIdentifier: The identifier of the node. … … 817 828 @param subscriber: The entity to subscribe to the node. This entity 818 829 will get notifications of new published items. 819 @type subscriber: L{JID }830 @type subscriber: L{JID<twisted.words.protocols.jabber.jid.JID>} 820 831 821 832 @param options: Subscription options. … … 862 873 863 874 @param service: The publish subscribe service that keeps the node. 864 @type service: L{JID }875 @type service: L{JID<twisted.words.protocols.jabber.jid.JID>} 865 876 866 877 @param nodeIdentifier: The identifier of the node. … … 868 879 869 880 @param subscriber: The entity to unsubscribe from the node. 870 @type subscriber: L{JID }881 @type subscriber: L{JID<twisted.words.protocols.jabber.jid.JID>} 871 882 872 883 @param subscriptionIdentifier: Optional subscription identifier. … … 887 898 888 899 @param service: The publish subscribe service that keeps the node. 889 @type service: L{JID }900 @type service: L{JID<twisted.words.protocols.jabber.jid.JID>} 890 901 @param nodeIdentifier: The identifier of the node. 891 902 @type nodeIdentifier: C{unicode} … … 907 918 908 919 @param service: The publish subscribe service that keeps the node. 909 @type service: L{JID }920 @type service: L{JID<twisted.words.protocols.jabber.jid.JID>} 910 921 911 922 @param nodeIdentifier: The identifier of the node. … … 946 957 947 958 @param service: The publish subscribe service that keeps the node. 948 @type service: L{JID }959 @type service: L{JID<twisted.words.protocols.jabber.jid.JID>} 949 960 950 961 @param nodeIdentifier: The identifier of the node. … … 952 963 953 964 @param subscriber: The entity subscribed to the node. 954 @type subscriber: L{JID }965 @type subscriber: L{JID<twisted.words.protocols.jabber.jid.JID>} 955 966 956 967 @param subscriptionIdentifier: Optional subscription identifier. … … 983 994 984 995 @param service: The publish subscribe service that keeps the node. 985 @type service: L{JID }996 @type service: L{JID<twisted.words.protocols.jabber.jid.JID>} 986 997 987 998 @param nodeIdentifier: The identifier of the node. … … 989 1000 990 1001 @param subscriber: The entity subscribed to the node. 991 @type subscriber: L{JID }1002 @type subscriber: L{JID<twisted.words.protocols.jabber.jid.JID>} 992 1003 993 1004 @param options: Subscription options. … … 1022 1033 subscriptions, and sending out notifications. 1023 1034 1024 Methods from the L{IPubSubService} interface that are called as 1025 a result of an XMPP request may raise exceptions. Alternatively the1026 deferred returned by these methods may have their errback called. These are1027 handledas follows:1035 Methods from the L{IPubSubService} interface that are called as a result 1036 of an XMPP request may raise exceptions. Alternatively the deferred 1037 returned by these methods may have their errback called. These are handled 1038 as follows: 1028 1039 1029 1040 - If the exception is an instance of L{error.StanzaError}, an error -
wokkel/subprotocols.py
r165 r166 131 131 @type xmlstream: L{XmlStream} 132 132 @ivar logTraffic: if true, log all traffic. 133 @type logTraffic: L{bool}133 @type logTraffic: C{bool} 134 134 @ivar _initialized: Whether the stream represented by L{xmlstream} has 135 135 been initialized. This is used when caching outgoing … … 320 320 321 321 A request is an IQ L{generic.Stanza} of type C{'get'} or C{'set'}. It 322 will have its C{toElement} called to render to a L{domish.Element} 323 which is then sent out over the current stream. If there is no such 324 stream (yet), it is queued and sent whenever a connection is 325 established and initialized, just like L{send}. 322 will have its C{toElement} called to render to a 323 L{Element<twisted.words.xish.domish.Element>} which is then sent out 324 over the current stream. If there is no such stream (yet), it is queued 325 and sent whenever a connection is established and initialized, just 326 like L{send}. 326 327 327 328 If the request doesn't have an identifier, it will be assigned a fresh 328 329 one, so the response can be tracked. 329 330 330 The deferred that is returned will fire with the L{domish.Element} 331 representation of the response if it is a result iq. If the response 332 is an error iq, a corresponding L{error.StanzaError} will be errbacked. 331 The deferred that is returned will fire with the 332 L{Element<twisted.words.xish.domish.Element>} representation of the 333 response if it is a result iq. If the response is an error iq, a 334 corresponding L{error.StanzaError} will be errbacked. 333 335 334 336 If the connection is closed before a response was received, the deferred … … 336 338 337 339 A request may also have a timeout, either by setting a default timeout 338 in L{StreamManager .timeout} or on the C{timeout} attribute of the339 request.340 in L{StreamManager}'s C{timeout} attribute or on the C{timeout} 341 attribute of the request. 340 342 341 343 @param request: The IQ request. … … 419 421 @cvar iqHandlers: Mapping from XPath queries (as a string) to the method 420 422 name that will handle requests that match the query. 421 @type iqHandlers: L{dict}423 @type iqHandlers: C{dict} 422 424 """ 423 425 -
wokkel/xmppim.py
r165 r166 363 363 subscription and their replies. 364 364 365 Based on L{BasePresence} and {Stanza}, it just uses the L{stanzaType}365 Based on L{BasePresence} and {Stanza}, it just uses the C{stanzaType} 366 366 attribute to represent the type of subscription presence. This can be 367 367 one of C{'subscribe'}, C{'unsubscribe'}, C{'subscribed'} and
Note: See TracChangeset
for help on using the changeset viewer.