| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // The XmppSignalStrategy encapsulates all the logic to perform the signaling | 5 // The XmppSignalStrategy encapsulates all the logic to perform the signaling |
| 6 // STUN/ICE for jingle via a direct XMPP connection. | 6 // STUN/ICE for jingle via a direct XMPP connection. |
| 7 // | 7 // |
| 8 // This class is not threadsafe. | 8 // This class is not threadsafe. |
| 9 | 9 |
| 10 #ifndef REMOTING_JINGLE_GLUE_XMPP_SIGNAL_STRATEGY_H_ | 10 #ifndef REMOTING_JINGLE_GLUE_XMPP_SIGNAL_STRATEGY_H_ |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 XmppSignalStrategy(JingleThread* thread, | 33 XmppSignalStrategy(JingleThread* thread, |
| 34 const std::string& username, | 34 const std::string& username, |
| 35 const std::string& auth_token, | 35 const std::string& auth_token, |
| 36 const std::string& auth_token_service); | 36 const std::string& auth_token_service); |
| 37 virtual ~XmppSignalStrategy(); | 37 virtual ~XmppSignalStrategy(); |
| 38 | 38 |
| 39 // SignalStrategy interface. | 39 // SignalStrategy interface. |
| 40 virtual void Connect() OVERRIDE; | 40 virtual void Connect() OVERRIDE; |
| 41 virtual void Disconnect() OVERRIDE; | 41 virtual void Disconnect() OVERRIDE; |
| 42 virtual State GetState() const OVERRIDE; | 42 virtual State GetState() const OVERRIDE; |
| 43 virtual Error GetError() const OVERRIDE; |
| 43 virtual std::string GetLocalJid() const OVERRIDE; | 44 virtual std::string GetLocalJid() const OVERRIDE; |
| 44 virtual void AddListener(Listener* listener) OVERRIDE; | 45 virtual void AddListener(Listener* listener) OVERRIDE; |
| 45 virtual void RemoveListener(Listener* listener) OVERRIDE; | 46 virtual void RemoveListener(Listener* listener) OVERRIDE; |
| 46 virtual bool SendStanza(scoped_ptr<buzz::XmlElement> stanza) OVERRIDE; | 47 virtual bool SendStanza(scoped_ptr<buzz::XmlElement> stanza) OVERRIDE; |
| 47 virtual std::string GetNextId() OVERRIDE; | 48 virtual std::string GetNextId() OVERRIDE; |
| 48 | 49 |
| 49 // buzz::XmppStanzaHandler interface. | 50 // buzz::XmppStanzaHandler interface. |
| 50 virtual bool HandleStanza(const buzz::XmlElement* stanza) OVERRIDE; | 51 virtual bool HandleStanza(const buzz::XmlElement* stanza) OVERRIDE; |
| 51 | 52 |
| 52 // This method is used to update the auth info (for example when the OAuth | 53 // This method is used to update the auth info (for example when the OAuth |
| (...skipping 18 matching lines...) Expand all Loading... |
| 71 | 72 |
| 72 JingleThread* thread_; | 73 JingleThread* thread_; |
| 73 | 74 |
| 74 std::string username_; | 75 std::string username_; |
| 75 std::string auth_token_; | 76 std::string auth_token_; |
| 76 std::string auth_token_service_; | 77 std::string auth_token_service_; |
| 77 std::string resource_name_; | 78 std::string resource_name_; |
| 78 buzz::XmppClient* xmpp_client_; | 79 buzz::XmppClient* xmpp_client_; |
| 79 | 80 |
| 80 State state_; | 81 State state_; |
| 82 Error error_; |
| 81 | 83 |
| 82 ObserverList<Listener> listeners_; | 84 ObserverList<Listener, true> listeners_; |
| 83 | 85 |
| 84 base::RepeatingTimer<XmppSignalStrategy> keep_alive_timer_; | 86 base::RepeatingTimer<XmppSignalStrategy> keep_alive_timer_; |
| 85 | 87 |
| 86 DISALLOW_COPY_AND_ASSIGN(XmppSignalStrategy); | 88 DISALLOW_COPY_AND_ASSIGN(XmppSignalStrategy); |
| 87 }; | 89 }; |
| 88 | 90 |
| 89 } // namespace remoting | 91 } // namespace remoting |
| 90 | 92 |
| 91 #endif // REMOTING_JINGLE_GLUE_XMPP_SIGNAL_STRATEGY_H_ | 93 #endif // REMOTING_JINGLE_GLUE_XMPP_SIGNAL_STRATEGY_H_ |
| OLD | NEW |