C# Класс jabber.connection.PubSubNode

Наследование: jabber.connection.StreamComponent, IEnumerable
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
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

Описание методов

AddItemAddCallback() публичный Метод

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.
Результат void

AutomatedSubscribe() публичный Метод

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
Результат void

Configure() публичный Метод

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
Результат void

Create() публичный Метод

Creates the node with default configuration.
public Create ( ) : void
Результат void

Create() публичный Метод

Creates the node using the specified configuration form.
public Create ( jabber config ) : void
config jabber Null for the default configuration
Результат void

Delete() публичный Метод

Deletes the node from the XMPP server.
public Delete ( ) : void
Результат void

DeleteItem() публичный Метод

Deletes a single item from the XMPP server.
public DeleteItem ( string id ) : void
id string Id of item.
Результат void

GetItems() публичный Метод

Gets the items from the node on the XMPP server.
public GetItems ( ) : void
Результат void

ItemAdded() публичный Метод

Notifies the client that an item has been add to this PubSubNode.
public ItemAdded ( PubSubItem item ) : void
item PubSubItem Item that was added.
Результат void

ItemRemoved() публичный Метод

Notifies the client that an item has been removed from this PubSubNode.
public ItemRemoved ( PubSubItem item ) : void
item PubSubItem Item that was removed.
Результат void

PublishItem() публичный Метод

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.
Результат void

Purge() публичный Метод

Delete all items from a node at once.
public Purge ( ) : void
Результат void

Subscribe() публичный Метод

Sends a subscription request. Items request will be sent automatically on successful subscribe.
public Subscribe ( ) : void
Результат void

Unsubscribe() публичный Метод

Unsubscribes from the node.
public Unsubscribe ( ) : void
Результат void

this() публичный Метод

Returns the contents of the specified item
public this ( string id ) : XmlElement
id string Index of the element to retrieve.
Результат XmlElement