We announced a new communications product, Hangouts, in May 2013. Hangouts will replace Google Talk and does not support XMPP.

PresencePushTask Class

An XMPP helper class that monitors for presence notifications sent by the server. When they are received, they send a signal with the status information wrapped in a class. To receive these messages, connect to the SignalStatusUpdate signal. You should use this class to monitor when another user goes offline. If the client has a session with a user that has gone offline without sending a termination message, you can either send a notification to the user ("Jim has gone offline") or end the session. The methods shown are not thread-safe, and can be called on any thread, but you should call them from the signaling thread.


class PresencePushTask : public XmppTask


The following table lists the important public methods of PresencePushTask.

Name Description
bool HandleStanza() Returns a boolean value indicating whether or not this is a presence stanza and can be handled by this class.
PresencePushTask(Task* parent) Constructor. The parent parameter is the XmppClient object created by the application.
virtual int ProcessStart() Called this method to start listening for messages.


SignalStatusUpdate< const buzz::Status& >
Sent when a status message is received about another user.


Attributes: public

Declaration file: talk/examples/login/presencepushtask.h