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_H_ | 5 #ifndef REMOTING_PROTOCOL_PEPPER_SESSION_H_ |
6 #define REMOTING_PROTOCOL_PEPPER_SESSION_H_ | 6 #define REMOTING_PROTOCOL_PEPPER_SESSION_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 private: | 59 private: |
60 friend class PepperSessionManager; | 60 friend class PepperSessionManager; |
61 friend class PepperStreamChannel; | 61 friend class PepperStreamChannel; |
62 | 62 |
63 typedef std::map<std::string, PepperChannel*> ChannelsMap; | 63 typedef std::map<std::string, PepperChannel*> ChannelsMap; |
64 | 64 |
65 explicit PepperSession(PepperSessionManager* session_manager); | 65 explicit PepperSession(PepperSessionManager* session_manager); |
66 | 66 |
67 // Start cs connection by sending session-initiate message. | 67 // Start cs connection by sending session-initiate message. |
68 void StartConnection(const std::string& peer_jid, | 68 void StartConnection(const std::string& peer_jid, |
69 Authenticator* authenticator, | 69 scoped_ptr<Authenticator> authenticator, |
70 CandidateSessionConfig* config, | 70 scoped_ptr<CandidateSessionConfig> config, |
71 const StateChangeCallback& state_change_callback); | 71 const StateChangeCallback& state_change_callback); |
72 | 72 |
73 // Handler for session-initiate response. | 73 // Handler for session-initiate response. |
74 void OnSessionInitiateResponse(const buzz::XmlElement* response); | 74 void OnSessionInitiateResponse(const buzz::XmlElement* response); |
75 | 75 |
76 // Called when an error occurs. Sets |error_| and closes the session. | 76 // Called when an error occurs. Sets |error_| and closes the session. |
77 void OnError(Error error); | 77 void OnError(Error error); |
78 | 78 |
79 // Called by PepperSessionManager on incoming |message|. Must fill | 79 // Called by PepperSessionManager on incoming |message|. Must fill |
80 // in |reply|. | 80 // in |reply|. |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 base::OneShotTimer<PepperSession> transport_infos_timer_; | 128 base::OneShotTimer<PepperSession> transport_infos_timer_; |
129 std::list<cricket::Candidate> pending_candidates_; | 129 std::list<cricket::Candidate> pending_candidates_; |
130 | 130 |
131 DISALLOW_COPY_AND_ASSIGN(PepperSession); | 131 DISALLOW_COPY_AND_ASSIGN(PepperSession); |
132 }; | 132 }; |
133 | 133 |
134 } // namespace protocol | 134 } // namespace protocol |
135 } // namespace remoting | 135 } // namespace remoting |
136 | 136 |
137 #endif // REMOTING_PROTOCOL_PEPPER_SESSION_H_ | 137 #endif // REMOTING_PROTOCOL_PEPPER_SESSION_H_ |
OLD | NEW |