OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2004 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 #ifndef WEBRTC_RTC_BASE_HELPERS_H_ | 11 #ifndef WEBRTC_RTC_BASE_HELPERS_H_ |
12 #define WEBRTC_RTC_BASE_HELPERS_H_ | 12 #define WEBRTC_RTC_BASE_HELPERS_H_ |
13 | 13 |
14 #include <string> | 14 #include <string> |
15 #include "webrtc/base/basictypes.h" | 15 #include "webrtc/rtc_base/basictypes.h" |
16 | 16 |
17 namespace rtc { | 17 namespace rtc { |
18 | 18 |
19 // For testing, we can return predictable data. | 19 // For testing, we can return predictable data. |
20 void SetRandomTestMode(bool test); | 20 void SetRandomTestMode(bool test); |
21 | 21 |
22 // Initializes the RNG, and seeds it with the specified entropy. | 22 // Initializes the RNG, and seeds it with the specified entropy. |
23 bool InitRandom(int seed); | 23 bool InitRandom(int seed); |
24 bool InitRandom(const char* seed, size_t len); | 24 bool InitRandom(const char* seed, size_t len); |
25 | 25 |
(...skipping 29 matching lines...) Expand all Loading... |
55 | 55 |
56 // Generates a random id > 0. | 56 // Generates a random id > 0. |
57 uint32_t CreateRandomNonZeroId(); | 57 uint32_t CreateRandomNonZeroId(); |
58 | 58 |
59 // Generates a random double between 0.0 (inclusive) and 1.0 (exclusive). | 59 // Generates a random double between 0.0 (inclusive) and 1.0 (exclusive). |
60 double CreateRandomDouble(); | 60 double CreateRandomDouble(); |
61 | 61 |
62 } // namespace rtc | 62 } // namespace rtc |
63 | 63 |
64 #endif // WEBRTC_RTC_BASE_HELPERS_H_ | 64 #endif // WEBRTC_RTC_BASE_HELPERS_H_ |
OLD | NEW |