Changeset View
Changeset View
Standalone View
Standalone View
source/lib/sysdep/sysdep.h
Show First 20 Lines • Show All 152 Lines • ▼ Show 20 Lines | |||||
* the largest size is used so that we can read from any drive. while this | * the largest size is used so that we can read from any drive. while this | ||||
* is a bit wasteful (more padding) and requires iterating over all drives, | * is a bit wasteful (more padding) and requires iterating over all drives, | ||||
* it is the only safe way: this may be called before we know which | * it is the only safe way: this may be called before we know which | ||||
* drives will be needed, and hardlinks may confuse things. | * drives will be needed, and hardlinks may confuse things. | ||||
**/ | **/ | ||||
extern size_t sys_max_sector_size(); | extern size_t sys_max_sector_size(); | ||||
/** | /** | ||||
* generate high-quality random bytes. | |||||
* | |||||
* this should only be used with small numbers of bytes, to avoid | |||||
* hogging the system's entropy. | |||||
**/ | |||||
Status sys_generate_random_bytes(u8* buf, size_t count); | |||||
/** | |||||
* get the proxy address for accessing the given HTTP URL. | * get the proxy address for accessing the given HTTP URL. | ||||
* | * | ||||
* this may be very slow (tens of seconds). | * this may be very slow (tens of seconds). | ||||
* | * | ||||
* @return INFO::OK on success; INFO::SKIPPED if no proxy found. | * @return INFO::OK on success; INFO::SKIPPED if no proxy found. | ||||
**/ | **/ | ||||
Status sys_get_proxy_config(const std::wstring& url, std::wstring& proxy); | Status sys_get_proxy_config(const std::wstring& url, std::wstring& proxy); | ||||
Show All 15 Lines |
Wildfire Games · Phabricator