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 <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 typedef base::Callback<void(JingleMessageReply::ErrorType)> ReplyCallback; | 51 typedef base::Callback<void(JingleMessageReply::ErrorType)> ReplyCallback; |
52 | 52 |
53 explicit JingleSession(JingleSessionManager* session_manager); | 53 explicit JingleSession(JingleSessionManager* session_manager); |
54 | 54 |
55 // Start connection by sending session-initiate message. | 55 // Start connection by sending session-initiate message. |
56 void StartConnection(const SignalingAddress& peer_address, | 56 void StartConnection(const SignalingAddress& peer_address, |
57 std::unique_ptr<Authenticator> authenticator); | 57 std::unique_ptr<Authenticator> authenticator); |
58 | 58 |
59 // Called by JingleSessionManager for incoming connections. | 59 // Called by JingleSessionManager for incoming connections. |
60 void InitializeIncomingConnection( | 60 void InitializeIncomingConnection( |
| 61 const std::string& message_id, |
61 const JingleMessage& initiate_message, | 62 const JingleMessage& initiate_message, |
62 std::unique_ptr<Authenticator> authenticator); | 63 std::unique_ptr<Authenticator> authenticator); |
63 void AcceptIncomingConnection(const JingleMessage& initiate_message); | 64 void AcceptIncomingConnection(const JingleMessage& initiate_message); |
64 | 65 |
65 // Callback for Transport interface to send transport-info messages. | 66 // Callback for Transport interface to send transport-info messages. |
66 void SendTransportInfo(std::unique_ptr<buzz::XmlElement> transport_info); | 67 void SendTransportInfo(std::unique_ptr<buzz::XmlElement> transport_info); |
67 | 68 |
68 // Sends |message| to the peer. The session is closed if the send fails or no | 69 // Sends |message| to the peer. The session is closed if the send fails or no |
69 // response is received within a reasonable time. All other responses are | 70 // response is received within a reasonable time. All other responses are |
70 // ignored. | 71 // ignored. |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 | 185 |
185 base::WeakPtrFactory<JingleSession> weak_factory_; | 186 base::WeakPtrFactory<JingleSession> weak_factory_; |
186 | 187 |
187 DISALLOW_COPY_AND_ASSIGN(JingleSession); | 188 DISALLOW_COPY_AND_ASSIGN(JingleSession); |
188 }; | 189 }; |
189 | 190 |
190 } // namespace protocol | 191 } // namespace protocol |
191 } // namespace remoting | 192 } // namespace remoting |
192 | 193 |
193 #endif // REMOTING_PROTOCOL_JINGLE_SESSION_H_ | 194 #endif // REMOTING_PROTOCOL_JINGLE_SESSION_H_ |
OLD | NEW |