| 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_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 "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/task.h" | 9 #include "base/task.h" |
| 10 #include "net/base/completion_callback.h" | 10 #include "net/base/completion_callback.h" |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 void CloseInternal(int result, Error error); | 67 void CloseInternal(int result, Error error); |
| 68 | 68 |
| 69 bool HasSession(cricket::Session* cricket_session); | 69 bool HasSession(cricket::Session* cricket_session); |
| 70 cricket::Session* ReleaseSession(); | 70 cricket::Session* ReleaseSession(); |
| 71 | 71 |
| 72 // Initialize the session configuration from a received connection response | 72 // Initialize the session configuration from a received connection response |
| 73 // stanza. | 73 // stanza. |
| 74 bool InitializeConfigFromDescription( | 74 bool InitializeConfigFromDescription( |
| 75 const cricket::SessionDescription* description); | 75 const cricket::SessionDescription* description); |
| 76 | 76 |
| 77 // Used for Session.SignalState sigslot. | 77 // Handlers for |cricket_session_| signals. |
| 78 void OnSessionState(cricket::BaseSession* session, | 78 void OnSessionState(cricket::BaseSession* session, |
| 79 cricket::BaseSession::State state); | 79 cricket::BaseSession::State state); |
| 80 // Used for Session.SignalError sigslot. | |
| 81 void OnSessionError(cricket::BaseSession* session, | 80 void OnSessionError(cricket::BaseSession* session, |
| 82 cricket::BaseSession::Error error); | 81 cricket::BaseSession::Error error); |
| 83 // Used for Session.SignalReceivedTerminateReason sigslot. | 82 void OnSessionInfoMessage(cricket::Session* session, |
| 84 void OnTerminateReason(cricket::Session* session, const std::string& reason); | 83 const buzz::XmlElement* message); |
| 84 void OnTerminateReason(cricket::Session* session, |
| 85 const std::string& reason); |
| 85 | 86 |
| 86 void OnInitiate(); | 87 void OnInitiate(); |
| 87 void OnAccept(); | 88 void OnAccept(); |
| 88 void OnTerminate(); | 89 void OnTerminate(); |
| 89 | 90 |
| 90 // Notifies upper layer about incoming connection and | 91 // Notifies upper layer about incoming connection and |
| 91 // accepts/rejects connection. | 92 // accepts/rejects connection. |
| 92 void AcceptConnection(); | 93 void AcceptConnection(); |
| 93 | 94 |
| 95 void ProcessAuthenticationStep(); |
| 96 |
| 94 void AddChannelConnector(const std::string& name, | 97 void AddChannelConnector(const std::string& name, |
| 95 JingleChannelConnector* connector); | 98 JingleChannelConnector* connector); |
| 96 | 99 |
| 97 // Called by JingleChannelConnector when it has finished connecting | 100 // Called by JingleChannelConnector when it has finished connecting |
| 98 // the channel, to remove itself from the table of pending connectors. The | 101 // the channel, to remove itself from the table of pending connectors. The |
| 99 // connector assumes responsibility for destroying itself after this call. | 102 // connector assumes responsibility for destroying itself after this call. |
| 100 void OnChannelConnectorFinished(const std::string& name, | 103 void OnChannelConnectorFinished(const std::string& name, |
| 101 JingleChannelConnector* connector); | 104 JingleChannelConnector* connector); |
| 102 | 105 |
| 103 const cricket::ContentInfo* GetContentInfo() const; | 106 const cricket::ContentInfo* GetContentInfo() const; |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 ScopedRunnableMethodFactory<JingleSession> task_factory_; | 148 ScopedRunnableMethodFactory<JingleSession> task_factory_; |
| 146 | 149 |
| 147 DISALLOW_COPY_AND_ASSIGN(JingleSession); | 150 DISALLOW_COPY_AND_ASSIGN(JingleSession); |
| 148 }; | 151 }; |
| 149 | 152 |
| 150 } // namespace protocol | 153 } // namespace protocol |
| 151 | 154 |
| 152 } // namespace remoting | 155 } // namespace remoting |
| 153 | 156 |
| 154 #endif // REMOTING_PROTOCOL_JINGLE_SESSION_H_ | 157 #endif // REMOTING_PROTOCOL_JINGLE_SESSION_H_ |
| OLD | NEW |