Base class for extra metadata passed to scopes as a part of a request. More...

#include <unity/scopes/QueryMetadata.h>

Inheritance diagram for unity::scopes::QueryMetadata:
Inheritance graph

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...

Detailed Description

Base class for extra metadata passed to scopes as a part of a request.

Member Enumeration Documentation

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.

Member Function Documentation

std::string unity::scopes::QueryMetadata::form_factor ( ) const

Get the form factor string.

The form factor string
QueryMetadata::ConnectivityStatus unity::scopes::QueryMetadata::internet_connectivity ( ) const

Get internet connectivity status.

Enum indicating the internet connectivity status.
std::string unity::scopes::QueryMetadata::locale ( ) const

Get the locale string.

The locale string
void unity::scopes::QueryMetadata::set_internet_connectivity ( ConnectivityStatus  connectivity_status)

Set internet connectivity status.

connectivity_statusEnum indicating the internet connectivity status.