15 #include "lastactivity.h"
17 #include "discohandler.h"
18 #include "clientbase.h"
20 #include "lastactivityhandler.h"
52 static const std::string filter =
"/iq/query[@xmlns='" +
XMLNS_LAST +
"']"
53 "|/presence/query[@xmlns='" +
XMLNS_LAST +
"']";
59 Tag* t =
new Tag(
"query" );
69 : m_lastActivityHandler( 0 ), m_parent( parent ),
70 m_active( time ( 0 ) )
94 m_parent->
send( iq,
this, 0 );
105 m_parent->
send( re );
112 if( !m_lastActivityHandler )
129 m_active = time( 0 );
This is the common base class for a Jabber/XMPP Client and a Jabber Component.
const std::string getID()
virtual Disco * disco() const
void removeIqHandler(IqHandler *ih, int exttype)
void removeIDHandler(IqHandler *ih)
void registerIqHandler(IqHandler *ih, int exttype)
void registerStanzaExtension(StanzaExtension *ext)
void removeFeature(const std::string &feature)
void addFeature(const std::string &feature)
StanzaError error() const
An abstraction of an IQ stanza.
virtual void handleLastActivityResult(const JID &jid, long seconds, const std::string &status)=0
virtual void handleLastActivityError(const JID &jid, StanzaError error)=0
This is an abstraction of a LastActivity Query that can be used in XEP-0012 as well as XEP-0256.
virtual const std::string & filterString() const
const std::string & status() const
virtual Tag * tag() const
virtual void handleIqID(const IQ &iq, int context)
virtual bool handleIq(const IQ &iq)
LastActivity(ClientBase *parent)
void query(const JID &jid)
This class abstracts a stanza extension, which is usually an XML child element in a specific namespac...
void addExtension(const StanzaExtension *se)
const Error * error() const
const std::string & id() const
const StanzaExtension * findExtension(int type) const
This is an abstraction of an XML element.
bool setCData(const std::string &cdata)
const std::string xmlns() const
bool addAttribute(Attribute *attr)
bool hasAttribute(const std::string &name, const std::string &value=EmptyString) const
const std::string cdata() const
const std::string & findAttribute(const std::string &name) const
const std::string & name() const
bool setXmlns(const std::string &xmlns, const std::string &prefix=EmptyString)
The namespace for the gloox library.
const std::string XMLNS_LAST
const std::string EmptyString