|
| CachePolicy () |
| Set a default cache policy.
|
|
| CachePolicy (int maxScans, qint64 maxDelay) |
| Set a custom cache policy.
|
|
| CachePolicy (const CachePolicy &other) |
|
| CachePolicy (CachePolicy &&other) |
|
int | getMaxScans () const |
| Retrieve maximum number of scans to miss to consider a network as unavailable.
|
|
qint64 | getMaxDelay () const |
| Retrieve maximum delay in milliseconds to consider a network as unavailable.
|
|
void | setMaxScans (int maxScans) |
| Set maximum scans to miss to consider a network as unavailable.
|
|
void | setMaxDelay (qint64 maxDelay) |
| Set maximum delay to consider a network as unavailable.
|
|
bool | operator== (const CachePolicy &other) const |
|
bool | operator!= (const CachePolicy &other) const |
|
CachePolicy & | operator= (const CachePolicy &other) |
|
CachePolicy & | operator= (CachePolicy &&other) noexcept |
|
Class allowing to determine the cache policy to adopt.
Cache policy feature allow to workaround some "weird" behaviour from the native API.
For example, we can perform a scan and retrieve 20 networks, later performing the same scan (all networks are still available) but due to some internal behaviour, scan can returns [0-4] networks over the 20 available.
The cache policy allow to set a network cache, allowing to remove a network from our available list only if cache has expired.
This class is also compatible with QML.
- See also
- Interface::setCachePolicy()