unity.scopes

Top-level namespace for public functionality of the Unity scopes API. More...

Classes

class  AbstractScopeBase
 Abstract base class for a scope implementation. More...
 
class  ActionMetadata
 Metadata passed to scopes for preview and activation. More...
 
class  ActivationListenerBase
 Base class to receive a response to a result activation request. More...
 
class  ActivationQueryBase
 Base class for an activation request that is executed inside a scope. More...
 
class  ActivationResponse
 Response to a result activation. More...
 
class  CannedQuery
 Parameters of a search query. More...
 
class  CategorisedResult
 A result, including the category it belongs to. More...
 
class  Category
 A set of related results returned by a scope and displayed within a single pane in the Unity dash. More...
 
class  CategoryRenderer
 A category renderer template in JSON format. More...
 
struct  ChildScope
 A container for details about an aggregator's child scope. More...
 
class  ColumnLayout
 Defines a layout for preview widgets with given column setup. More...
 
class  CompletionDetails
 A container for details about the completion status of a query as well as any additional information regarding the operation of the request. More...
 
class  ConfigException
 Exception to indicate that something went wrong with the contents of configuration files. More...
 
class  Department
 A department with optional sub-departments. More...
 
class  FilterBase
 Base class for all implementations of filters. More...
 
class  FilterGroup
 Groups several filters into an expandable widget in the UI. More...
 
class  FilterOption
 Holds definition of filter option for OptionSelectorFilter. More...
 
class  FilterState
 Stores the state of multiple filters. More...
 
class  Link
 A hyperlink (label and canned query). More...
 
class  ListenerBase
 Abstract base class to be notified of request completion (such as a query or activation request). More...
 
class  Location
 Holds location attributes such as latitude, longitude, etc. More...
 
class  MiddlewareException
 Exception to indicate that something went wrong with the middleware layer. More...
 
class  NotFoundException
 Exception to indicate that an object wasn't found by a lookup function. More...
 
class  Object
 The root base class for all proxies. More...
 
class  ObjectNotExistException
 Exception to indicate that a (twoway) request was sent to an object with an unknown identity. More...
 
class  OnlineAccountClient
 A simple interface for integrating online accounts access and monitoring into scopes. More...
 
class  OperationInfo
 A container for details about something of interest that occurs during the operation of a request. More...
 
class  OptionSelectorFilter
 A selection filter that displays a list of choices and allows one or more of them to be selected. More...
 
class  PreviewListenerBase
 Abstract base class for a scope to respond to preview requests. More...
 
class  PreviewQueryBase
 Abstract base class to represent a particular preview. More...
 
class  PreviewReply
 Allows the results of a preview to be sent to the preview requester. More...
 
class  PreviewWidget
 A widget for a preview. More...
 
class  QueryBase
 Abstract server-side base interface for a query that is executed inside a scope. More...
 
class  QueryCtrl
 QueryCtrl allows a query to be cancelled. More...
 
class  QueryMetadata
 Base class for extra metadata passed to scopes as a part of a request. More...
 
class  RangeInputFilter
 A range filter allows a start and end value to be entered by the user. More...
 
class  Registry
 White pages service for available scopes. More...
 
class  Reply
 Allows query termination to be sent to the source of a query. More...
 
class  Result
 The attributes of a result returned by a Scope. More...
 
class  Runtime
 The main object for query originators to access the scopes runtime. More...
 
class  Scope
 Allows queries, preview requests, and activation requests to be sent to a scope. More...
 
class  ScopeBase
 Base class for a scope implementation. More...
 
class  ScopeMetadata
 Holds scope attributes such as name, description, icon etc. More...
 
class  SearchListenerBase
 Abstract base interface for a client to receive the results of a query. More...
 
class  SearchMetadata
 Metadata passed with search requests. More...
 
class  SearchQueryBase
 Abstract base class to represent a particular query. More...
 
class  SearchReply
 Allows the results of a search query to be sent to the query source. More...
 
class  TimeoutException
 Exception to indicate that a twoway request timed out. More...
 
class  ValueSliderFilter
 A value slider filter that allows for selecting a value within a given range. More...
 
class  ValueSliderLabels
 Labels used by a ValueSliderFilter. More...
 
class  Variant
 Simple variant class that can hold an integer, boolean, string, double, dictionary, array or null value. More...
 
class  VariantBuilder
 Helper class for creating and populating Variant containers. More...
 

Typedefs

typedef std::vector< ChildScopeChildScopeList
 A list of child scopes.
 
typedef std::list< ColumnLayoutColumnLayoutList
 List of column layouts (see unity::scopes::ColumnLayout)
 
typedef std::list< std::shared_ptr< Department const > > DepartmentList
 List of departments (see unity::scopes::Department)
 
typedef std::list< FilterBase::SCPtr > Filters
 List of filters.
 
typedef std::shared_ptr< ObjectObjectProxy
 Convenience type definition for the proxy inheritance root.
 
typedef std::shared_ptr< PreviewReplyPreviewReplyProxy
 Convenience type definition.
 
typedef std::list< PreviewWidgetPreviewWidgetList
 List of preview widgets (see unity::scopes::PreviewWidget)
 
typedef std::shared_ptr< QueryCtrlQueryCtrlProxy
 Convenience type definition.
 
typedef std::map< std::string, ScopeMetadataMetadataMap
 Map for scope ID and metadata pairs.
 
typedef std::shared_ptr< RegistryRegistryProxy
 Convenience type definition.
 
typedef std::shared_ptr< ReplyReplyProxy
 Convenience type definition.
 
typedef std::shared_ptr< ScopeScopeProxy
 Convenience type definition.
 
typedef std::shared_ptr< SearchReplySearchReplyProxy
 Convenience type definition.
 
typedef std::pair< double, std::string > ValueLabelPair
 A value and its corresponding label.
 
typedef std::vector< ValueLabelPairValueLabelPairList
 A sequence of value-label pairs.
 
typedef std::map< std::string, VariantVariantMap
 A dictionary of (string, Variant) pairs.
 
typedef std::vector< VariantVariantArray
 An array of variants.
 

Functions

char const * to_string (CompletionDetails::CompletionStatus status)
 Convenience function to convert a CompletionDetails::CompletionStatus enumerator to a string. More...
 
void swap (Variant &, Variant &) noexcept
 Swaps the contents of two Variants.
 
Version information

Version information is represented as <major>.<minor>.<micro>.

Releases that differ in the major version number or minor are binary incompatible.

Releases of the library that differ in the micro version number are binary compatible with older releases, so client code does not need to be recompiled to use the newer library version.

Changes in the micro version number indicate bug fixes or feature additions that are binary compatible.

int major_version ()
 Returns the major version number of the Unity scopes library. More...
 
int minor_version ()
 Returns the minor version number of the Unity scopes library. More...
 
int micro_version ()
 Returns the micro version number of the Unity scopes library. More...
 
const char * version_string ()
 Returns the Unity scopes version as a string in the format <major>.<minor>.<micro>. More...
 

Variables

constexpr const char * DEFAULT_RENDERER
 A default template for generic use. More...
 
constexpr const char * MUSIC_GRID_RENDERER
 A template suitable for displaying music results. More...
 
decltype(&UNITY_SCOPE_CREATE_FUNCTION) typedef CreateFunction
 Convenience typedef for the create function pointer.
 
decltype(&UNITY_SCOPE_DESTROY_FUNCTION) typedef DestroyFunction
 Convenience typedef for the destroy function pointer.
 

Detailed Description

Top-level namespace for public functionality of the Unity scopes API.

Function Documentation

int unity::scopes::major_version ( )

Returns the major version number of the Unity scopes library.

The major version number is also available as the macro UNITY_SCOPES_VERSION_MAJOR.

int unity::scopes::micro_version ( )

Returns the micro version number of the Unity scopes library.

The micro version number is also available as the macro UNITY_SCOPES_VERSION_MICRO.

int unity::scopes::minor_version ( )

Returns the minor version number of the Unity scopes library.

The minor version number is also available as the macro UNITY_SCOPES_VERSION_MINOR.

char const * unity::scopes::to_string ( CompletionDetails::CompletionStatus  status)

Convenience function to convert a CompletionDetails::CompletionStatus enumerator to a string.

Returns
Possible return values are "ok", "cancelled", and "error".
char const * unity::scopes::version_string ( )

Returns the Unity scopes version as a string in the format <major>.<minor>.<micro>.

The version string is also available as the macro UNITY_SCOPES_VERSION_STRING.

Variable Documentation

constexpr const char* unity::scopes::DEFAULT_RENDERER
Initial value:

{
R<span class="stringliteral">&quot;(</span>
<span class="stringliteral">    {</span>
<span class="stringliteral">        &quot;schema-version&quot;:1,</span>
<span class="stringliteral">        &quot;template&quot;:</span>
<span class="stringliteral">        {</span>
<span class="stringliteral">            &quot;category-layout&quot;:&quot;grid&quot;</span>
<span class="stringliteral">        },</span>
<span class="stringliteral">        &quot;components&quot;:</span>
<span class="stringliteral">        {</span>
<span class="stringliteral">            &quot;title&quot;:&quot;title&quot;,</span>
<span class="stringliteral">            &quot;art&quot;:&quot;art&quot;</span>
<span class="stringliteral">        }</span>
<span class="stringliteral">    }</span>
<span class="stringliteral">    )&quot;</span>
<span class="stringliteral">}</span>

A default template for generic use.

constexpr const char* unity::scopes::MUSIC_GRID_RENDERER

Initial value:

{
R<span class="stringliteral">&quot;(</span>
<span class="stringliteral">        {</span>
<span class="stringliteral">            &quot;schema-version&quot;:1,</span>
<span class="stringliteral">            &quot;template&quot;:</span>
<span class="stringliteral">            {</span>
<span class="stringliteral">                &quot;category-layout&quot;:&quot;grid&quot;</span>
<span class="stringliteral">            },</span>
<span class="stringliteral">            &quot;components&quot;:</span>
<span class="stringliteral">            {</span>
<span class="stringliteral">                &quot;title&quot;:&quot;title&quot;,</span>
<span class="stringliteral">                &quot;subtitle&quot;:&quot;subtitle&quot;,</span>
<span class="stringliteral">                &quot;art&quot;:&quot;art&quot;</span>
<span class="stringliteral">            }</span>
<span class="stringliteral">        }</span>
<span class="stringliteral">    )&quot;</span>
<span class="stringliteral">}</span>

A template suitable for displaying music results.