gloox 1.0
Public Member Functions
LastActivity::Query Class Reference

This is an abstraction of a LastActivity Query that can be used in XEP-0012 as well as XEP-0256. More...

#include <lastactivity.h>

Inheritance diagram for LastActivity::Query:
Inheritance graph
[legend]

List of all members.

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 StanzaExtensionnewInstance (const Tag *tag) const
virtual Tagtag () const
virtual StanzaExtensionclone () const

Detailed Description

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)

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

Definition at line 52 of file lastactivity.h.


Constructor & Destructor Documentation

Query ( const Tag tag = 0)

Constructs a new Query object from the given Tag.

Parameters:
tagThe 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.

Parameters:
statusA status message.
secondsThe 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.


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 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.

Returns:
The extension's filter string.

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 );
 }
Returns:
The derived extension's new instance.

Implements StanzaExtension.

Definition at line 91 of file lastactivity.h.

long seconds ( ) const [inline]

Returns the number of seconds since last activity.

Returns:
The number of seconds since last activity. -1 if last activity is unknown.

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.

Returns:
The last status message, if any.

Definition at line 85 of file lastactivity.h.

Tag * tag ( ) const [virtual]

Returns a Tag representation of the extension.

Returns:
A Tag representation of the extension.

Implements StanzaExtension.

Definition at line 57 of file lastactivity.cpp.


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