2 * Copyright 2004 The WebRTC Project Authors. All rights reserved.
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
11 #ifndef WEBRTC_LIBJINGLE_XMPP_XMPPTHREAD_H_
12 #define WEBRTC_LIBJINGLE_XMPP_XMPPTHREAD_H_
14 #include "webrtc/libjingle/xmpp/xmppclientsettings.h"
15 #include "webrtc/libjingle/xmpp/xmppengine.h"
16 #include "webrtc/libjingle/xmpp/xmpppump.h"
17 #include "webrtc/libjingle/xmpp/xmppsocket.h"
18 #include "webrtc/base/thread.h"
23 public rtc::Thread, buzz::XmppPumpNotify, rtc::MessageHandler {
28 buzz::XmppClient* client() { return pump_->client(); }
30 void ProcessMessages(int cms);
32 void Login(const buzz::XmppClientSettings & xcs);
36 buzz::XmppPump* pump_;
38 void OnStateChange(buzz::XmppEngine::State state);
39 void OnMessage(rtc::Message* pmsg);
44 #endif // WEBRTC_LIBJINGLE_XMPP_XMPPTHREAD_H_