~gary-wzl77/+junk/newproperty

« back to all changes in this revision

Viewing changes to include/scope/query.h

  • Committer: Gary.Wzl
  • Date: 2015-08-31 09:23:43 UTC
  • Revision ID: gary.wang@canonical.com-20150831092343-x7coc5ukz9yelqjn
Init repo

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef SCOPE_QUERY_H_
 
2
#define SCOPE_QUERY_H_
 
3
 
 
4
#include <api/client.h>
 
5
 
 
6
#include <unity/scopes/SearchQueryBase.h>
 
7
#include <unity/scopes/ReplyProxyFwd.h>
 
8
 
 
9
namespace scope {
 
10
 
 
11
/**
 
12
 * Represents an individual query.
 
13
 *
 
14
 * A new Query object will be constructed for each query. It is
 
15
 * given query information, metadata about the search, and
 
16
 * some scope-specific configuration.
 
17
 */
 
18
class Query: public unity::scopes::SearchQueryBase {
 
19
public:
 
20
    Query(const unity::scopes::CannedQuery &query,
 
21
          const unity::scopes::SearchMetadata &metadata, api::Config::Ptr config);
 
22
 
 
23
    ~Query() = default;
 
24
 
 
25
    void cancelled() override;
 
26
 
 
27
    void run(const unity::scopes::SearchReplyProxy &reply) override;
 
28
 
 
29
private:
 
30
    api::Client client_;
 
31
};
 
32
 
 
33
}
 
34
 
 
35
#endif // SCOPE_QUERY_H_
 
36
 
 
37