OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_SIGNALING_XMPP_SIGNAL_STRATEGY_H_ | 10 #ifndef REMOTING_SIGNALING_XMPP_SIGNAL_STRATEGY_H_ |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 std::string auth_service; | 53 std::string auth_service; |
54 }; | 54 }; |
55 | 55 |
56 XmppSignalStrategy( | 56 XmppSignalStrategy( |
57 net::ClientSocketFactory* socket_factory, | 57 net::ClientSocketFactory* socket_factory, |
58 scoped_refptr<net::URLRequestContextGetter> request_context_getter, | 58 scoped_refptr<net::URLRequestContextGetter> request_context_getter, |
59 const XmppServerConfig& xmpp_server_config); | 59 const XmppServerConfig& xmpp_server_config); |
60 virtual ~XmppSignalStrategy(); | 60 virtual ~XmppSignalStrategy(); |
61 | 61 |
62 // SignalStrategy interface. | 62 // SignalStrategy interface. |
63 virtual void Connect() OVERRIDE; | 63 virtual void Connect() override; |
64 virtual void Disconnect() OVERRIDE; | 64 virtual void Disconnect() override; |
65 virtual State GetState() const OVERRIDE; | 65 virtual State GetState() const override; |
66 virtual Error GetError() const OVERRIDE; | 66 virtual Error GetError() const override; |
67 virtual std::string GetLocalJid() const OVERRIDE; | 67 virtual std::string GetLocalJid() const override; |
68 virtual void AddListener(Listener* listener) OVERRIDE; | 68 virtual void AddListener(Listener* listener) override; |
69 virtual void RemoveListener(Listener* listener) OVERRIDE; | 69 virtual void RemoveListener(Listener* listener) override; |
70 virtual bool SendStanza(scoped_ptr<buzz::XmlElement> stanza) OVERRIDE; | 70 virtual bool SendStanza(scoped_ptr<buzz::XmlElement> stanza) override; |
71 virtual std::string GetNextId() OVERRIDE; | 71 virtual std::string GetNextId() override; |
72 | 72 |
73 // buzz::XmppStanzaHandler interface. | 73 // buzz::XmppStanzaHandler interface. |
74 virtual bool HandleStanza(const buzz::XmlElement* stanza) OVERRIDE; | 74 virtual bool HandleStanza(const buzz::XmlElement* stanza) override; |
75 | 75 |
76 // This method is used to update the auth info (for example when the OAuth | 76 // This method is used to update the auth info (for example when the OAuth |
77 // access token is renewed). It is OK to call this even when we are in the | 77 // access token is renewed). It is OK to call this even when we are in the |
78 // CONNECTED state. It will be used on the next Connect() call. | 78 // CONNECTED state. It will be used on the next Connect() call. |
79 void SetAuthInfo(const std::string& username, | 79 void SetAuthInfo(const std::string& username, |
80 const std::string& auth_token, | 80 const std::string& auth_token, |
81 const std::string& auth_service); | 81 const std::string& auth_service); |
82 | 82 |
83 // Use this method to override the default resource name used (optional). | 83 // Use this method to override the default resource name used (optional). |
84 // This will be used on the next Connect() call. | 84 // This will be used on the next Connect() call. |
(...skipping 21 matching lines...) Expand all Loading... |
106 ObserverList<Listener, true> listeners_; | 106 ObserverList<Listener, true> listeners_; |
107 | 107 |
108 base::RepeatingTimer<XmppSignalStrategy> keep_alive_timer_; | 108 base::RepeatingTimer<XmppSignalStrategy> keep_alive_timer_; |
109 | 109 |
110 DISALLOW_COPY_AND_ASSIGN(XmppSignalStrategy); | 110 DISALLOW_COPY_AND_ASSIGN(XmppSignalStrategy); |
111 }; | 111 }; |
112 | 112 |
113 } // namespace remoting | 113 } // namespace remoting |
114 | 114 |
115 #endif // REMOTING_SIGNALING_XMPP_SIGNAL_STRATEGY_H_ | 115 #endif // REMOTING_SIGNALING_XMPP_SIGNAL_STRATEGY_H_ |
OLD | NEW |