gloox 1.0
|
This is an abstraction of a LastActivity Query that can be used in XEP-0012 as well as XEP-0256. More...
#include <lastactivity.h>
Public Member Functions | |
Query (const Tag *tag=0) | |
Query (const std::string &status, long seconds) | |
virtual | ~Query () |
long | seconds () const |
const std::string & | status () const |
virtual const std::string & | filterString () const |
virtual StanzaExtension * | newInstance (const Tag *tag) const |
virtual Tag * | tag () const |
virtual StanzaExtension * | clone () const |
This is an abstraction of a LastActivity Query that can be used in XEP-0012 as well as XEP-0256.
XEP-Version: 2.0 (XEP-0012) XEP-Version: 0.1 (XEP-0256)
Definition at line 52 of file lastactivity.h.
Constructs a new Query object from the given Tag.
tag | The Tag to parse. |
Definition at line 28 of file lastactivity.cpp.
Query | ( | const std::string & | status, |
long | seconds | ||
) |
Constructs a new Query object from the given long.
status | A status message. |
seconds | The number of seconds since last activity. |
Definition at line 40 of file lastactivity.cpp.
~Query | ( | ) | [virtual] |
Virtual destructor.
Definition at line 46 of file lastactivity.cpp.
virtual StanzaExtension* clone | ( | ) | const [inline, virtual] |
Returns an identical copy of the current StanzaExtension.
Implements StanzaExtension.
Definition at line 100 of file lastactivity.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.
Implements StanzaExtension.
Definition at line 50 of file lastactivity.cpp.
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 ); }
Implements StanzaExtension.
Definition at line 91 of file lastactivity.h.
long seconds | ( | ) | const [inline] |
Returns the number of seconds since last activity.
Definition at line 78 of file lastactivity.h.
const std::string& status | ( | ) | const [inline] |
Returns the last status message if the user is offline and specified a status message when logging off.
Definition at line 85 of file lastactivity.h.
Tag * tag | ( | ) | const [virtual] |
Returns a Tag representation of the extension.
Implements StanzaExtension.
Definition at line 57 of file lastactivity.cpp.