ChatState Class Reference

`#include <chatstate.h>`

Inheritance diagram for ChatState:
[legend]

## Public Member Functions

| ChatState (const Tag *tag)
| ChatState (ChatStateType state)
virtual | ~ChatState ()
ChatStateType | state () const
virtual const std::string & | filterString () const
virtual StanzaExtension * | newInstance (const Tag *tag) const
Tag * | tag () const
virtual StanzaExtension * | clone () const
Public Member Functions inherited from StanzaExtension
| StanzaExtension (int type)
virtual | ~StanzaExtension ()
virtual Stanza * | embeddedStanza () const
virtual Tag * | embeddedTag () const
int | extensionType () const

## Detailed Description

An implementation of Chat State Notifications (XEP-0085) as a StanzaExtension.

Author
  Vincent Thomasset
  Jakob Schröter js@ca.nosp@m.maya.nosp@m..net

Since
  1.0

Definition at line 33 of file chatstate.h.

## Constructor & Destructor Documentation

## ChatState() [1/2]

ChatState | ( | const Tag * | tag | ) |

Constructs a new object from the given Tag.

Parameters

  tag | A Tag to parse.

Definition at line 34 of file chatstate.cpp.

## ChatState() [2/2]

ChatState | ( | ChatStateType | state | ) |

inline

Constructs a new object of the given type.

Parameters

  state | The chat state.

Definition at line 47 of file chatstate.h.

## ~ChatState()

virtual ~ChatState | ( |  | ) |

inline virtual

Virtual destructor.

Definition at line 54 of file chatstate.h.

## Member Function Documentation

## clone()

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 75 of file chatstate.h.

## filterString()

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 42 of file chatstate.cpp.

## newInstance()

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 );
}
gloox::ChatState::tag
Tag * tag() const
Definition chatstate.cpp:53
gloox::StanzaExtension::StanzaExtension
StanzaExtension(int type)
Definition stanzaextension.h:211
gloox::Tag
This is an abstraction of an XML element.
Definition tag.h:47

Returns
  The derived extension's new instance.

Implements StanzaExtension.

Definition at line 66 of file chatstate.h.

## state()

ChatStateType state | ( |  | ) | const

inline

Returns the object's state.

Returns
  The object's state.

Definition at line 60 of file chatstate.h.

## tag()

Tag * tag | ( |  | ) | const

virtual

Returns a Tag representation of the extension.

Returns
  A Tag representation of the extension.

Implements StanzaExtension.

Definition at line 53 of file chatstate.cpp.

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

- chatstate.h
- chatstate.cpp