Unity Scopes API
|
Holds scope attributes such as name, description, icon etc. More...
#include <unity/scopes/ScopeMetadata.h>
Public Types | |
enum | ResultsTtlType { None, Small, Medium, Large } |
Enum representing the expected valid lifetime of results from the scope. | |
Public Member Functions | |
std::string | scope_id () const |
Get the scope identifier. More... | |
ScopeProxy | proxy () const |
Get the proxy object for this scope. More... | |
std::string | display_name () const |
Get the display name for this scope. More... | |
std::string | description () const |
Get the description for this scope. More... | |
std::string | author () const |
Get the author for this scope. More... | |
std::string | art () const |
Get the art for this scope. More... | |
std::string | icon () const |
Get the icon for this scope. More... | |
std::string | search_hint () const |
Get the search hint for this scope. More... | |
std::string | hot_key () const |
Get the hot key for this scope. More... | |
bool | invisible () const |
Check if this scope should be hidden in the Dash. More... | |
VariantMap | appearance_attributes () const |
Get optional display attributes. More... | |
std::string | scope_directory () const |
Get directory where scope config files and .so file lives. More... | |
VariantMap | serialize () const |
Return a dictionary of all metadata attributes. More... | |
ResultsTtlType | results_ttl_type () const |
Return the TTL for the results this scope produces. More... | |
VariantArray | settings_definitions () const |
Return the settings definitions for this scope. More... | |
bool | location_data_needed () const |
Check if this scope wants location data. More... | |
std::vector< std::string > | child_scope_ids () const |
Return the list of scope identifiers aggregated by this scope. More... | |
int | version () const |
Return the version of the scope. More... | |
std::set< std::string > | keywords () const |
Return the set of keywords specified by this scope. More... | |
bool | is_aggregator () const |
Check if this scope is an aggregator. More... | |
Copy and assignment | |
Copy and assignment operators (move and non-move versions) have the usual value semantics. | |
ScopeMetadata (ScopeMetadata const &other) | |
ScopeMetadata (ScopeMetadata &&) | |
ScopeMetadata & | operator= (ScopeMetadata const &other) |
ScopeMetadata & | operator= (ScopeMetadata &&) |
Holds scope attributes such as name, description, icon etc.
The information stored by ScopeMetadata comes from the .ini file for the given scope (for local scopes) or is fetched from the remote server (for scopes running on Smart Scopes Server). Use unity::scopes::Registry to get the metadata for a specific scope or all scopes.
VariantMap unity::scopes::ScopeMetadata::appearance_attributes | ( | ) | const |
Get optional display attributes.
Appearance attributes define customized look of the scope in Scopes Scope.
std::string unity::scopes::ScopeMetadata::art | ( | ) | const |
Get the art for this scope.
std::string unity::scopes::ScopeMetadata::author | ( | ) | const |
Get the author for this scope.
std::vector<std::string> unity::scopes::ScopeMetadata::child_scope_ids | ( | ) | const |
Return the list of scope identifiers aggregated by this scope.
The list returned by this method comes from the .ini file. The scope author must ensure that it contains all scopes that an aggregator might collect results from. This list may contain scopes that are not currently installed and are optional for proper functioning of the aggregator scope.
std::string unity::scopes::ScopeMetadata::description | ( | ) | const |
Get the description for this scope.
std::string unity::scopes::ScopeMetadata::display_name | ( | ) | const |
Get the display name for this scope.
std::string unity::scopes::ScopeMetadata::hot_key | ( | ) | const |
Get the hot key for this scope.
std::string unity::scopes::ScopeMetadata::icon | ( | ) | const |
Get the icon for this scope.
bool unity::scopes::ScopeMetadata::invisible | ( | ) | const |
Check if this scope should be hidden in the Dash.
bool unity::scopes::ScopeMetadata::is_aggregator | ( | ) | const |
Check if this scope is an aggregator.
std::set<std::string> unity::scopes::ScopeMetadata::keywords | ( | ) | const |
Return the set of keywords specified by this scope.
The set returned by this method is formulated from the value specified under the "Keywords" key in the scope's .ini file.
bool unity::scopes::ScopeMetadata::location_data_needed | ( | ) | const |
Check if this scope wants location data.
ScopeProxy unity::scopes::ScopeMetadata::proxy | ( | ) | const |
Get the proxy object for this scope.
ResultsTtlType unity::scopes::ScopeMetadata::results_ttl_type | ( | ) | const |
Return the TTL for the results this scope produces.
std::string unity::scopes::ScopeMetadata::scope_directory | ( | ) | const |
Get directory where scope config files and .so file lives.
Note that the directory is not set for remote scopes; in such case this method throws unity::scopes::NotFoundException.
unity::scopes::NotFoundException | if directory is not set |
std::string unity::scopes::ScopeMetadata::scope_id | ( | ) | const |
Get the scope identifier.
std::string unity::scopes::ScopeMetadata::search_hint | ( | ) | const |
Get the search hint for this scope.
VariantMap unity::scopes::ScopeMetadata::serialize | ( | ) | const |
Return a dictionary of all metadata attributes.
VariantArray unity::scopes::ScopeMetadata::settings_definitions | ( | ) | const |
Return the settings definitions for this scope.
unity::scopes::NotFoundException | if the scope has no settings |
int unity::scopes::ScopeMetadata::version | ( | ) | const |
Return the version of the scope.
0
.