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

XmppPump Class

A top-level manager class for the XMPP Messaging Component. This class creates an XmppClient object and handles signing in to a server for you. See Signing In To a Server for sample code using this.


class XmppPump : public cricket::MessageHandler, 
                 public buzz::TaskRunner


Name Description
XmppPump(XmppPumpNotify * notify) Constructor.
  • notify   Pointer to an object that will receive progress notifications in its OnStateChange method.
buzz::XmppClient *client() Returns the internal XmppClient member.
void DoLogin(const buzz::XmppClientSettings & xcs, buzz::AsyncSocket* socket, buzz::PreXmppAuth* auth); Starts asynchronous sign in to the server specified. You must catch the XmppClient::SignalStateChange signal to track progress.
  • xcs   Settings for the connection, including host name, password, and sign-in name.
  • socket   A socket to handle the connection. For signing on to a XMPP server, create a new XmppSocket object.
  • auth   Optional authorization information for signing in, such as captcha informatin, authorization cookies, and so on. If not using, specify 0 (zero).
void DoDisconnect(); Disconnects from the server and sends notifications on the progress, similar to DoLogin.
void OnStateChange(buzz::XmppEngine::State state); Called with notifications about the progress of the sign-in attempt. You can override this method if extending this class.
void WakeTasks(); Called internally.
int64 CurrentTime(); Called internally.
void OnMessage(cricket::Message *pmsg); Called internally with asynchronous messages.
buzz::XmppReturnStatus SendStanza(const buzz::XmlElement *stanza); Sends a stanza out through the XmppClient member.


Attributes: public

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