DelayedDelivery Class Reference

This is an implementation of XEP-0203 (Delayed Delivery). More...

#include <delayeddelivery.h>

Inherits gloox::StanzaExtension.

List of all members.

Public Member Functions

 DelayedDelivery (const JID &from, const std::string stamp, const std::string &reason="")
 DelayedDelivery (const Tag *tag=0)
virtual ~DelayedDelivery ()
const std::string & stamp () const
void setStamp (const std::string &stamp)
const JIDfrom () const
void setFrom (const JID &from)
const std::string & reason () const
void setReason (const std::string &reason)
virtual const std::string & filterString () const
virtual StanzaExtensionnewInstance (const Tag *tag) const
virtual Tagtag () const
virtual StanzaExtensionclone () const

Detailed Description

This is an implementation of XEP-0203 (Delayed Delivery).

The class also implements the deprecated XEP-0091 (Delayed Delivery) in a read-only fashion. It understands both XEP formats for input, but any output will conform to XEP-0203.

XEP Version: 0.1

Author:
Jakob Schroeter <js@camaya.net>
Since:
0.9

Definition at line 38 of file delayeddelivery.h.


Constructor & Destructor Documentation

DelayedDelivery ( const JID from,
const std::string  stamp,
const std::string &  reason = "" 
)

Constructs a new object and fills it according to the parameters.

Parameters:
from The JID of the original sender or the entity that delayed the sending.
stamp The datetime stamp of the original send.
reason An optional natural language reason for the delay.

Definition at line 21 of file delayeddelivery.cpp.

DelayedDelivery ( const Tag tag = 0  ) 

Constructs a new object from the given Tag.

Parameters:
tag The Tag to parse.

Definition at line 29 of file delayeddelivery.cpp.

~DelayedDelivery (  )  [virtual]

Virtual Destructor.

Definition at line 44 of file delayeddelivery.cpp.


Member Function Documentation

virtual StanzaExtension* clone (  )  const [inline, virtual]

Returns an identical copy of the current StanzaExtension.

Returns:
An identical copy of the current StanzaExtension.

Implements StanzaExtension.

Definition at line 116 of file delayeddelivery.h.

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 48 of file delayeddelivery.cpp.

const JID& from (  )  const [inline]

Returns the JID of the original sender of the stanza or the entity that delayed the sending. The format MUST adhere to the dateTime format specified in XEP-0082 and MUST be expressed in UTC.

Returns:
The JID.

Definition at line 83 of file delayeddelivery.h.

virtual 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 107 of file delayeddelivery.h.

const std::string& reason (  )  const [inline]

Returns a natural language reason for the delay.

Returns:
A natural language reason for the delay.

Definition at line 95 of file delayeddelivery.h.

void setFrom ( const JID from  )  [inline]

Sets the JID of the origianl sender or the entity that delayed the sending.

Parameters:
from The JID.

Definition at line 89 of file delayeddelivery.h.

void setReason ( const std::string &  reason  )  [inline]

Sets the reason for the delay.

Parameters:
reason The reason for the delay.

Definition at line 101 of file delayeddelivery.h.

void setStamp ( const std::string &  stamp  )  [inline]

Sets the original datetime.

Parameters:
stamp The original datetime.

Definition at line 74 of file delayeddelivery.h.

const std::string& stamp (  )  const [inline]

Returns the datetime when the stanza was originally sent. The format MUST adhere to the dateTime format specified in XEP-0082 and MUST be expressed in UTC.

Returns:
The original datetime.

Definition at line 68 of file delayeddelivery.h.

Tag * tag (  )  const [virtual]

Returns a Tag representation of the extension.

Returns:
A Tag representation of the extension.

Implements StanzaExtension.

Definition at line 58 of file delayeddelivery.cpp.


The documentation for this class was generated from the following files:
Generated on Tue Jun 8 23:37:56 2010 for gloox by  doxygen 1.6.3