OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef NET_QUIC_QUARTC_QUARTC_FACTORY_INTERFACE_H_ | |
6 #define NET_QUIC_QUARTC_QUARTC_FACTORY_INTERFACE_H_ | |
7 | |
8 #include "net/quic/quartc/quartc_session_interface.h" | |
9 | |
10 namespace net { | |
11 class QuartcFactoryInterface { | |
Ryan Hamilton
2016/09/23 19:56:43
nit: comments and newlines, please.
zhihuang1
2016/09/24 06:54:05
Done.
| |
12 public: | |
13 struct QuartcConfig { | |
14 // Used to determine the perspective of the session. | |
15 bool is_server = false; | |
16 // Used for creating a unique server ID. Only used by the client side. | |
Ryan Hamilton
2016/09/23 19:56:43
The phrasing of this comment is confused to me, bu
zhihuang1
2016/09/24 06:54:05
Done.
| |
17 std::string remote_fingerprint_value; | |
18 // Used for creating a QuartcPacketWriter for QuicConnection which is | |
19 // required when creating a QuartcSession. | |
20 QuartcSessionInterface::Transport* transport = nullptr; | |
21 }; | |
22 | |
23 virtual std::unique_ptr<QuartcSessionInterface> CreateQuartcSession( | |
24 const QuartcConfig& quartc_config) = 0; | |
Ryan Hamilton
2016/09/23 19:56:43
Can you comment on the ownership of quartc_config.
zhihuang1
2016/09/24 06:54:05
Done.
| |
25 }; | |
26 | |
27 // Creates a new instance of QuartcFactoryInterface. | |
28 std::unique_ptr<QuartcFactoryInterface> CreateQuartcFactory(); | |
29 | |
30 } // namepace net | |
31 | |
32 #endif // NET_QUIC_QUARTC_QUARTC_FACTORY_INTERFACE_H_ | |
OLD | NEW |