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/stats/test/rtcteststats.h" | 11 #include "webrtc/stats/test/rtcteststats.h" |
12 | 12 |
13 namespace webrtc { | 13 namespace webrtc { |
14 | 14 |
15 const char RTCTestStats::kType[] = "test-stats"; | 15 WEBRTC_RTCSTATS_IMPL(RTCTestStats, RTCStats, "test-stats", |
| 16 &m_bool, |
| 17 &m_int32, |
| 18 &m_uint32, |
| 19 &m_int64, |
| 20 &m_uint64, |
| 21 &m_double, |
| 22 &m_string, |
| 23 &m_sequence_bool, |
| 24 &m_sequence_int32, |
| 25 &m_sequence_uint32, |
| 26 &m_sequence_int64, |
| 27 &m_sequence_uint64, |
| 28 &m_sequence_double, |
| 29 &m_sequence_string); |
16 | 30 |
17 RTCTestStats::RTCTestStats(const std::string& id, int64_t timestamp_us) | 31 RTCTestStats::RTCTestStats(const std::string& id, int64_t timestamp_us) |
18 : RTCStats(id, timestamp_us), | 32 : RTCStats(id, timestamp_us), |
19 m_bool("mBool"), | 33 m_bool("mBool"), |
20 m_int32("mInt32"), | 34 m_int32("mInt32"), |
21 m_uint32("mUint32"), | 35 m_uint32("mUint32"), |
22 m_int64("mInt64"), | 36 m_int64("mInt64"), |
23 m_uint64("mUint64"), | 37 m_uint64("mUint64"), |
24 m_double("mDouble"), | 38 m_double("mDouble"), |
25 m_string("mString"), | 39 m_string("mString"), |
26 m_sequence_bool("mSequenceBool"), | 40 m_sequence_bool("mSequenceBool"), |
27 m_sequence_int32("mSequenceInt32"), | 41 m_sequence_int32("mSequenceInt32"), |
28 m_sequence_uint32("mSequenceUint32"), | 42 m_sequence_uint32("mSequenceUint32"), |
29 m_sequence_int64("mSequenceInt64"), | 43 m_sequence_int64("mSequenceInt64"), |
30 m_sequence_uint64("mSequenceUint64"), | 44 m_sequence_uint64("mSequenceUint64"), |
31 m_sequence_double("mSequenceDouble"), | 45 m_sequence_double("mSequenceDouble"), |
32 m_sequence_string("mSequenceString") { | 46 m_sequence_string("mSequenceString") { |
33 } | 47 } |
34 | 48 |
| 49 RTCTestStats::RTCTestStats(const RTCTestStats& other) |
| 50 : RTCStats(other.id(), other.timestamp_us()), |
| 51 m_bool(other.m_bool), |
| 52 m_int32(other.m_int32), |
| 53 m_uint32(other.m_uint32), |
| 54 m_int64(other.m_int64), |
| 55 m_uint64(other.m_uint64), |
| 56 m_double(other.m_double), |
| 57 m_string(other.m_string), |
| 58 m_sequence_bool(other.m_sequence_bool), |
| 59 m_sequence_int32(other.m_sequence_int32), |
| 60 m_sequence_uint32(other.m_sequence_uint32), |
| 61 m_sequence_int64(other.m_sequence_int64), |
| 62 m_sequence_uint64(other.m_sequence_uint64), |
| 63 m_sequence_double(other.m_sequence_double), |
| 64 m_sequence_string(other.m_sequence_string) { |
| 65 } |
| 66 |
| 67 RTCTestStats::~RTCTestStats() { |
| 68 } |
| 69 |
35 } // namespace webrtc | 70 } // namespace webrtc |
OLD | NEW |