OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2012 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 // This file contains structures used for retrieving statistics from an ongoing | 11 // This file contains structures used for retrieving statistics from an ongoing |
12 // libjingle session. | 12 // libjingle session. |
13 | 13 |
14 #ifndef WEBRTC_API_STATSTYPES_H_ | 14 #ifndef WEBRTC_API_STATSTYPES_H_ |
15 #define WEBRTC_API_STATSTYPES_H_ | 15 #define WEBRTC_API_STATSTYPES_H_ |
16 | 16 |
17 #include <algorithm> | 17 #include <algorithm> |
18 #include <list> | 18 #include <list> |
19 #include <map> | 19 #include <map> |
20 #include <string> | 20 #include <string> |
| 21 #include <vector> |
21 | 22 |
22 #include "webrtc/base/basictypes.h" | 23 #include "webrtc/base/basictypes.h" |
23 #include "webrtc/base/constructormagic.h" | 24 #include "webrtc/base/constructormagic.h" |
24 #include "webrtc/base/refcount.h" | 25 #include "webrtc/base/refcount.h" |
25 #include "webrtc/base/scoped_ref_ptr.h" | 26 #include "webrtc/base/scoped_ref_ptr.h" |
26 #include "webrtc/base/stringencode.h" | 27 #include "webrtc/base/stringencode.h" |
27 #include "webrtc/base/thread_checker.h" | 28 #include "webrtc/base/thread_checker.h" |
28 | 29 |
29 namespace webrtc { | 30 namespace webrtc { |
30 | 31 |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 bool Equals(const rtc::scoped_refptr<IdBase>& other) const { | 228 bool Equals(const rtc::scoped_refptr<IdBase>& other) const { |
228 return Equals(*other.get()); | 229 return Equals(*other.get()); |
229 } | 230 } |
230 | 231 |
231 virtual std::string ToString() const = 0; | 232 virtual std::string ToString() const = 0; |
232 | 233 |
233 protected: | 234 protected: |
234 // Protected since users of the IdBase type will be using the Id typedef. | 235 // Protected since users of the IdBase type will be using the Id typedef. |
235 virtual bool Equals(const IdBase& other) const; | 236 virtual bool Equals(const IdBase& other) const; |
236 | 237 |
237 IdBase(StatsType type); // Only meant for derived classes. | 238 explicit IdBase(StatsType type); // Only meant for derived classes. |
238 const StatsType type_; | 239 const StatsType type_; |
239 | 240 |
240 static const char kSeparator = '_'; | 241 static const char kSeparator = '_'; |
241 }; | 242 }; |
242 | 243 |
243 typedef rtc::scoped_refptr<IdBase> Id; | 244 typedef rtc::scoped_refptr<IdBase> Id; |
244 | 245 |
245 struct Value { | 246 struct Value { |
246 enum Type { | 247 enum Type { |
247 kInt, // int. | 248 kInt, // int. |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
419 StatsReport* Find(const StatsReport::Id& id); | 420 StatsReport* Find(const StatsReport::Id& id); |
420 | 421 |
421 private: | 422 private: |
422 Container list_; | 423 Container list_; |
423 rtc::ThreadChecker thread_checker_; | 424 rtc::ThreadChecker thread_checker_; |
424 }; | 425 }; |
425 | 426 |
426 } // namespace webrtc | 427 } // namespace webrtc |
427 | 428 |
428 #endif // WEBRTC_API_STATSTYPES_H_ | 429 #endif // WEBRTC_API_STATSTYPES_H_ |
OLD | NEW |