Unity Scopes API
|
Base class for extra metadata passed to scopes as a part of a request. More...
#include <unity/scopes/QueryMetadata.h>
Public Types | |
enum | ConnectivityStatus { Unknown, Connected, Disconnected } |
Indicates the internet connectivity status. More... | |
Public Member Functions | |
std::string | locale () const |
Get the locale string. More... | |
std::string | form_factor () const |
Get the form factor string. More... | |
void | set_internet_connectivity (ConnectivityStatus connectivity_status) |
Set internet connectivity status. More... | |
ConnectivityStatus | internet_connectivity () const |
Get internet connectivity status. More... | |
Base class for extra metadata passed to scopes as a part of a request.
Indicates the internet connectivity status.
The Unknown
enumerator indicates that set_internet_connectivity() has not yet been called, hence the connectivity status is currently unknown.
The Connected
enumerator simply indicates that we are currently connected to the internet. This does not necessarily mean that a particular host on the internet will be reachable.
The Disconnected
enumerator indicates that we are currently not connected to the internet. In this state, a scope need not waste any time attempting remote calls, as they will almost certainly fail.
std::string unity::scopes::QueryMetadata::form_factor | ( | ) | const |
Get the form factor string.
QueryMetadata::ConnectivityStatus unity::scopes::QueryMetadata::internet_connectivity | ( | ) | const |
Get internet connectivity status.
std::string unity::scopes::QueryMetadata::locale | ( | ) | const |
Get the locale string.
void unity::scopes::QueryMetadata::set_internet_connectivity | ( | ConnectivityStatus | connectivity_status | ) |
Set internet connectivity status.
connectivity_status | Enum indicating the internet connectivity status. |