| 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 #ifndef REMOTING_PROTOCOL_JINGLE_SESSION_H_ | 5 #ifndef REMOTING_PROTOCOL_JINGLE_SESSION_H_ |
| 6 #define REMOTING_PROTOCOL_JINGLE_SESSION_H_ | 6 #define REMOTING_PROTOCOL_JINGLE_SESSION_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 // Jingle protocol used in Chromoting. Instances of this class are | 39 // Jingle protocol used in Chromoting. Instances of this class are |
| 40 // created by the JingleSessionManager. | 40 // created by the JingleSessionManager. |
| 41 class JingleSession : public base::NonThreadSafe, | 41 class JingleSession : public base::NonThreadSafe, |
| 42 public Session, | 42 public Session, |
| 43 public DatagramChannelFactory, | 43 public DatagramChannelFactory, |
| 44 public Transport::EventHandler { | 44 public Transport::EventHandler { |
| 45 public: | 45 public: |
| 46 virtual ~JingleSession(); | 46 virtual ~JingleSession(); |
| 47 | 47 |
| 48 // Session interface. | 48 // Session interface. |
| 49 virtual void SetEventHandler(Session::EventHandler* event_handler) OVERRIDE; | 49 virtual void SetEventHandler(Session::EventHandler* event_handler) override; |
| 50 virtual ErrorCode error() OVERRIDE; | 50 virtual ErrorCode error() override; |
| 51 virtual const std::string& jid() OVERRIDE; | 51 virtual const std::string& jid() override; |
| 52 virtual const CandidateSessionConfig* candidate_config() OVERRIDE; | 52 virtual const CandidateSessionConfig* candidate_config() override; |
| 53 virtual const SessionConfig& config() OVERRIDE; | 53 virtual const SessionConfig& config() override; |
| 54 virtual void set_config(const SessionConfig& config) OVERRIDE; | 54 virtual void set_config(const SessionConfig& config) override; |
| 55 virtual StreamChannelFactory* GetTransportChannelFactory() OVERRIDE; | 55 virtual StreamChannelFactory* GetTransportChannelFactory() override; |
| 56 virtual StreamChannelFactory* GetMultiplexedChannelFactory() OVERRIDE; | 56 virtual StreamChannelFactory* GetMultiplexedChannelFactory() override; |
| 57 virtual void Close() OVERRIDE; | 57 virtual void Close() override; |
| 58 | 58 |
| 59 // DatagramChannelFactory interface. | 59 // DatagramChannelFactory interface. |
| 60 virtual void CreateChannel(const std::string& name, | 60 virtual void CreateChannel(const std::string& name, |
| 61 const ChannelCreatedCallback& callback) OVERRIDE; | 61 const ChannelCreatedCallback& callback) override; |
| 62 virtual void CancelChannelCreation(const std::string& name) OVERRIDE; | 62 virtual void CancelChannelCreation(const std::string& name) override; |
| 63 | 63 |
| 64 // Transport::EventHandler interface. | 64 // Transport::EventHandler interface. |
| 65 virtual void OnTransportCandidate( | 65 virtual void OnTransportCandidate( |
| 66 Transport* transport, | 66 Transport* transport, |
| 67 const cricket::Candidate& candidate) OVERRIDE; | 67 const cricket::Candidate& candidate) override; |
| 68 virtual void OnTransportRouteChange(Transport* transport, | 68 virtual void OnTransportRouteChange(Transport* transport, |
| 69 const TransportRoute& route) OVERRIDE; | 69 const TransportRoute& route) override; |
| 70 virtual void OnTransportFailed(Transport* transport) OVERRIDE; | 70 virtual void OnTransportFailed(Transport* transport) override; |
| 71 virtual void OnTransportDeleted(Transport* transport) OVERRIDE; | 71 virtual void OnTransportDeleted(Transport* transport) override; |
| 72 | 72 |
| 73 private: | 73 private: |
| 74 friend class JingleSessionManager; | 74 friend class JingleSessionManager; |
| 75 | 75 |
| 76 typedef std::map<std::string, Transport*> ChannelsMap; | 76 typedef std::map<std::string, Transport*> ChannelsMap; |
| 77 typedef base::Callback<void(JingleMessageReply::ErrorType)> ReplyCallback; | 77 typedef base::Callback<void(JingleMessageReply::ErrorType)> ReplyCallback; |
| 78 | 78 |
| 79 explicit JingleSession(JingleSessionManager* session_manager); | 79 explicit JingleSession(JingleSessionManager* session_manager); |
| 80 | 80 |
| 81 // Start connection by sending session-initiate message. | 81 // Start connection by sending session-initiate message. |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 | 183 |
| 184 base::WeakPtrFactory<JingleSession> weak_factory_; | 184 base::WeakPtrFactory<JingleSession> weak_factory_; |
| 185 | 185 |
| 186 DISALLOW_COPY_AND_ASSIGN(JingleSession); | 186 DISALLOW_COPY_AND_ASSIGN(JingleSession); |
| 187 }; | 187 }; |
| 188 | 188 |
| 189 } // namespace protocol | 189 } // namespace protocol |
| 190 } // namespace remoting | 190 } // namespace remoting |
| 191 | 191 |
| 192 #endif // REMOTING_PROTOCOL_JINGLE_SESSION_H_ | 192 #endif // REMOTING_PROTOCOL_JINGLE_SESSION_H_ |
| OLD | NEW |