| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2016 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2016 The WebRTC Project Authors. All rights reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| 11 #ifndef WEBRTC_API_STATS_RTCSTATS_OBJECTS_H_ | 11 #ifndef WEBRTC_API_STATS_RTCSTATS_OBJECTS_H_ |
| 12 #define WEBRTC_API_STATS_RTCSTATS_OBJECTS_H_ | 12 #define WEBRTC_API_STATS_RTCSTATS_OBJECTS_H_ |
| 13 | 13 |
| 14 #include <string> | 14 #include <string> |
| 15 #include <vector> | 15 #include <vector> |
| 16 | 16 |
| 17 #include "webrtc/api/stats/rtcstats.h" | 17 #include "webrtc/api/stats/rtcstats.h" |
| 18 | 18 |
| 19 namespace webrtc { | 19 namespace webrtc { |
| 20 | 20 |
| 21 // https://w3c.github.io/webrtc-pc/#idl-def-rtcdatachannelstate | 21 // https://w3c.github.io/webrtc-pc/#idl-def-rtcdatachannelstate |
| 22 struct RTCDataChannelState { | 22 struct RTCDataChannelState { |
| 23 static const char* kConnecting; | 23 static const char* const kConnecting; |
| 24 static const char* kOpen; | 24 static const char* const kOpen; |
| 25 static const char* kClosing; | 25 static const char* const kClosing; |
| 26 static const char* kClosed; | 26 static const char* const kClosed; |
| 27 }; | 27 }; |
| 28 | 28 |
| 29 // https://w3c.github.io/webrtc-stats/#dom-rtcstatsicecandidatepairstate | 29 // https://w3c.github.io/webrtc-stats/#dom-rtcstatsicecandidatepairstate |
| 30 struct RTCStatsIceCandidatePairState { | 30 struct RTCStatsIceCandidatePairState { |
| 31 static const char* kFrozen; | 31 static const char* const kFrozen; |
| 32 static const char* kWaiting; | 32 static const char* const kWaiting; |
| 33 static const char* kInProgress; | 33 static const char* const kInProgress; |
| 34 static const char* kFailed; | 34 static const char* const kFailed; |
| 35 static const char* kSucceeded; | 35 static const char* const kSucceeded; |
| 36 }; | 36 }; |
| 37 | 37 |
| 38 // https://w3c.github.io/webrtc-pc/#rtcicecandidatetype-enum | 38 // https://w3c.github.io/webrtc-pc/#rtcicecandidatetype-enum |
| 39 struct RTCIceCandidateType { | 39 struct RTCIceCandidateType { |
| 40 static const char* kHost; | 40 static const char* const kHost; |
| 41 static const char* kSrflx; | 41 static const char* const kSrflx; |
| 42 static const char* kPrflx; | 42 static const char* const kPrflx; |
| 43 static const char* kRelay; | 43 static const char* const kRelay; |
| 44 }; | 44 }; |
| 45 | 45 |
| 46 // https://w3c.github.io/webrtc-pc/#idl-def-rtcdtlstransportstate | 46 // https://w3c.github.io/webrtc-pc/#idl-def-rtcdtlstransportstate |
| 47 struct RTCDtlsTransportState { | 47 struct RTCDtlsTransportState { |
| 48 static const char* kNew; | 48 static const char* const kNew; |
| 49 static const char* kConnecting; | 49 static const char* const kConnecting; |
| 50 static const char* kConnected; | 50 static const char* const kConnected; |
| 51 static const char* kClosed; | 51 static const char* const kClosed; |
| 52 static const char* kFailed; | 52 static const char* const kFailed; |
| 53 }; | 53 }; |
| 54 | 54 |
| 55 // |RTCMediaStreamTrackStats::kind| is not an enum in the spec but the only | 55 // |RTCMediaStreamTrackStats::kind| is not an enum in the spec but the only |
| 56 // valid values are "audio" and "video". | 56 // valid values are "audio" and "video". |
| 57 // https://w3c.github.io/webrtc-stats/#dom-rtcmediastreamtrackstats-kind | 57 // https://w3c.github.io/webrtc-stats/#dom-rtcmediastreamtrackstats-kind |
| 58 struct RTCMediaStreamTrackKind { | 58 struct RTCMediaStreamTrackKind { |
| 59 static const char* kAudio; | 59 static const char* const kAudio; |
| 60 static const char* kVideo; | 60 static const char* const kVideo; |
| 61 }; | 61 }; |
| 62 | 62 |
| 63 // https://w3c.github.io/webrtc-stats/#certificatestats-dict* | 63 // https://w3c.github.io/webrtc-stats/#certificatestats-dict* |
| 64 class RTCCertificateStats final : public RTCStats { | 64 class RTCCertificateStats final : public RTCStats { |
| 65 public: | 65 public: |
| 66 WEBRTC_RTCSTATS_DECL(); | 66 WEBRTC_RTCSTATS_DECL(); |
| 67 | 67 |
| 68 RTCCertificateStats(const std::string& id, int64_t timestamp_us); | 68 RTCCertificateStats(const std::string& id, int64_t timestamp_us); |
| 69 RTCCertificateStats(std::string&& id, int64_t timestamp_us); | 69 RTCCertificateStats(std::string&& id, int64_t timestamp_us); |
| 70 RTCCertificateStats(const RTCCertificateStats& other); | 70 RTCCertificateStats(const RTCCertificateStats& other); |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 407 // TODO(hbos): Support enum types? "RTCStatsMember<RTCDtlsTransportState>"? | 407 // TODO(hbos): Support enum types? "RTCStatsMember<RTCDtlsTransportState>"? |
| 408 RTCStatsMember<std::string> dtls_state; | 408 RTCStatsMember<std::string> dtls_state; |
| 409 RTCStatsMember<std::string> selected_candidate_pair_id; | 409 RTCStatsMember<std::string> selected_candidate_pair_id; |
| 410 RTCStatsMember<std::string> local_certificate_id; | 410 RTCStatsMember<std::string> local_certificate_id; |
| 411 RTCStatsMember<std::string> remote_certificate_id; | 411 RTCStatsMember<std::string> remote_certificate_id; |
| 412 }; | 412 }; |
| 413 | 413 |
| 414 } // namespace webrtc | 414 } // namespace webrtc |
| 415 | 415 |
| 416 #endif // WEBRTC_API_STATS_RTCSTATS_OBJECTS_H_ | 416 #endif // WEBRTC_API_STATS_RTCSTATS_OBJECTS_H_ |
| OLD | NEW |