4
#include <api/config.h>
6
#include <unity/scopes/ScopeBase.h>
7
#include <unity/scopes/QueryBase.h>
8
#include <unity/scopes/ReplyProxyFwd.h>
9
#include <unity/scopes/QueryBase.h>
10
#include <unity/scopes/PreviewQueryBase.h>
15
* Defines the lifecycle of scope plugin, and acts as a factory
16
* for Query and Preview objects.
18
* Note that the #preview and #search methods are each called on
19
* different threads, so some form of interlocking is required
20
* if shared data structures are used.
22
class Scope: public unity::scopes::ScopeBase {
25
* Called once at startup
27
void start(std::string const&) override;
35
* Called each time a new preview is requested
37
unity::scopes::PreviewQueryBase::UPtr preview(const unity::scopes::Result&,
38
const unity::scopes::ActionMetadata&) override;
41
* Called each time a new query is requested
43
unity::scopes::SearchQueryBase::UPtr search(
44
unity::scopes::CannedQuery const& q,
45
unity::scopes::SearchMetadata const&) override;
48
api::Config::Ptr config_;
53
#endif // SCOPE_SCOPE_H_