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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 kInt32, // int32_t | 169 kInt32, // int32_t |
170 kUint32, // uint32_t | 170 kUint32, // uint32_t |
171 kInt64, // int64_t | 171 kInt64, // int64_t |
172 kUint64, // uint64_t | 172 kUint64, // uint64_t |
173 kDouble, // double | 173 kDouble, // double |
174 kStaticString, // const char* | |
175 kString, // std::string | 174 kString, // std::string |
176 | 175 |
177 kSequenceInt32, // std::vector<int32_t> | 176 kSequenceInt32, // std::vector<int32_t> |
178 kSequenceUint32, // std::vector<uint32_t> | 177 kSequenceUint32, // std::vector<uint32_t> |
179 kSequenceInt64, // std::vector<int64_t> | 178 kSequenceInt64, // std::vector<int64_t> |
180 kSequenceUint64, // std::vector<uint64_t> | 179 kSequenceUint64, // std::vector<uint64_t> |
181 kSequenceDouble, // std::vector<double> | 180 kSequenceDouble, // std::vector<double> |
182 kSequenceStaticString, // std::vector<const char*> | |
183 kSequenceString, // std::vector<std::string> | 181 kSequenceString, // std::vector<std::string> |
184 }; | 182 }; |
185 | 183 |
186 virtual ~RTCStatsMemberInterface() {} | 184 virtual ~RTCStatsMemberInterface() {} |
187 | 185 |
188 const char* name() const { return name_; } | 186 const char* name() const { return name_; } |
189 virtual Type type() const = 0; | 187 virtual Type type() const = 0; |
190 virtual bool is_sequence() const = 0; | 188 virtual bool is_sequence() const = 0; |
191 virtual bool is_string() const = 0; | 189 virtual bool is_string() const = 0; |
192 bool is_defined() const { return is_defined_; } | 190 bool is_defined() const { return is_defined_; } |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 return &value_; | 272 return &value_; |
275 } | 273 } |
276 | 274 |
277 private: | 275 private: |
278 T value_; | 276 T value_; |
279 }; | 277 }; |
280 | 278 |
281 } // namespace webrtc | 279 } // namespace webrtc |
282 | 280 |
283 #endif // WEBRTC_API_RTCSTATS_H_ | 281 #endif // WEBRTC_API_RTCSTATS_H_ |
OLD | NEW |