| 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 public: | 159 public: |
| 160 | 160 |
| 161 // Interface for |RTCStats| members, which have a name and a value of a type | 161 // Interface for |RTCStats| members, which have a name and a value of a type |
| 162 // defined in a subclass. Only the types listed in |Type| are supported, these | 162 // defined in a subclass. Only the types listed in |Type| are supported, these |
| 163 // are implemented by |RTCStatsMember<T>|. The value of a member may be | 163 // are implemented by |RTCStatsMember<T>|. The value of a member may be |
| 164 // undefined, the value can only be read if |is_defined|. | 164 // undefined, the value can only be read if |is_defined|. |
| 165 class RTCStatsMemberInterface { | 165 class RTCStatsMemberInterface { |
| 166 public: | 166 public: |
| 167 // Member value types. | 167 // Member value types. |
| 168 enum Type { | 168 enum Type { |
| 169 kBool, // bool |
| 169 kInt32, // int32_t | 170 kInt32, // int32_t |
| 170 kUint32, // uint32_t | 171 kUint32, // uint32_t |
| 171 kInt64, // int64_t | 172 kInt64, // int64_t |
| 172 kUint64, // uint64_t | 173 kUint64, // uint64_t |
| 173 kDouble, // double | 174 kDouble, // double |
| 174 kString, // std::string | 175 kString, // std::string |
| 175 | 176 |
| 177 kSequenceBool, // std::vector<bool> |
| 176 kSequenceInt32, // std::vector<int32_t> | 178 kSequenceInt32, // std::vector<int32_t> |
| 177 kSequenceUint32, // std::vector<uint32_t> | 179 kSequenceUint32, // std::vector<uint32_t> |
| 178 kSequenceInt64, // std::vector<int64_t> | 180 kSequenceInt64, // std::vector<int64_t> |
| 179 kSequenceUint64, // std::vector<uint64_t> | 181 kSequenceUint64, // std::vector<uint64_t> |
| 180 kSequenceDouble, // std::vector<double> | 182 kSequenceDouble, // std::vector<double> |
| 181 kSequenceString, // std::vector<std::string> | 183 kSequenceString, // std::vector<std::string> |
| 182 }; | 184 }; |
| 183 | 185 |
| 184 virtual ~RTCStatsMemberInterface() {} | 186 virtual ~RTCStatsMemberInterface() {} |
| 185 | 187 |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 return &value_; | 274 return &value_; |
| 273 } | 275 } |
| 274 | 276 |
| 275 private: | 277 private: |
| 276 T value_; | 278 T value_; |
| 277 }; | 279 }; |
| 278 | 280 |
| 279 } // namespace webrtc | 281 } // namespace webrtc |
| 280 | 282 |
| 281 #endif // WEBRTC_API_STATS_RTCSTATS_H_ | 283 #endif // WEBRTC_API_STATS_RTCSTATS_H_ |
| OLD | NEW |