gloox  1.0
Classes | Public Types | Public Member Functions | List of all members
Event Class Reference

#include <pubsubevent.h>

Inheritance diagram for Event:
Inheritance graph
[legend]

Classes

struct  ItemOperation

Public Types

typedef std::list
< ItemOperation * > 
ItemOperationList

Public Member Functions

 Event (const Tag *event)
 Event (const std::string &node, PubSub::EventType type)
virtual ~Event ()
PubSub::EventType type () const
const StringListsubscriptions () const
const ItemOperationListitems () const
void addItem (ItemOperation *op)
const std::string & node () const
const JIDjid ()
bool subscription ()
const std::string & filterString () const
StanzaExtensionnewInstance (const Tag *tag) const
Tagtag () const
virtual StanzaExtensionclone () const
- Public Member Functions inherited from StanzaExtension
 StanzaExtension (int type)
virtual ~StanzaExtension ()
int extensionType () const

Detailed Description

This is an implementation of a PubSub Notification as a StanzaExtension.

Author
Vincent Thomasset vthom.nosp@m.asse.nosp@m.t@gma.nosp@m.il.c.nosp@m.om
Since
1.0

Definition at line 34 of file pubsubevent.h.

Member Typedef Documentation

typedef std::list<ItemOperation*> ItemOperationList

A list of ItemOperations.

Definition at line 69 of file pubsubevent.h.

Constructor & Destructor Documentation

Event ( const Tag event)

PubSub event notification Stanza Extension.

Parameters
eventA tag to parse.

Definition at line 39 of file pubsubevent.cpp.

Event ( const std::string &  node,
PubSub::EventType  type 
)

PubSub event notification Stanza Extension.

Parameters
nodeThe node's ID for which the notification is sent.
typeThe event's type.

Definition at line 141 of file pubsubevent.cpp.

~Event ( )
virtual

Virtual destructor.

Definition at line 150 of file pubsubevent.cpp.

Member Function Documentation

void addItem ( ItemOperation op)

Add an item to the list of ItemOperations for EventItems(Retract) notification. After calling, the PubSub::Event object owns the ItemOperation and will free it.

Parameters
opAn ItemOperation to add.

Definition at line 166 of file pubsubevent.cpp.

StanzaExtension * clone ( ) const
virtual

Returns an identical copy of the current StanzaExtension.

Returns
An identical copy of the current StanzaExtension.

Implements StanzaExtension.

Definition at line 257 of file pubsubevent.cpp.

const std::string & filterString ( ) const
virtual

Returns an XPath expression that describes a path to child elements of a stanza that an extension handles.

Returns
The extension's filter string.

Implements StanzaExtension.

Definition at line 174 of file pubsubevent.cpp.

const ItemOperationList& items ( ) const
inline

Returns the list of ItemOperations for EventItems(Retract) notification.

Returns
The list of ItemOperations.

Definition at line 107 of file pubsubevent.h.

const JID& jid ( )
inline

Returns the subscribe/unsubscribed JID. Only set for subscription notifications (type() == EventSubscription).

Returns
The affected JID.

Definition at line 128 of file pubsubevent.h.

StanzaExtension* newInstance ( const Tag tag) const
inlinevirtual

Returns a new Instance of the derived type. Usually, for a derived class FooExtension, the implementation of this function looks like:

{
return new FooExtension( tag );
}
Returns
The derived extension's new instance.

Implements StanzaExtension.

Definition at line 141 of file pubsubevent.h.

const std::string& node ( ) const
inline

Returns the node's ID for which the notification is sent.

Returns
The node's ID.

Definition at line 121 of file pubsubevent.h.

bool subscription ( )
inline

Returns the subscription state. Only set for subscription notifications (type() == EventSubscription).

Returns
True if the subscription request was approved, false otherwise.

Definition at line 135 of file pubsubevent.h.

const StringList& subscriptions ( ) const
inline

Returns the list of subscription IDs for which this notification is valid.

Returns
The list of subscription IDs.

Definition at line 100 of file pubsubevent.h.

Tag * tag ( ) const
virtual

Returns a Tag representation of the extension.

Returns
A Tag representation of the extension.

Implements StanzaExtension.

Definition at line 180 of file pubsubevent.cpp.

PubSub::EventType type ( ) const
inline

Returns the event's type.

Returns
The event's type.

Definition at line 93 of file pubsubevent.h.


The documentation for this class was generated from the following files: