gloox  1.0.9
Public Types | Public Member Functions | List of all members
Receipt Class Reference

#include <receipt.h>

Inheritance diagram for Receipt:
Inheritance graph
[legend]

Public Types

enum  ReceiptType { Request, Received, Invalid }

Public Member Functions

 Receipt (const Tag *tag)
 Receipt (ReceiptType rcpt, const std::string &id=EmptyString)
virtual ~Receipt ()
ReceiptType rcpt () const
std::string id () const
virtual const std::string & filterString () const
virtual StanzaExtensionnewInstance (const Tag *tag) const
Tagtag () const
virtual StanzaExtensionclone () const
- Public Member Functions inherited from StanzaExtension
 StanzaExtension (int type)
virtual ~StanzaExtension ()
virtual StanzaembeddedStanza () const
virtual TagembeddedTag () const
int extensionType () const

Detailed Description

An implementation of Message Receipts (XEP-0184) as a StanzaExtension.

Author
Jakob Schroeter js@ca.nosp@m.maya.nosp@m..net
Since
1.0

Definition at line 32 of file receipt.h.

Member Enumeration Documentation

Contains valid receipt types (XEP-0184).

Enumerator:
Request 

Requests a receipt.

Received 

The receipt.

Invalid 

Invalid type.

Definition at line 38 of file receipt.h.

Constructor & Destructor Documentation

Receipt ( const Tag tag)

Constructs a new object from the given Tag.

Parameters
tagA Tag to parse.

Definition at line 31 of file receipt.cpp.

Receipt ( ReceiptType  rcpt,
const std::string &  id = EmptyString 
)
inline

Constructs a new object of the given type.

Parameters
rcptThe receipt type.
idThe message ID.

Definition at line 56 of file receipt.h.

virtual ~Receipt ( )
inlinevirtual

Virtual destructor.

Definition at line 63 of file receipt.h.

Member Function Documentation

virtual StanzaExtension* clone ( ) const
inlinevirtual

Returns an identical copy of the current StanzaExtension.

Returns
An identical copy of the current StanzaExtension.

Implements StanzaExtension.

Definition at line 90 of file receipt.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 41 of file receipt.cpp.

std::string id ( ) const
inline

Returns the message id for acknowledgement tracking.

Returns
The message ID for acknowledgement tracking.

Definition at line 75 of file receipt.h.

virtual 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 81 of file receipt.h.

ReceiptType rcpt ( ) const
inline

Returns the object's state.

Returns
The object's state.

Definition at line 69 of file receipt.h.

Tag * tag ( ) const
virtual

Returns a Tag representation of the extension.

Returns
A Tag representation of the extension.

Implements StanzaExtension.

Definition at line 49 of file receipt.cpp.


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