C# Class jabber.connection.PubSubManager

Inheritance: jabber.connection.StreamComponent
Mostrar archivo Open project: codebutler/jabber-net Class Usage Examples

Public Methods

Method Description
AddNodeHandler ( string node, ItemCB addCB, ItemCB removeCB, int maxNumber ) : void

Add a handler for all inbound notifications with the given node name. This is handy for PEP implicit subscriptions.

GetDefaults ( JID service, IqCB callback, object state ) : void

Get the default configuration of the node.

GetNode ( JID service, string node, int maxItems ) : PubSubNode

Subscribes to a publish-subscribe node.

PubSubManager ( ) : System

Creates a manager.

PubSubManager ( IContainer container ) : System

Creates a manager in a container.

RemoveNode ( JID service, string node, bedrock errorHandler ) : void

Removes the publish-subscribe node from the manager and sends a delete node to the XMPP server.

RemoveNodeHandler ( string node, ItemCB cb ) : void

Remove an existing callback.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Performs tasks associated with freeing, releasing, or resetting resources.

Private Methods

Method Description
InitializeComponent ( ) : void

Required method for Designer support - do not modify the contents of this method with the code editor.

OnDefaults ( object sender, IQ iq, object data ) : void
PubSubManager_OnStreamChanged ( object sender ) : void
m_stream_OnProtocol ( object sender, XmlElement rp ) : void

Method Details

AddNodeHandler() public method

Add a handler for all inbound notifications with the given node name. This is handy for PEP implicit subscriptions.
public AddNodeHandler ( string node, ItemCB addCB, ItemCB removeCB, int maxNumber ) : void
node string PEP node URI
addCB ItemCB Callback when items added
removeCB ItemCB Callbacks when items removed
maxNumber int Maximum number of items to store per node in this namespace
return void

Dispose() protected method

Performs tasks associated with freeing, releasing, or resetting resources.
protected Dispose ( bool disposing ) : void
disposing bool True if managed resources should be disposed; otherwise, false.
return void

GetDefaults() public method

Get the default configuration of the node.
public GetDefaults ( JID service, IqCB callback, object state ) : void
service JID JID of the pub/sub service
callback IqCB Callback. Must not be null. Will not be called back /// if there is an error, but instead OnError will be called.
state object State information to be passed back to callback
return void

GetNode() public method

Subscribes to a publish-subscribe node.
public GetNode ( JID service, string node, int maxItems ) : PubSubNode
service JID Component that handles PubSub requests.
node string The node on the component that the client wants to interact with.
maxItems int Maximum number of items to retain. First one to call Subscribe gets their value, for now.
return PubSubNode

PubSubManager() public method

Creates a manager.
public PubSubManager ( ) : System
return System

PubSubManager() public method

Creates a manager in a container.
public PubSubManager ( IContainer container ) : System
container IContainer Parent container.
return System

RemoveNode() public method

Removes the publish-subscribe node from the manager and sends a delete node to the XMPP server.
public RemoveNode ( JID service, string node, bedrock errorHandler ) : void
service JID /// Component that handles PubSub requests. ///
node string /// The node on the component that the client wants to interact with. ///
errorHandler bedrock /// Callback for any errors with the publish-subscribe node deletion. ///
return void

RemoveNodeHandler() public method

Remove an existing callback.
public RemoveNodeHandler ( string node, ItemCB cb ) : void
node string
cb ItemCB
return void