12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- #ifndef RTC_BASE_HELPERS_H_
- #define RTC_BASE_HELPERS_H_
- #include <stddef.h>
- #include <stdint.h>
- #include <string>
- #include "rtc_base/system/rtc_export.h"
- namespace rtc {
- void SetRandomTestMode(bool test);
- bool InitRandom(int seed);
- bool InitRandom(const char* seed, size_t len);
- RTC_EXPORT std::string CreateRandomString(size_t length);
- RTC_EXPORT bool CreateRandomString(size_t length, std::string* str);
- RTC_EXPORT bool CreateRandomString(size_t length,
- const std::string& table,
- std::string* str);
- bool CreateRandomData(size_t length, std::string* data);
- std::string CreateRandomUuid();
- uint32_t CreateRandomId();
- RTC_EXPORT uint64_t CreateRandomId64();
- uint32_t CreateRandomNonZeroId();
- double CreateRandomDouble();
- double GetNextMovingAverage(double prev_average, double cur, double ratio);
- }
- #endif
|