Unity Scopes API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
unity::scopes::ScopeMetadata Class Referencefinal

Holds scope attributes such as name, description, icon etc. More...

#include <unity/scopes/ScopeMetadata.h>

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...
 
Copy and assignment

Copy and assignment operators (move and non-move versions) have the usual value semantics.

 ScopeMetadata (ScopeMetadata const &other)
 
 ScopeMetadata (ScopeMetadata &&)
 
ScopeMetadataoperator= (ScopeMetadata const &other)
 
ScopeMetadataoperator= (ScopeMetadata &&)
 

Detailed Description

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.

Member Function Documentation

VariantMap unity::scopes::ScopeMetadata::appearance_attributes ( ) const

Get optional display attributes.

Appearance attributes define customized look of the scope in Scopes Scope.

Returns
Map of attributes (may be empty)
std::string unity::scopes::ScopeMetadata::art ( ) const

Get the art for this scope.

Returns
The scope art.
std::string unity::scopes::ScopeMetadata::author ( ) const

Get the author for this scope.

Returns
The scope author.
std::string unity::scopes::ScopeMetadata::description ( ) const

Get the description for this scope.

Returns
The scope description.
std::string unity::scopes::ScopeMetadata::display_name ( ) const

Get the display name for this scope.

Returns
The scope display name.
std::string unity::scopes::ScopeMetadata::hot_key ( ) const

Get the hot key for this scope.

Returns
The hot key.
std::string unity::scopes::ScopeMetadata::icon ( ) const

Get the icon for this scope.

Returns
The scope icon.
bool unity::scopes::ScopeMetadata::invisible ( ) const

Check if this scope should be hidden in the Dash.

Returns
True if this scope is invisible.
ScopeProxy unity::scopes::ScopeMetadata::proxy ( ) const

Get the proxy object for this scope.

Returns
The scope proxy.
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.

Exceptions
unity::scopes::NotFoundExceptionif directory is not set
Returns
path string
std::string unity::scopes::ScopeMetadata::scope_id ( ) const

Get the scope identifier.

Returns
The ID of the scope.
std::string unity::scopes::ScopeMetadata::search_hint ( ) const

Get the search hint for this scope.

Returns
The search hint.
VariantMap unity::scopes::ScopeMetadata::serialize ( ) const

Return a dictionary of all metadata attributes.

Returns
Dictionary of all metadata attributes.

The documentation for this class was generated from the following file: