| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_PEPPER_SESSION_MANAGER_H_ | 5 #ifndef REMOTING_PROTOCOL_PEPPER_SESSION_MANAGER_H_ |
| 6 #define REMOTING_PROTOCOL_PEPPER_SESSION_MANAGER_H_ | 6 #define REMOTING_PROTOCOL_PEPPER_SESSION_MANAGER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <list> | 9 #include <list> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 namespace buzz { | 23 namespace buzz { |
| 24 class XmlElement; | 24 class XmlElement; |
| 25 } // namespace buzz | 25 } // namespace buzz |
| 26 | 26 |
| 27 namespace talk_base { | 27 namespace talk_base { |
| 28 class SocketAddress; | 28 class SocketAddress; |
| 29 } // namespace talk_base | 29 } // namespace talk_base |
| 30 | 30 |
| 31 namespace remoting { | 31 namespace remoting { |
| 32 | 32 |
| 33 class IqSender; |
| 33 class JingleInfoRequest; | 34 class JingleInfoRequest; |
| 34 | 35 |
| 35 namespace protocol { | 36 namespace protocol { |
| 36 | 37 |
| 37 struct JingleMessage; | 38 struct JingleMessage; |
| 38 struct JingleMessageReply; | 39 struct JingleMessageReply; |
| 39 class PepperSession; | 40 class PepperSession; |
| 40 | 41 |
| 41 // This class implements SessionManager interface on top of the Pepper | 42 // This class implements SessionManager interface on top of the Pepper |
| 42 // P2P Transport API. | 43 // P2P Transport API. |
| (...skipping 24 matching lines...) Expand all Loading... |
| 67 private: | 68 private: |
| 68 friend class PepperSession; | 69 friend class PepperSession; |
| 69 | 70 |
| 70 typedef std::map<std::string, PepperSession*> SessionsMap; | 71 typedef std::map<std::string, PepperSession*> SessionsMap; |
| 71 | 72 |
| 72 void OnJingleInfo( | 73 void OnJingleInfo( |
| 73 const std::string& relay_token, | 74 const std::string& relay_token, |
| 74 const std::vector<std::string>& relay_hosts, | 75 const std::vector<std::string>& relay_hosts, |
| 75 const std::vector<talk_base::SocketAddress>& stun_hosts); | 76 const std::vector<talk_base::SocketAddress>& stun_hosts); |
| 76 | 77 |
| 77 IqRequest* CreateIqRequest(); | 78 IqSender* iq_sender() { return iq_sender_.get(); } |
| 78 void SendReply(const buzz::XmlElement* original_stanza, | 79 void SendReply(const buzz::XmlElement* original_stanza, |
| 79 const JingleMessageReply& reply); | 80 const JingleMessageReply& reply); |
| 80 | 81 |
| 81 // Called by PepperSession when it is being destroyed. | 82 // Called by PepperSession when it is being destroyed. |
| 82 void SessionDestroyed(PepperSession* session); | 83 void SessionDestroyed(PepperSession* session); |
| 83 | 84 |
| 84 pp::Instance* pp_instance_; | 85 pp::Instance* pp_instance_; |
| 85 | 86 |
| 86 std::string local_jid_; | 87 std::string local_jid_; |
| 87 SignalStrategy* signal_strategy_; | 88 SignalStrategy* signal_strategy_; |
| 89 scoped_ptr<IqSender> iq_sender_; |
| 88 SessionManager::Listener* listener_; | 90 SessionManager::Listener* listener_; |
| 89 scoped_ptr<crypto::RSAPrivateKey> private_key_; | 91 scoped_ptr<crypto::RSAPrivateKey> private_key_; |
| 90 std::string certificate_; | 92 std::string certificate_; |
| 91 bool allow_nat_traversal_; | 93 bool allow_nat_traversal_; |
| 92 | 94 |
| 93 TransportConfig transport_config_; | 95 TransportConfig transport_config_; |
| 94 | 96 |
| 95 scoped_ptr<JingleInfoRequest> jingle_info_request_; | 97 scoped_ptr<JingleInfoRequest> jingle_info_request_; |
| 96 | 98 |
| 97 SessionsMap sessions_; | 99 SessionsMap sessions_; |
| 98 | 100 |
| 99 DISALLOW_COPY_AND_ASSIGN(PepperSessionManager); | 101 DISALLOW_COPY_AND_ASSIGN(PepperSessionManager); |
| 100 }; | 102 }; |
| 101 | 103 |
| 102 } // namespace protocol | 104 } // namespace protocol |
| 103 } // namespace remoting | 105 } // namespace remoting |
| 104 | 106 |
| 105 #endif // REMOTING_PROTOCOL_PEPPER_SESSION_MANAGER_H_ | 107 #endif // REMOTING_PROTOCOL_PEPPER_SESSION_MANAGER_H_ |
| OLD | NEW |