OLD | NEW |
(Empty) | |
| 1 // Copyright 2004 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef WEBRTC_LIBJINGLE_XMPP_XMPPTHREAD_H_ |
| 6 #define WEBRTC_LIBJINGLE_XMPP_XMPPTHREAD_H_ |
| 7 |
| 8 #include "third_party/libjingle_xmpp/xmpp/xmppclientsettings.h" |
| 9 #include "third_party/libjingle_xmpp/xmpp/xmppengine.h" |
| 10 #include "third_party/libjingle_xmpp/xmpp/xmpppump.h" |
| 11 #include "third_party/libjingle_xmpp/xmpp/xmppsocket.h" |
| 12 #include "webrtc/base/thread.h" |
| 13 |
| 14 namespace buzz { |
| 15 |
| 16 class XmppThread: |
| 17 public rtc::Thread, buzz::XmppPumpNotify, rtc::MessageHandler { |
| 18 public: |
| 19 XmppThread(); |
| 20 ~XmppThread(); |
| 21 |
| 22 buzz::XmppClient* client() { return pump_->client(); } |
| 23 |
| 24 void ProcessMessages(int cms); |
| 25 |
| 26 void Login(const buzz::XmppClientSettings & xcs); |
| 27 void Disconnect(); |
| 28 |
| 29 private: |
| 30 buzz::XmppPump* pump_; |
| 31 |
| 32 void OnStateChange(buzz::XmppEngine::State state); |
| 33 void OnMessage(rtc::Message* pmsg); |
| 34 }; |
| 35 |
| 36 } // namespace buzz |
| 37 |
| 38 #endif // WEBRTC_LIBJINGLE_XMPP_XMPPTHREAD_H_ |
| 39 |
OLD | NEW |