OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 NET_QUIC_CORE_QUIC_SENT_PACKET_MANAGER_INTERFACE_H_ | 5 #ifndef NET_QUIC_CORE_QUIC_SENT_PACKET_MANAGER_INTERFACE_H_ |
6 #define NET_QUIC_CORE_QUIC_SENT_PACKET_MANAGER_INTERFACE_H_ | 6 #define NET_QUIC_CORE_QUIC_SENT_PACKET_MANAGER_INTERFACE_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "net/base/net_export.h" | |
10 #include "net/quic/core/congestion_control/send_algorithm_interface.h" | 9 #include "net/quic/core/congestion_control/send_algorithm_interface.h" |
11 #include "net/quic/core/quic_packets.h" | 10 #include "net/quic/core/quic_packets.h" |
12 #include "net/quic/core/quic_pending_retransmission.h" | 11 #include "net/quic/core/quic_pending_retransmission.h" |
13 #include "net/quic/core/quic_sustained_bandwidth_recorder.h" | 12 #include "net/quic/core/quic_sustained_bandwidth_recorder.h" |
| 13 #include "net/quic/platform/api/quic_export.h" |
14 | 14 |
15 namespace net { | 15 namespace net { |
16 | 16 |
17 class QuicConfig; | 17 class QuicConfig; |
18 class RttStats; | 18 class RttStats; |
19 | 19 |
20 class NET_EXPORT_PRIVATE QuicSentPacketManagerInterface { | 20 class QUIC_EXPORT_PRIVATE QuicSentPacketManagerInterface { |
21 public: | 21 public: |
22 // Interface which gets callbacks from the QuicSentPacketManager at | 22 // Interface which gets callbacks from the QuicSentPacketManager at |
23 // interesting points. Implementations must not mutate the state of | 23 // interesting points. Implementations must not mutate the state of |
24 // the packet manager or connection as a result of these callbacks. | 24 // the packet manager or connection as a result of these callbacks. |
25 class NET_EXPORT_PRIVATE DebugDelegate { | 25 class QUIC_EXPORT_PRIVATE DebugDelegate { |
26 public: | 26 public: |
27 virtual ~DebugDelegate() {} | 27 virtual ~DebugDelegate() {} |
28 | 28 |
29 // Called when a spurious retransmission is detected. | 29 // Called when a spurious retransmission is detected. |
30 virtual void OnSpuriousPacketRetransmission( | 30 virtual void OnSpuriousPacketRetransmission( |
31 TransmissionType transmission_type, | 31 TransmissionType transmission_type, |
32 QuicByteCount byte_size) {} | 32 QuicByteCount byte_size) {} |
33 | 33 |
34 virtual void OnIncomingAck(const QuicAckFrame& ack_frame, | 34 virtual void OnIncomingAck(const QuicAckFrame& ack_frame, |
35 QuicTime ack_receive_time, | 35 QuicTime ack_receive_time, |
36 QuicPacketNumber largest_observed, | 36 QuicPacketNumber largest_observed, |
37 bool rtt_updated, | 37 bool rtt_updated, |
38 QuicPacketNumber least_unacked_sent_packet) {} | 38 QuicPacketNumber least_unacked_sent_packet) {} |
39 | 39 |
40 virtual void OnPacketLoss(QuicPacketNumber lost_packet_number, | 40 virtual void OnPacketLoss(QuicPacketNumber lost_packet_number, |
41 TransmissionType transmission_type, | 41 TransmissionType transmission_type, |
42 QuicTime detection_time) {} | 42 QuicTime detection_time) {} |
43 }; | 43 }; |
44 | 44 |
45 // Interface which gets callbacks from the QuicSentPacketManager when | 45 // Interface which gets callbacks from the QuicSentPacketManager when |
46 // network-related state changes. Implementations must not mutate the | 46 // network-related state changes. Implementations must not mutate the |
47 // state of the packet manager as a result of these callbacks. | 47 // state of the packet manager as a result of these callbacks. |
48 class NET_EXPORT_PRIVATE NetworkChangeVisitor { | 48 class QUIC_EXPORT_PRIVATE NetworkChangeVisitor { |
49 public: | 49 public: |
50 virtual ~NetworkChangeVisitor() {} | 50 virtual ~NetworkChangeVisitor() {} |
51 | 51 |
52 // Called when congestion window or RTT may have changed. | 52 // Called when congestion window or RTT may have changed. |
53 virtual void OnCongestionChange() = 0; | 53 virtual void OnCongestionChange() = 0; |
54 | 54 |
55 // Called with the path may be degrading. Note that the path may only be | 55 // Called with the path may be degrading. Note that the path may only be |
56 // temporarily degrading. | 56 // temporarily degrading. |
57 // TODO(jri): With multipath, this method should probably have a path_id | 57 // TODO(jri): With multipath, this method should probably have a path_id |
58 // parameter, and should maybe result in the path being marked as inactive. | 58 // parameter, and should maybe result in the path being marked as inactive. |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 virtual void OnApplicationLimited() = 0; | 192 virtual void OnApplicationLimited() = 0; |
193 | 193 |
194 // Returns the currently used congestion control algorithm. The manager | 194 // Returns the currently used congestion control algorithm. The manager |
195 // retains the ownership of the algorithm. | 195 // retains the ownership of the algorithm. |
196 virtual const SendAlgorithmInterface* GetSendAlgorithm() const = 0; | 196 virtual const SendAlgorithmInterface* GetSendAlgorithm() const = 0; |
197 }; | 197 }; |
198 | 198 |
199 } // namespace net | 199 } // namespace net |
200 | 200 |
201 #endif // NET_QUIC_CORE_QUIC_SENT_PACKET_MANAGER_INTERFACE_H_ | 201 #endif // NET_QUIC_CORE_QUIC_SENT_PACKET_MANAGER_INTERFACE_H_ |
OLD | NEW |