| 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 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 }; | 28 }; |
| 29 | 29 |
| 30 // https://www.w3.org/TR/webrtc/#rtcicecandidatetype-enum | 30 // https://www.w3.org/TR/webrtc/#rtcicecandidatetype-enum |
| 31 struct RTCIceCandidateType { | 31 struct RTCIceCandidateType { |
| 32 static const char* kHost; | 32 static const char* kHost; |
| 33 static const char* kSrflx; | 33 static const char* kSrflx; |
| 34 static const char* kPrflx; | 34 static const char* kPrflx; |
| 35 static const char* kRelay; | 35 static const char* kRelay; |
| 36 }; | 36 }; |
| 37 | 37 |
| 38 // https://w3c.github.io/webrtc-stats/#certificatestats-dict* |
| 39 class RTCCertificateStats final : public RTCStats { |
| 40 public: |
| 41 WEBRTC_RTCSTATS_DECL(); |
| 42 |
| 43 RTCCertificateStats(const std::string& id, int64_t timestamp_us); |
| 44 RTCCertificateStats(std::string&& id, int64_t timestamp_us); |
| 45 RTCCertificateStats(const RTCCertificateStats& other); |
| 46 ~RTCCertificateStats() override; |
| 47 |
| 48 RTCStatsMember<std::string> fingerprint; |
| 49 RTCStatsMember<std::string> fingerprint_algorithm; |
| 50 RTCStatsMember<std::string> base64_certificate; |
| 51 RTCStatsMember<std::string> issuer_certificate_id; |
| 52 }; |
| 53 |
| 54 // https://w3c.github.io/webrtc-stats/#candidatepair-dict* |
| 55 // TODO(hbos): Finish implementation. Tracking bug crbug.com/633550 |
| 38 class RTCIceCandidatePairStats : public RTCStats { | 56 class RTCIceCandidatePairStats : public RTCStats { |
| 39 public: | 57 public: |
| 40 WEBRTC_RTCSTATS_DECL(); | 58 WEBRTC_RTCSTATS_DECL(); |
| 41 | 59 |
| 42 RTCIceCandidatePairStats(const std::string& id, int64_t timestamp_us); | 60 RTCIceCandidatePairStats(const std::string& id, int64_t timestamp_us); |
| 43 RTCIceCandidatePairStats(std::string&& id, int64_t timestamp_us); | 61 RTCIceCandidatePairStats(std::string&& id, int64_t timestamp_us); |
| 44 RTCIceCandidatePairStats(const RTCIceCandidatePairStats& other); | 62 RTCIceCandidatePairStats(const RTCIceCandidatePairStats& other); |
| 45 ~RTCIceCandidatePairStats() override; | 63 ~RTCIceCandidatePairStats() override; |
| 46 | 64 |
| 47 RTCStatsMember<std::string> transport_id; | 65 RTCStatsMember<std::string> transport_id; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 66 RTCStatsMember<uint64_t> responses_sent; | 84 RTCStatsMember<uint64_t> responses_sent; |
| 67 RTCStatsMember<uint64_t> retransmissions_received; | 85 RTCStatsMember<uint64_t> retransmissions_received; |
| 68 RTCStatsMember<uint64_t> retransmissions_sent; | 86 RTCStatsMember<uint64_t> retransmissions_sent; |
| 69 RTCStatsMember<uint64_t> consent_requests_received; | 87 RTCStatsMember<uint64_t> consent_requests_received; |
| 70 RTCStatsMember<uint64_t> consent_requests_sent; | 88 RTCStatsMember<uint64_t> consent_requests_sent; |
| 71 RTCStatsMember<uint64_t> consent_responses_received; | 89 RTCStatsMember<uint64_t> consent_responses_received; |
| 72 RTCStatsMember<uint64_t> consent_responses_sent; | 90 RTCStatsMember<uint64_t> consent_responses_sent; |
| 73 }; | 91 }; |
| 74 | 92 |
| 75 // https://w3c.github.io/webrtc-stats/#icecandidate-dict* | 93 // https://w3c.github.io/webrtc-stats/#icecandidate-dict* |
| 94 // TODO(hbos): Finish implementation. Tracking bug crbug.com/632723 |
| 76 class RTCIceCandidateStats : public RTCStats { | 95 class RTCIceCandidateStats : public RTCStats { |
| 77 public: | 96 public: |
| 78 WEBRTC_RTCSTATS_DECL(); | 97 WEBRTC_RTCSTATS_DECL(); |
| 79 | 98 |
| 80 RTCIceCandidateStats(const RTCIceCandidateStats& other); | 99 RTCIceCandidateStats(const RTCIceCandidateStats& other); |
| 81 ~RTCIceCandidateStats() override; | 100 ~RTCIceCandidateStats() override; |
| 82 | 101 |
| 83 RTCStatsMember<std::string> ip; | 102 RTCStatsMember<std::string> ip; |
| 84 RTCStatsMember<int32_t> port; | 103 RTCStatsMember<int32_t> port; |
| 85 RTCStatsMember<std::string> protocol; | 104 RTCStatsMember<std::string> protocol; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 106 }; | 125 }; |
| 107 | 126 |
| 108 class RTCRemoteIceCandidateStats final : public RTCIceCandidateStats { | 127 class RTCRemoteIceCandidateStats final : public RTCIceCandidateStats { |
| 109 public: | 128 public: |
| 110 static const char kType[]; | 129 static const char kType[]; |
| 111 RTCRemoteIceCandidateStats(const std::string& id, int64_t timestamp_us); | 130 RTCRemoteIceCandidateStats(const std::string& id, int64_t timestamp_us); |
| 112 RTCRemoteIceCandidateStats(std::string&& id, int64_t timestamp_us); | 131 RTCRemoteIceCandidateStats(std::string&& id, int64_t timestamp_us); |
| 113 const char* type() const override; | 132 const char* type() const override; |
| 114 }; | 133 }; |
| 115 | 134 |
| 116 // https://w3c.github.io/webrtc-stats/#certificatestats-dict* | |
| 117 class RTCCertificateStats final : public RTCStats { | |
| 118 public: | |
| 119 WEBRTC_RTCSTATS_DECL(); | |
| 120 | |
| 121 RTCCertificateStats(const std::string& id, int64_t timestamp_us); | |
| 122 RTCCertificateStats(std::string&& id, int64_t timestamp_us); | |
| 123 RTCCertificateStats(const RTCCertificateStats& other); | |
| 124 ~RTCCertificateStats() override; | |
| 125 | |
| 126 RTCStatsMember<std::string> fingerprint; | |
| 127 RTCStatsMember<std::string> fingerprint_algorithm; | |
| 128 RTCStatsMember<std::string> base64_certificate; | |
| 129 RTCStatsMember<std::string> issuer_certificate_id; | |
| 130 }; | |
| 131 | |
| 132 // https://w3c.github.io/webrtc-stats/#pcstats-dict* | 135 // https://w3c.github.io/webrtc-stats/#pcstats-dict* |
| 133 // TODO(hbos): Tracking bug crbug.com/636818 | 136 // TODO(hbos): Finish implementation. Tracking bug crbug.com/636818 |
| 134 class RTCPeerConnectionStats final : public RTCStats { | 137 class RTCPeerConnectionStats final : public RTCStats { |
| 135 public: | 138 public: |
| 136 WEBRTC_RTCSTATS_DECL(); | 139 WEBRTC_RTCSTATS_DECL(); |
| 137 | 140 |
| 138 RTCPeerConnectionStats(const std::string& id, int64_t timestamp_us); | 141 RTCPeerConnectionStats(const std::string& id, int64_t timestamp_us); |
| 139 RTCPeerConnectionStats(std::string&& id, int64_t timestamp_us); | 142 RTCPeerConnectionStats(std::string&& id, int64_t timestamp_us); |
| 140 RTCPeerConnectionStats(const RTCPeerConnectionStats& other); | 143 RTCPeerConnectionStats(const RTCPeerConnectionStats& other); |
| 141 ~RTCPeerConnectionStats() override; | 144 ~RTCPeerConnectionStats() override; |
| 142 | 145 |
| 143 RTCStatsMember<uint32_t> data_channels_opened; | 146 RTCStatsMember<uint32_t> data_channels_opened; |
| 144 RTCStatsMember<uint32_t> data_channels_closed; | 147 RTCStatsMember<uint32_t> data_channels_closed; |
| 145 }; | 148 }; |
| 146 | 149 |
| 150 // https://w3c.github.io/webrtc-stats/#transportstats-dict* |
| 151 class RTCTransportStats final : public RTCStats { |
| 152 public: |
| 153 WEBRTC_RTCSTATS_DECL(); |
| 154 |
| 155 RTCTransportStats(const std::string& id, int64_t timestamp_us); |
| 156 RTCTransportStats(std::string&& id, int64_t timestamp_us); |
| 157 RTCTransportStats(const RTCTransportStats& other); |
| 158 ~RTCTransportStats() override; |
| 159 |
| 160 RTCStatsMember<uint64_t> bytes_sent; |
| 161 RTCStatsMember<uint64_t> bytes_received; |
| 162 RTCStatsMember<std::string> rtcp_transport_stats_id; |
| 163 RTCStatsMember<bool> active_connection; |
| 164 RTCStatsMember<std::string> selected_candidate_pair_id; |
| 165 RTCStatsMember<std::string> local_certificate_id; |
| 166 RTCStatsMember<std::string> remote_certificate_id; |
| 167 }; |
| 168 |
| 147 } // namespace webrtc | 169 } // namespace webrtc |
| 148 | 170 |
| 149 #endif // WEBRTC_API_STATS_RTCSTATS_OBJECTS_H_ | 171 #endif // WEBRTC_API_STATS_RTCSTATS_OBJECTS_H_ |
| OLD | NEW |