Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | Related Pages

Event Class Reference

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

#include <pubsubevent.h>

Inherits StanzaExtension.

Inheritance diagram for Event:

Inheritance graph
[legend]
List of all members.

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

Classes

struct  ItemOperation

Detailed Description

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

Author:
Vincent Thomasset <vthomasset@gmail.com>
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:
event A 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:
node The node's ID for which the notification is sent.
type The 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:
op An 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 [inline, virtual]
 

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

 StanzaExtension* FooExtension::newInstance( const Tag* tag ) const
 {
   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:
Generated on Sat Oct 31 19:54:43 2009 for gloox by  doxygen 1.4.1