C# Class jabber.connection.PubSubNode

Inheritance: jabber.connection.StreamComponent, IEnumerable
Afficher le fichier Open project: codebutler/jabber-net Class Usage Examples

Méthodes publiques

Méthode Description
AddItemAddCallback ( ItemCB callback ) : void

Adds a handler for the OnItemAdd event, and calls the handler for any existing items. To prevent races, use this rather than .OnItemAdd +=.

AutomatedSubscribe ( ) : void

Creates the node then subscribes. If the creation succeeded, or if the node already exists, retrieve the items for the node. This is the typical starting point. Please make sure to register callbacks before calling this function.

Configure ( IqCB callback, object state ) : void

Request configuration form as the owner

Create ( ) : void

Creates the node with default configuration.

Create ( jabber config ) : void

Creates the node using the specified configuration form.

Delete ( ) : void

Deletes the node from the XMPP server.

DeleteItem ( string id ) : void

Deletes a single item from the XMPP server.

GetItems ( ) : void

Gets the items from the node on the XMPP server.

ItemAdded ( PubSubItem item ) : void

Notifies the client that an item has been add to this PubSubNode.

ItemRemoved ( PubSubItem item ) : void

Notifies the client that an item has been removed from this PubSubNode.

PublishItem ( string id, XmlElement contents ) : void

Publishes an item to the node.

Purge ( ) : void

Delete all items from a node at once.

Subscribe ( ) : void

Sends a subscription request. Items request will be sent automatically on successful subscribe.

Unsubscribe ( ) : void

Unsubscribes from the node.

this ( string id ) : XmlElement

Returns the contents of the specified item

Private Methods

Méthode Description
FireError ( Op op, string message, XmlElement protocol ) : void
FireItems ( jabber.protocol.iq.EventItems items ) : void
GetItemsIfPending ( ) : void
GotCreated ( object sender, IQ iq, object state ) : void
GotDelete ( object sender, IQ iq, object data ) : void
GotItems ( object sender, IQ iq, object state ) : void
GotPurge ( object sender, IQ iq, object data ) : void
GotSubscribed ( object sender, IQ iq, object state ) : void
GotUnsubsribed ( object sender, IQ iq, object data ) : void
IEnumerable ( ) : IEnumerator
NeedsAsking ( STATE state ) : bool
OnConfigure ( object sender, IQ iq, object data ) : void
OnDeleteNode ( object sender, IQ iq, object data ) : void
OnPublished ( object sender, IQ iq, object data ) : void
PubSubNode ( jabber.connection.XmppStream stream, JID jid, string node, int maxItems ) : System

Create a Node. Next, call Create and/or Subscribe.

SubscribeIfPending ( ) : void
addInfo ( PubSubIQ iq ) : void
createCommand ( PubSubCommandType type ) : PubSubIQ
this ( Op op ) : STATE

Method Details

AddItemAddCallback() public méthode

Adds a handler for the OnItemAdd event, and calls the handler for any existing items. To prevent races, use this rather than .OnItemAdd +=.
public AddItemAddCallback ( ItemCB callback ) : void
callback ItemCB Callback to call with every item.
Résultat void

AutomatedSubscribe() public méthode

Creates the node then subscribes. If the creation succeeded, or if the node already exists, retrieve the items for the node. This is the typical starting point. Please make sure to register callbacks before calling this function.
public AutomatedSubscribe ( ) : void
Résultat void

Configure() public méthode

Request configuration form as the owner
public Configure ( IqCB callback, object state ) : void
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
Résultat void

Create() public méthode

Creates the node with default configuration.
public Create ( ) : void
Résultat void

Create() public méthode

Creates the node using the specified configuration form.
public Create ( jabber config ) : void
config jabber Null for the default configuration
Résultat void

Delete() public méthode

Deletes the node from the XMPP server.
public Delete ( ) : void
Résultat void

DeleteItem() public méthode

Deletes a single item from the XMPP server.
public DeleteItem ( string id ) : void
id string Id of item.
Résultat void

GetItems() public méthode

Gets the items from the node on the XMPP server.
public GetItems ( ) : void
Résultat void

ItemAdded() public méthode

Notifies the client that an item has been add to this PubSubNode.
public ItemAdded ( PubSubItem item ) : void
item PubSubItem Item that was added.
Résultat void

ItemRemoved() public méthode

Notifies the client that an item has been removed from this PubSubNode.
public ItemRemoved ( PubSubItem item ) : void
item PubSubItem Item that was removed.
Résultat void

PublishItem() public méthode

Publishes an item to the node.
public PublishItem ( string id, XmlElement contents ) : void
id string If null, the server will assign an item ID.
contents System.Xml.XmlElement The XML inside the item. Should be in a new namespace.
Résultat void

Purge() public méthode

Delete all items from a node at once.
public Purge ( ) : void
Résultat void

Subscribe() public méthode

Sends a subscription request. Items request will be sent automatically on successful subscribe.
public Subscribe ( ) : void
Résultat void

Unsubscribe() public méthode

Unsubscribes from the node.
public Unsubscribe ( ) : void
Résultat void

this() public méthode

Returns the contents of the specified item
public this ( string id ) : XmlElement
id string Index of the element to retrieve.
Résultat XmlElement