blob: 1f96bcd9dc88e6d151b161094b048b48b5252d92 [file] [log] [blame]
hbosd565b732016-08-30 14:04:35 -07001/*
2 * Copyright 2016 The WebRTC Project Authors. All rights reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
hbos74e1a4f2016-09-15 23:33:01 -070011#ifndef WEBRTC_API_STATS_RTCSTATS_OBJECTS_H_
12#define WEBRTC_API_STATS_RTCSTATS_OBJECTS_H_
hbosd565b732016-08-30 14:04:35 -070013
14#include <string>
15
hbos74e1a4f2016-09-15 23:33:01 -070016#include "webrtc/api/stats/rtcstats.h"
hbosd565b732016-08-30 14:04:35 -070017
18namespace webrtc {
19
hboscc555c52016-10-18 12:48:31 -070020// https://w3c.github.io/webrtc-pc/#idl-def-rtcdatachannelstate
21struct RTCDataChannelState {
22 static const char* kConnecting;
23 static const char* kOpen;
24 static const char* kClosing;
25 static const char* kClosed;
26};
27
hbosc47a0c32016-10-11 14:54:49 -070028// https://w3c.github.io/webrtc-stats/#dom-rtcstatsicecandidatepairstate
29struct RTCStatsIceCandidatePairState {
30 static const char* kFrozen;
31 static const char* kWaiting;
32 static const char* kInProgress;
33 static const char* kFailed;
34 static const char* kSucceeded;
hbosc47a0c32016-10-11 14:54:49 -070035};
36
hboscc555c52016-10-18 12:48:31 -070037// https://w3c.github.io/webrtc-pc/#rtcicecandidatetype-enum
hbosab9f6e42016-10-07 02:18:47 -070038struct RTCIceCandidateType {
39 static const char* kHost;
40 static const char* kSrflx;
41 static const char* kPrflx;
42 static const char* kRelay;
43};
44
hbos7064d592017-01-16 07:38:02 -080045// https://w3c.github.io/webrtc-pc/#idl-def-rtcdtlstransportstate
46struct RTCDtlsTransportState {
47 static const char* kNew;
48 static const char* kConnecting;
49 static const char* kConnected;
50 static const char* kClosed;
51 static const char* kFailed;
52};
53
hbos2fa7c672016-10-24 04:00:05 -070054// https://w3c.github.io/webrtc-stats/#certificatestats-dict*
55class RTCCertificateStats final : public RTCStats {
56 public:
57 WEBRTC_RTCSTATS_DECL();
58
59 RTCCertificateStats(const std::string& id, int64_t timestamp_us);
60 RTCCertificateStats(std::string&& id, int64_t timestamp_us);
61 RTCCertificateStats(const RTCCertificateStats& other);
62 ~RTCCertificateStats() override;
63
64 RTCStatsMember<std::string> fingerprint;
65 RTCStatsMember<std::string> fingerprint_algorithm;
66 RTCStatsMember<std::string> base64_certificate;
67 RTCStatsMember<std::string> issuer_certificate_id;
68};
69
hbos0adb8282016-11-23 02:32:06 -080070// https://w3c.github.io/webrtc-stats/#codec-dict*
71// Tracking bug crbug.com/659117
72// TODO(hbos): The present codec ID assignment is not sufficient to support
73// Unified Plan or unbundled connections in all cases. crbug.com/659117
74class RTCCodecStats final : public RTCStats {
75 public:
76 WEBRTC_RTCSTATS_DECL();
77
78 RTCCodecStats(const std::string& id, int64_t timestamp_us);
79 RTCCodecStats(std::string&& id, int64_t timestamp_us);
80 RTCCodecStats(const RTCCodecStats& other);
81 ~RTCCodecStats() override;
82
83 RTCStatsMember<uint32_t> payload_type;
84 RTCStatsMember<std::string> codec;
85 RTCStatsMember<uint32_t> clock_rate;
86 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/659117
87 RTCStatsMember<uint32_t> channels;
88 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/659117
89 RTCStatsMember<std::string> parameters;
90 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/659117
91 RTCStatsMember<std::string> implementation;
92};
93
hbos2fa7c672016-10-24 04:00:05 -070094// https://w3c.github.io/webrtc-stats/#dcstats-dict*
95class RTCDataChannelStats final : public RTCStats {
96 public:
97 WEBRTC_RTCSTATS_DECL();
98
99 RTCDataChannelStats(const std::string& id, int64_t timestamp_us);
100 RTCDataChannelStats(std::string&& id, int64_t timestamp_us);
101 RTCDataChannelStats(const RTCDataChannelStats& other);
102 ~RTCDataChannelStats() override;
103
104 RTCStatsMember<std::string> label;
105 RTCStatsMember<std::string> protocol;
106 RTCStatsMember<int32_t> datachannelid;
107 // TODO(hbos): Support enum types? "RTCStatsMember<RTCDataChannelState>"?
108 RTCStatsMember<std::string> state;
109 RTCStatsMember<uint32_t> messages_sent;
110 RTCStatsMember<uint64_t> bytes_sent;
111 RTCStatsMember<uint32_t> messages_received;
112 RTCStatsMember<uint64_t> bytes_received;
113};
114
115// https://w3c.github.io/webrtc-stats/#candidatepair-dict*
hbos0adb8282016-11-23 02:32:06 -0800116// TODO(hbos): Tracking bug crbug.com/633550
hbos6ded1902016-11-01 01:50:46 -0700117class RTCIceCandidatePairStats final : public RTCStats {
hbosc47a0c32016-10-11 14:54:49 -0700118 public:
119 WEBRTC_RTCSTATS_DECL();
120
121 RTCIceCandidatePairStats(const std::string& id, int64_t timestamp_us);
122 RTCIceCandidatePairStats(std::string&& id, int64_t timestamp_us);
123 RTCIceCandidatePairStats(const RTCIceCandidatePairStats& other);
124 ~RTCIceCandidatePairStats() override;
125
126 RTCStatsMember<std::string> transport_id;
127 RTCStatsMember<std::string> local_candidate_id;
128 RTCStatsMember<std::string> remote_candidate_id;
129 // TODO(hbos): Support enum types?
130 // "RTCStatsMember<RTCStatsIceCandidatePairState>"?
131 RTCStatsMember<std::string> state;
132 RTCStatsMember<uint64_t> priority;
hbos5d79a7c2016-10-24 09:27:10 -0700133 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/633550
hbosc47a0c32016-10-11 14:54:49 -0700134 RTCStatsMember<bool> nominated;
hbos5d79a7c2016-10-24 09:27:10 -0700135 // TODO(hbos): Collected by |RTCStatsCollector| but different than the spec.
136 // crbug.com/633550
hbosc47a0c32016-10-11 14:54:49 -0700137 RTCStatsMember<bool> writable;
hbos5d79a7c2016-10-24 09:27:10 -0700138 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/633550
hbosc47a0c32016-10-11 14:54:49 -0700139 RTCStatsMember<bool> readable;
140 RTCStatsMember<uint64_t> bytes_sent;
141 RTCStatsMember<uint64_t> bytes_received;
hbos5d79a7c2016-10-24 09:27:10 -0700142 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/633550
hbos3168c7a2016-12-15 06:17:08 -0800143 RTCStatsMember<double> total_round_trip_time;
hbos5d79a7c2016-10-24 09:27:10 -0700144 // TODO(hbos): Collected by |RTCStatsCollector| but different than the spec.
145 // crbug.com/633550
hbos3168c7a2016-12-15 06:17:08 -0800146 RTCStatsMember<double> current_round_trip_time;
hbos5d79a7c2016-10-24 09:27:10 -0700147 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/633550
hbosc47a0c32016-10-11 14:54:49 -0700148 RTCStatsMember<double> available_outgoing_bitrate;
hbos5d79a7c2016-10-24 09:27:10 -0700149 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/633550
hbosc47a0c32016-10-11 14:54:49 -0700150 RTCStatsMember<double> available_incoming_bitrate;
151 RTCStatsMember<uint64_t> requests_received;
152 RTCStatsMember<uint64_t> requests_sent;
153 RTCStatsMember<uint64_t> responses_received;
154 RTCStatsMember<uint64_t> responses_sent;
hbos5d79a7c2016-10-24 09:27:10 -0700155 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/633550
hbosc47a0c32016-10-11 14:54:49 -0700156 RTCStatsMember<uint64_t> retransmissions_received;
hbos5d79a7c2016-10-24 09:27:10 -0700157 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/633550
hbosc47a0c32016-10-11 14:54:49 -0700158 RTCStatsMember<uint64_t> retransmissions_sent;
hbos5d79a7c2016-10-24 09:27:10 -0700159 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/633550
hbosc47a0c32016-10-11 14:54:49 -0700160 RTCStatsMember<uint64_t> consent_requests_received;
161 RTCStatsMember<uint64_t> consent_requests_sent;
hbos5d79a7c2016-10-24 09:27:10 -0700162 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/633550
hbosc47a0c32016-10-11 14:54:49 -0700163 RTCStatsMember<uint64_t> consent_responses_received;
hbos5d79a7c2016-10-24 09:27:10 -0700164 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/633550
hbosc47a0c32016-10-11 14:54:49 -0700165 RTCStatsMember<uint64_t> consent_responses_sent;
166};
167
hbosab9f6e42016-10-07 02:18:47 -0700168// https://w3c.github.io/webrtc-stats/#icecandidate-dict*
hbos5d79a7c2016-10-24 09:27:10 -0700169// TODO(hbos): |RTCStatsCollector| only collects candidates that are part of
170// ice candidate pairs, but there could be candidates not paired with anything.
171// crbug.com/632723
hbosab9f6e42016-10-07 02:18:47 -0700172class RTCIceCandidateStats : public RTCStats {
173 public:
174 WEBRTC_RTCSTATS_DECL();
175
176 RTCIceCandidateStats(const RTCIceCandidateStats& other);
177 ~RTCIceCandidateStats() override;
178
hbosb4e426e2017-01-02 09:59:31 -0800179 RTCStatsMember<std::string> transport_id;
hbosc3a2b7f2017-01-02 04:46:15 -0800180 RTCStatsMember<bool> is_remote;
hbosab9f6e42016-10-07 02:18:47 -0700181 RTCStatsMember<std::string> ip;
182 RTCStatsMember<int32_t> port;
183 RTCStatsMember<std::string> protocol;
184 // TODO(hbos): Support enum types? "RTCStatsMember<RTCIceCandidateType>"?
185 RTCStatsMember<std::string> candidate_type;
186 RTCStatsMember<int32_t> priority;
hbos5d79a7c2016-10-24 09:27:10 -0700187 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/632723
hbosab9f6e42016-10-07 02:18:47 -0700188 RTCStatsMember<std::string> url;
hbosd17a5a72017-01-02 08:09:59 -0800189 // TODO(hbos): |deleted = true| case is not supported by |RTCStatsCollector|.
190 // crbug.com/632723
191 RTCStatsMember<bool> deleted; // = false
hbosab9f6e42016-10-07 02:18:47 -0700192
193 protected:
hbosc3a2b7f2017-01-02 04:46:15 -0800194 RTCIceCandidateStats(
195 const std::string& id, int64_t timestamp_us, bool is_remote);
196 RTCIceCandidateStats(std::string&& id, int64_t timestamp_us, bool is_remote);
hbosab9f6e42016-10-07 02:18:47 -0700197};
198
199// In the spec both local and remote varieties are of type RTCIceCandidateStats.
200// But here we define them as subclasses of |RTCIceCandidateStats| because the
201// |kType| need to be different ("RTCStatsType type") in the local/remote case.
202// https://w3c.github.io/webrtc-stats/#rtcstatstype-str*
203class RTCLocalIceCandidateStats final : public RTCIceCandidateStats {
204 public:
205 static const char kType[];
206 RTCLocalIceCandidateStats(const std::string& id, int64_t timestamp_us);
207 RTCLocalIceCandidateStats(std::string&& id, int64_t timestamp_us);
208 const char* type() const override;
209};
210
211class RTCRemoteIceCandidateStats final : public RTCIceCandidateStats {
212 public:
213 static const char kType[];
214 RTCRemoteIceCandidateStats(const std::string& id, int64_t timestamp_us);
215 RTCRemoteIceCandidateStats(std::string&& id, int64_t timestamp_us);
216 const char* type() const override;
217};
218
hbos09bc1282016-11-08 06:29:22 -0800219// https://w3c.github.io/webrtc-stats/#msstats-dict*
hbos0adb8282016-11-23 02:32:06 -0800220// TODO(hbos): Tracking bug crbug.com/660827
hbos09bc1282016-11-08 06:29:22 -0800221class RTCMediaStreamStats final : public RTCStats {
222 public:
223 WEBRTC_RTCSTATS_DECL();
224
225 RTCMediaStreamStats(const std::string& id, int64_t timestamp_us);
226 RTCMediaStreamStats(std::string&& id, int64_t timestamp_us);
227 RTCMediaStreamStats(const RTCMediaStreamStats& other);
228 ~RTCMediaStreamStats() override;
229
230 RTCStatsMember<std::string> stream_identifier;
231 RTCStatsMember<std::vector<std::string>> track_ids;
232};
233
234// https://w3c.github.io/webrtc-stats/#mststats-dict*
hbos0adb8282016-11-23 02:32:06 -0800235// TODO(hbos): Tracking bug crbug.com/659137
hbos09bc1282016-11-08 06:29:22 -0800236class RTCMediaStreamTrackStats final : public RTCStats {
237 public:
238 WEBRTC_RTCSTATS_DECL();
239
240 RTCMediaStreamTrackStats(const std::string& id, int64_t timestamp_us);
241 RTCMediaStreamTrackStats(std::string&& id, int64_t timestamp_us);
242 RTCMediaStreamTrackStats(const RTCMediaStreamTrackStats& other);
243 ~RTCMediaStreamTrackStats() override;
244
245 RTCStatsMember<std::string> track_identifier;
246 RTCStatsMember<bool> remote_source;
247 RTCStatsMember<bool> ended;
248 // TODO(hbos): |RTCStatsCollector| does not return stats for detached tracks.
249 // crbug.com/659137
250 RTCStatsMember<bool> detached;
hbos09bc1282016-11-08 06:29:22 -0800251 // Video-only members
252 RTCStatsMember<uint32_t> frame_width;
253 RTCStatsMember<uint32_t> frame_height;
254 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/659137
255 RTCStatsMember<double> frames_per_second;
256 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/659137
257 RTCStatsMember<uint32_t> frames_sent;
258 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/659137
259 RTCStatsMember<uint32_t> frames_received;
260 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/659137
261 RTCStatsMember<uint32_t> frames_decoded;
262 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/659137
263 RTCStatsMember<uint32_t> frames_dropped;
264 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/659137
265 RTCStatsMember<uint32_t> frames_corrupted;
266 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/659137
267 RTCStatsMember<uint32_t> partial_frames_lost;
268 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/659137
269 RTCStatsMember<uint32_t> full_frames_lost;
270 // Audio-only members
271 RTCStatsMember<double> audio_level;
272 RTCStatsMember<double> echo_return_loss;
273 RTCStatsMember<double> echo_return_loss_enhancement;
274};
275
hbos6ab97ce2016-10-03 14:16:56 -0700276// https://w3c.github.io/webrtc-stats/#pcstats-dict*
hbosab9f6e42016-10-07 02:18:47 -0700277class RTCPeerConnectionStats final : public RTCStats {
hbosd565b732016-08-30 14:04:35 -0700278 public:
hbosfc5e0502016-10-06 02:06:10 -0700279 WEBRTC_RTCSTATS_DECL();
280
hbos0e6758d2016-08-31 07:57:36 -0700281 RTCPeerConnectionStats(const std::string& id, int64_t timestamp_us);
282 RTCPeerConnectionStats(std::string&& id, int64_t timestamp_us);
hbosfc5e0502016-10-06 02:06:10 -0700283 RTCPeerConnectionStats(const RTCPeerConnectionStats& other);
284 ~RTCPeerConnectionStats() override;
hbosd565b732016-08-30 14:04:35 -0700285
286 RTCStatsMember<uint32_t> data_channels_opened;
287 RTCStatsMember<uint32_t> data_channels_closed;
288};
289
hbos6ded1902016-11-01 01:50:46 -0700290// https://w3c.github.io/webrtc-stats/#streamstats-dict*
hbos0adb8282016-11-23 02:32:06 -0800291// TODO(hbos): Tracking bug crbug.com/657854
hbos6ded1902016-11-01 01:50:46 -0700292class RTCRTPStreamStats : public RTCStats {
293 public:
294 WEBRTC_RTCSTATS_DECL();
295
296 RTCRTPStreamStats(const RTCRTPStreamStats& other);
297 ~RTCRTPStreamStats() override;
298
299 RTCStatsMember<std::string> ssrc;
300 // TODO(hbos): When the remote case is supported |RTCStatsCollector| needs to
301 // set this. crbug.com/657855, 657856
302 RTCStatsMember<std::string> associate_stats_id;
303 // TODO(hbos): Remote case not supported by |RTCStatsCollector|.
304 // crbug.com/657855, 657856
305 RTCStatsMember<bool> is_remote; // = false
306 RTCStatsMember<std::string> media_type;
hbos6ded1902016-11-01 01:50:46 -0700307 RTCStatsMember<std::string> media_track_id;
308 RTCStatsMember<std::string> transport_id;
hbos6ded1902016-11-01 01:50:46 -0700309 RTCStatsMember<std::string> codec_id;
310 // FIR and PLI counts are only defined for |media_type == "video"|.
311 RTCStatsMember<uint32_t> fir_count;
312 RTCStatsMember<uint32_t> pli_count;
313 // TODO(hbos): NACK count should be collected by |RTCStatsCollector| for both
314 // audio and video but is only defined in the "video" case. crbug.com/657856
315 RTCStatsMember<uint32_t> nack_count;
316 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/657854
317 // SLI count is only defined for |media_type == "video"|.
318 RTCStatsMember<uint32_t> sli_count;
hbos6769c492017-01-02 08:35:13 -0800319 // TODO(hbos): Only collected for the outbound case, should also be collected
320 // for inbound case by |RTCStatsCollector|. crbug.com/657854, crbug.com/657855
321 RTCStatsMember<uint64_t> qp_sum;
hbos6ded1902016-11-01 01:50:46 -0700322
323 protected:
324 RTCRTPStreamStats(const std::string& id, int64_t timestamp_us);
325 RTCRTPStreamStats(std::string&& id, int64_t timestamp_us);
326};
327
hboseeafe942016-11-01 03:00:17 -0700328// https://w3c.github.io/webrtc-stats/#inboundrtpstats-dict*
hbos0adb8282016-11-23 02:32:06 -0800329// Tracking bug crbug.com/657855
330// TODO(hbos): Support the remote case |is_remote = true|. crbug.com/657855
hboseeafe942016-11-01 03:00:17 -0700331class RTCInboundRTPStreamStats final : public RTCRTPStreamStats {
332 public:
333 WEBRTC_RTCSTATS_DECL();
334
335 RTCInboundRTPStreamStats(const std::string& id, int64_t timestamp_us);
336 RTCInboundRTPStreamStats(std::string&& id, int64_t timestamp_us);
337 RTCInboundRTPStreamStats(const RTCInboundRTPStreamStats& other);
338 ~RTCInboundRTPStreamStats() override;
339
340 RTCStatsMember<uint32_t> packets_received;
341 RTCStatsMember<uint64_t> bytes_received;
hboseeafe942016-11-01 03:00:17 -0700342 RTCStatsMember<uint32_t> packets_lost;
343 // TODO(hbos): Not collected in the "video" case by |RTCStatsCollector|.
344 // crbug.com/657855
345 RTCStatsMember<double> jitter;
346 RTCStatsMember<double> fraction_lost;
347 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/657855
348 RTCStatsMember<uint32_t> packets_discarded;
349 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/657855
350 RTCStatsMember<uint32_t> packets_repaired;
351 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/657855
352 RTCStatsMember<uint32_t> burst_packets_lost;
353 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/657855
354 RTCStatsMember<uint32_t> burst_packets_discarded;
355 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/657855
356 RTCStatsMember<uint32_t> burst_loss_count;
357 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/657855
358 RTCStatsMember<uint32_t> burst_discard_count;
359 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/657855
360 RTCStatsMember<double> burst_loss_rate;
361 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/657855
362 RTCStatsMember<double> burst_discard_rate;
363 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/657855
364 RTCStatsMember<double> gap_loss_rate;
365 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/657855
366 RTCStatsMember<double> gap_discard_rate;
hbos6769c492017-01-02 08:35:13 -0800367 RTCStatsMember<uint32_t> frames_decoded;
hboseeafe942016-11-01 03:00:17 -0700368};
369
hbos6ded1902016-11-01 01:50:46 -0700370// https://w3c.github.io/webrtc-stats/#outboundrtpstats-dict*
hbos0adb8282016-11-23 02:32:06 -0800371// Tracking bug crbug.com/657856
372// TODO(hbos): Support the remote case |is_remote = true|. crbug.com/657856
hbos6ded1902016-11-01 01:50:46 -0700373class RTCOutboundRTPStreamStats final : public RTCRTPStreamStats {
374 public:
375 WEBRTC_RTCSTATS_DECL();
376
377 RTCOutboundRTPStreamStats(const std::string& id, int64_t timestamp_us);
378 RTCOutboundRTPStreamStats(std::string&& id, int64_t timestamp_us);
379 RTCOutboundRTPStreamStats(const RTCOutboundRTPStreamStats& other);
380 ~RTCOutboundRTPStreamStats() override;
381
382 RTCStatsMember<uint32_t> packets_sent;
383 RTCStatsMember<uint64_t> bytes_sent;
384 // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/657856
385 RTCStatsMember<double> target_bitrate;
386 RTCStatsMember<double> round_trip_time;
hbos6769c492017-01-02 08:35:13 -0800387 RTCStatsMember<uint32_t> frames_encoded;
hbos6ded1902016-11-01 01:50:46 -0700388};
389
hbos2fa7c672016-10-24 04:00:05 -0700390// https://w3c.github.io/webrtc-stats/#transportstats-dict*
391class RTCTransportStats final : public RTCStats {
392 public:
393 WEBRTC_RTCSTATS_DECL();
394
395 RTCTransportStats(const std::string& id, int64_t timestamp_us);
396 RTCTransportStats(std::string&& id, int64_t timestamp_us);
397 RTCTransportStats(const RTCTransportStats& other);
398 ~RTCTransportStats() override;
399
400 RTCStatsMember<uint64_t> bytes_sent;
401 RTCStatsMember<uint64_t> bytes_received;
402 RTCStatsMember<std::string> rtcp_transport_stats_id;
hbos7064d592017-01-16 07:38:02 -0800403 // TODO(hbos): Support enum types? "RTCStatsMember<RTCDtlsTransportState>"?
404 RTCStatsMember<std::string> dtls_state;
hbos2fa7c672016-10-24 04:00:05 -0700405 RTCStatsMember<std::string> selected_candidate_pair_id;
406 RTCStatsMember<std::string> local_certificate_id;
407 RTCStatsMember<std::string> remote_certificate_id;
408};
409
hbosd565b732016-08-30 14:04:35 -0700410} // namespace webrtc
411
hbos74e1a4f2016-09-15 23:33:01 -0700412#endif // WEBRTC_API_STATS_RTCSTATS_OBJECTS_H_