Unity Scopes Qt library
unity::scopes::qt::QScopeBaseAPI Class Reference

#include <unity/scopes/qt/QScopeBaseAPI.h>

Inheritance diagram for unity::scopes::qt::QScopeBaseAPI:

Public Member Functions

virtual void start (std::string const &scope_id) override
 Called by the scopes run time after the create function completes. More...
 
virtual void stop () override
 Called by the scopes run time when the scope should shut down. More...
 
virtual unity::scopes::PreviewQueryBase::UPtr preview (const unity::scopes::Result &, const unity::scopes::ActionMetadata &) override
 
virtual unity::scopes::SearchQueryBase::UPtr search (unity::scopes::CannedQuery const &q, unity::scopes::SearchMetadata const &) override
 

Detailed Description

Defines the lifecycle of scope plugin, and acts as a factory for Query and Preview objects.

Member Function Documentation

§ preview()

virtual unity::scopes::PreviewQueryBase::UPtr unity::scopes::qt::QScopeBaseAPI::preview ( const unity::scopes::Result &  ,
const unity::scopes::ActionMetadata &   
)
overridevirtual

Called each time a new preview is requested

§ search()

virtual unity::scopes::SearchQueryBase::UPtr unity::scopes::qt::QScopeBaseAPI::search ( unity::scopes::CannedQuery const &  q,
unity::scopes::SearchMetadata const &   
)
overridevirtual

Called each time a new query is requested

§ start()

virtual void unity::scopes::qt::QScopeBaseAPI::start ( std::string const &  scope_id)
overridevirtual

Called by the scopes run time after the create function completes.

If start() throws an exception, stop() will not be called.

The call to start() is made by the same thread that calls the create function.

Parameters
scope_idThe name of the scope as defined by the scope's configuration file.

§ stop()

virtual void unity::scopes::qt::QScopeBaseAPI::stop ( )
overridevirtual

Called by the scopes run time when the scope should shut down.

A scope should deallocate as many resources as possible when stop() is called, for example, deallocate any caches and close network connections. In addition, if the scope implements run() and did not return from run(), it must return from run() in response to the call to stop().

Exceptions from stop() are ignored.

The call to stop() is made by the same thread that calls the create function and start().


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