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 #include "webrtc/api/stats/rtcstats_objects.h" | 11 #include "webrtc/api/stats/rtcstats_objects.h" |
12 | 12 |
13 namespace webrtc { | 13 namespace webrtc { |
14 | 14 |
| 15 const char* RTCIceCandidateType::kHost = "host"; |
| 16 const char* RTCIceCandidateType::kSrflx = "srflx"; |
| 17 const char* RTCIceCandidateType::kPrflx = "prflx"; |
| 18 const char* RTCIceCandidateType::kRelay = "relay"; |
| 19 |
| 20 WEBRTC_RTCSTATS_IMPL(RTCIceCandidateStats, RTCStats, "ice-candidate", |
| 21 &ip, |
| 22 &port, |
| 23 &protocol, |
| 24 &candidate_type, |
| 25 &priority, |
| 26 &url); |
| 27 |
| 28 RTCIceCandidateStats::RTCIceCandidateStats( |
| 29 const std::string& id, int64_t timestamp_us) |
| 30 : RTCIceCandidateStats(std::string(id), timestamp_us) { |
| 31 } |
| 32 |
| 33 RTCIceCandidateStats::RTCIceCandidateStats( |
| 34 std::string&& id, int64_t timestamp_us) |
| 35 : RTCStats(std::move(id), timestamp_us), |
| 36 ip("ip"), |
| 37 port("port"), |
| 38 protocol("protocol"), |
| 39 candidate_type("candidateType"), |
| 40 priority("priority"), |
| 41 url("url") { |
| 42 } |
| 43 |
| 44 RTCIceCandidateStats::RTCIceCandidateStats(const RTCIceCandidateStats& other) |
| 45 : RTCStats(other.id(), other.timestamp_us()), |
| 46 ip(other.ip), |
| 47 port(other.port), |
| 48 protocol(other.protocol), |
| 49 candidate_type(other.candidate_type), |
| 50 priority(other.priority), |
| 51 url(other.url) { |
| 52 } |
| 53 |
| 54 RTCIceCandidateStats::~RTCIceCandidateStats() { |
| 55 } |
| 56 |
| 57 const char RTCLocalIceCandidateStats::kType[] = "local-candidate"; |
| 58 |
| 59 RTCLocalIceCandidateStats::RTCLocalIceCandidateStats( |
| 60 const std::string& id, int64_t timestamp_us) |
| 61 : RTCIceCandidateStats(id, timestamp_us) { |
| 62 } |
| 63 |
| 64 RTCLocalIceCandidateStats::RTCLocalIceCandidateStats( |
| 65 std::string&& id, int64_t timestamp_us) |
| 66 : RTCIceCandidateStats(std::move(id), timestamp_us) { |
| 67 } |
| 68 |
| 69 const char* RTCLocalIceCandidateStats::type() const { |
| 70 return kType; |
| 71 } |
| 72 |
| 73 const char RTCRemoteIceCandidateStats::kType[] = "remote-candidate"; |
| 74 |
| 75 RTCRemoteIceCandidateStats::RTCRemoteIceCandidateStats( |
| 76 const std::string& id, int64_t timestamp_us) |
| 77 : RTCIceCandidateStats(id, timestamp_us) { |
| 78 } |
| 79 |
| 80 RTCRemoteIceCandidateStats::RTCRemoteIceCandidateStats( |
| 81 std::string&& id, int64_t timestamp_us) |
| 82 : RTCIceCandidateStats(std::move(id), timestamp_us) { |
| 83 } |
| 84 |
| 85 const char* RTCRemoteIceCandidateStats::type() const { |
| 86 return kType; |
| 87 } |
| 88 |
15 WEBRTC_RTCSTATS_IMPL(RTCCertificateStats, RTCStats, "certificate", | 89 WEBRTC_RTCSTATS_IMPL(RTCCertificateStats, RTCStats, "certificate", |
16 &fingerprint, | 90 &fingerprint, |
17 &fingerprint_algorithm, | 91 &fingerprint_algorithm, |
18 &base64_certificate, | 92 &base64_certificate, |
19 &issuer_certificate_id); | 93 &issuer_certificate_id); |
20 | 94 |
21 RTCCertificateStats::RTCCertificateStats( | 95 RTCCertificateStats::RTCCertificateStats( |
22 const std::string& id, int64_t timestamp_us) | 96 const std::string& id, int64_t timestamp_us) |
23 : RTCCertificateStats(std::string(id), timestamp_us) { | 97 : RTCCertificateStats(std::string(id), timestamp_us) { |
24 } | 98 } |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 const RTCPeerConnectionStats& other) | 138 const RTCPeerConnectionStats& other) |
65 : RTCStats(other.id(), other.timestamp_us()), | 139 : RTCStats(other.id(), other.timestamp_us()), |
66 data_channels_opened(other.data_channels_opened), | 140 data_channels_opened(other.data_channels_opened), |
67 data_channels_closed(other.data_channels_closed) { | 141 data_channels_closed(other.data_channels_closed) { |
68 } | 142 } |
69 | 143 |
70 RTCPeerConnectionStats::~RTCPeerConnectionStats() { | 144 RTCPeerConnectionStats::~RTCPeerConnectionStats() { |
71 } | 145 } |
72 | 146 |
73 } // namespace webrtc | 147 } // namespace webrtc |
OLD | NEW |