#include <lastactivity.h>
Inherits IqHandler.
Inheritance diagram for LastActivity:
Public Member Functions | |
LastActivity (ClientBase *parent, Disco *disco) | |
virtual | ~LastActivity () |
void | query (const JID &jid) |
void | registerLastActivityHandler (LastActivityHandler *lah) |
void | removeLastActivityHandler () |
void | resetIdleTimer () |
virtual bool | handleIqID (Stanza *stanza, int context) |
virtual bool | handleIq (Stanza *stanza) |
LastActivity can be used to query remote entities about their last activity time as well as answer incoming last-activity-queries.
Definition at line 37 of file lastactivity.h.
|
Constructs a new LastActivity object. Definition at line 26 of file lastactivity.cpp. References Disco::addFeature(). |
|
Virtual destructor. Definition at line 33 of file lastactivity.cpp. |
|
Reimplement this function if you want to be notified about incoming IQs.
Implements IqHandler. Definition at line 52 of file lastactivity.cpp. References Tag::addAttrib(), Stanza::from(), JID::full(), Stanza::id(), ClientBase::send(), gloox::STANZA_IQ_GET, and Stanza::subtype(). |
|
Reimplement this function if you want to be notified about incoming IQs with a specific value of the
Implements IqHandler. Definition at line 96 of file lastactivity.cpp. References Stanza::error(), Tag::findAttribute(), Tag::findChild(), Stanza::from(), LastActivityHandler::handleLastActivityError(), LastActivityHandler::handleLastActivityResult(), gloox::STANZA_IQ_ERROR, gloox::STANZA_IQ_RESULT, and Stanza::subtype(). |
|
Queries the given JID for their last activity. The result can be received by reimplementing LastActivityHandler::handleLastActivityResult() and LastActivityHandler::handleLastActivityError(). Definition at line 37 of file lastactivity.cpp. References Tag::addAttrib(), JID::full(), ClientBase::getID(), ClientBase::send(), and ClientBase::trackID(). |
|
Use this function to register an object as handler for incoming results of Last-Activity queries. Only one handler is possible at a time.
Definition at line 63 of file lastactivity.h. |
|
Use this function to un-register the LastActivityHandler set earlier. Definition at line 68 of file lastactivity.h. |
|
Use this function to reset the idle timer. By default the number of seconds since the instantiation will be used. Definition at line 121 of file lastactivity.cpp. |