Mercurial > libervia-pubsub
view idavoll/disco.py @ 121:4f0113adb7ed
Add Node._check_node_exists() calls to all Node methods, because nodes could
have
been deleted in between calls.
Add Node.get_subscription().
Only fire deferred (with None) on success of Node.add_subscription().
Fix Node.set_configuration() to actually work and only update the Node objects
configuration when the SQL query has succeeded.
Implement Node.remove_subscription().
Implement Node.is_subscribed().
Implement LeafNode methods (unchecked!).
author | Ralph Meijer <ralphm@ik.nu> |
---|---|
date | Tue, 12 Apr 2005 12:26:05 +0000 |
parents | 6c0cc9c6caea |
children | ea8b4189ae3b |
line wrap: on
line source
from twisted.xish import domish NS = 'http://jabber.org/protocol/disco' NS_INFO = NS + '#info' NS_ITEMS = NS + '#items' class Feature(domish.Element): def __init__(self, feature): domish.Element.__init__(self, (NS_INFO, 'feature'), attribs={'var': feature}) class Identity(domish.Element): def __init__(self, category, type, name = None): domish.Element.__init__(self, (NS_INFO, 'identity'), attribs={'category': category, 'type': type}) if name: self['name'] = name class Item(domish.Element): def __init__(self, jid, node = None, name = None): domish.Element.__init__(self, (NS_ITEMS, 'item'), attribs={'jid': jid}) if node: self['node'] = node if name: self['name'] = name