Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(392)

Side by Side Diff: remoting/protocol/session.h

Issue 1277093006: Enable QUIC support in chromoting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@quic_adapters
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « remoting/protocol/protocol_mock_objects.h ('k') | remoting/protocol/session_config.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_SESSION_H_ 5 #ifndef REMOTING_PROTOCOL_SESSION_H_
6 #define REMOTING_PROTOCOL_SESSION_H_ 6 #define REMOTING_PROTOCOL_SESSION_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "remoting/protocol/errors.h" 10 #include "remoting/protocol/errors.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 // or CLOSED or FAILED. 61 // or CLOSED or FAILED.
62 virtual void OnSessionStateChange(State state) = 0; 62 virtual void OnSessionStateChange(State state) = 0;
63 63
64 // Called whenever route for the channel specified with 64 // Called whenever route for the channel specified with
65 // |channel_name| changes. Session must not be destroyed by the 65 // |channel_name| changes. Session must not be destroyed by the
66 // handler of this event. 66 // handler of this event.
67 virtual void OnSessionRouteChange(const std::string& channel_name, 67 virtual void OnSessionRouteChange(const std::string& channel_name,
68 const TransportRoute& route) = 0; 68 const TransportRoute& route) = 0;
69 }; 69 };
70 70
71
72 Session() {} 71 Session() {}
73 virtual ~Session() {} 72 virtual ~Session() {}
74 73
75 // Set event handler for this session. |event_handler| must outlive 74 // Set event handler for this session. |event_handler| must outlive
76 // this object. 75 // this object.
77 virtual void SetEventHandler(EventHandler* event_handler) = 0; 76 virtual void SetEventHandler(EventHandler* event_handler) = 0;
78 77
79 // Returns error code for a failed session. 78 // Returns error code for a failed session.
80 virtual ErrorCode error() = 0; 79 virtual ErrorCode error() = 0;
81 80
82 // JID of the other side. 81 // JID of the other side.
83 virtual const std::string& jid() = 0; 82 virtual const std::string& jid() = 0;
84 83
85 // Protocol configuration. Can be called only after session has been accepted. 84 // Protocol configuration. Can be called only after session has been accepted.
86 // Returned pointer is valid until connection is closed. 85 // Returned pointer is valid until connection is closed.
87 virtual const SessionConfig& config() = 0; 86 virtual const SessionConfig& config() = 0;
88 87
89 // GetTransportChannelFactory() returns a factory that creates a new transport 88 // GetTransportChannelFactory() returns a factory that creates a new transport
90 // channel for each logical channel. GetMultiplexedChannelFactory() channels 89 // channel for each logical channel. GetMultiplexedChannelFactory() channels
91 // share a single underlying transport channel 90 // share a single underlying transport channel
92 virtual StreamChannelFactory* GetTransportChannelFactory() = 0; 91 virtual StreamChannelFactory* GetTransportChannelFactory() = 0;
93 virtual StreamChannelFactory* GetMultiplexedChannelFactory() = 0; 92 virtual StreamChannelFactory* GetMultiplexedChannelFactory() = 0;
93 virtual StreamChannelFactory* GetQuicChannelFactory() = 0;
94 94
95 // Closes connection. Callbacks are guaranteed not to be called 95 // Closes connection. Callbacks are guaranteed not to be called
96 // after this method returns. Must be called before the object is 96 // after this method returns. Must be called before the object is
97 // destroyed, unless the state is set to FAILED or CLOSED. 97 // destroyed, unless the state is set to FAILED or CLOSED.
98 virtual void Close() = 0; 98 virtual void Close() = 0;
99 99
100 private: 100 private:
101 DISALLOW_COPY_AND_ASSIGN(Session); 101 DISALLOW_COPY_AND_ASSIGN(Session);
102 }; 102 };
103 103
104 } // namespace protocol 104 } // namespace protocol
105 } // namespace remoting 105 } // namespace remoting
106 106
107 #endif // REMOTING_PROTOCOL_SESSION_H_ 107 #endif // REMOTING_PROTOCOL_SESSION_H_
OLDNEW
« no previous file with comments | « remoting/protocol/protocol_mock_objects.h ('k') | remoting/protocol/session_config.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698