equal
deleted
inserted
replaced
31 // FORWARD DECLARATIONS |
31 // FORWARD DECLARATIONS |
32 class MCPixOpenDatabaseRequestObserver; |
32 class MCPixOpenDatabaseRequestObserver; |
33 class MCPixSearchRequestObserver; |
33 class MCPixSearchRequestObserver; |
34 class MCPixNextDocumentRequestObserver; |
34 class MCPixNextDocumentRequestObserver; |
35 class MCPixSetAnalyzerRequestObserver; |
35 class MCPixSetAnalyzerRequestObserver; |
36 |
36 class MCPixSetQueryParserRequestObserver; |
37 |
37 |
38 // CLASS DECLARATION |
38 // CLASS DECLARATION |
39 /** |
39 /** |
40 * @brief Used for committing searches into an index database |
40 * @brief Used for committing searches into an index database |
41 * @ingroup ClientAPI |
41 * @ingroup ClientAPI |
44 * |
44 * |
45 * Link against: CPixSearchClient.lib |
45 * Link against: CPixSearchClient.lib |
46 */ |
46 */ |
47 class CCPixSearcher : public CActive |
47 class CCPixSearcher : public CActive |
48 { |
48 { |
|
49 public: |
|
50 |
|
51 enum TQueryParser { |
|
52 /** |
|
53 * Database query parser provides advanced syntax support |
|
54 * for creating complex and powerful queries. This query parser |
|
55 * is intended for accessing the CPix databases. It is not |
|
56 * localized and it should not be used to form queries |
|
57 * directly from user input. It may simply fail with some |
|
58 * locales. |
|
59 */ |
|
60 EDatabaseQueryParser = 0, |
|
61 |
|
62 /** |
|
63 * Query parser aimed for incremental queries provided directly |
|
64 * by user. This query parser is localized and should |
|
65 * work properly for all locales. The language accepted |
|
66 * by this parser is always the language specified by |
|
67 * the current locale. May behave internally somewhat |
|
68 * differently depending of language, but as a rule it |
|
69 * should always provides meaningful results for direct |
|
70 * user input. |
|
71 */ |
|
72 EIncrementalQueryParser = 1 |
|
73 }; |
|
74 |
49 public: // Constructors and destructors |
75 public: // Constructors and destructors |
50 |
76 |
51 /** |
77 /** |
52 * NewL. |
78 * NewL. |
53 * Two-phase constructor. |
79 * Two-phase constructor. |
120 IMPORT_C void SetAnalyzerL( const TDesC& aAnalyzer ); |
146 IMPORT_C void SetAnalyzerL( const TDesC& aAnalyzer ); |
121 |
147 |
122 /** |
148 /** |
123 * SetAnalyzer. Asynchronous version |
149 * SetAnalyzer. Asynchronous version |
124 */ |
150 */ |
125 IMPORT_C void SetAnalyzerL( MCPixSetAnalyzerRequestObserver& aObserver, const TDesC& aAnalyzer ); |
151 IMPORT_C void SetAnalyzerL( MCPixSetAnalyzerRequestObserver& aObserver, const TDesC& aAnalyzer ); |
|
152 |
|
153 /** |
|
154 * SetAnalyzer. Synchronous version |
|
155 * |
|
156 * The set QueryParser defines the query syntax used for searching. Two |
|
157 * different query parsers are supported for two main use cases, that |
|
158 * are powerful accessing of the database for document and the other is |
|
159 * |
|
160 * |
|
161 * @note SetAnalyzerL MUST NOT be used, when searching using discovery services |
|
162 */ |
|
163 IMPORT_C void SetQueryParserL( TQueryParser aQueryParser ); |
|
164 |
|
165 /** |
|
166 * SetQueryParser. Synchronous version |
|
167 * |
|
168 * @note Query parser cannot be set for discovery service |
|
169 */ |
|
170 IMPORT_C void SetQueryParserL( MCPixSetQueryParserRequestObserver& aObserver, TQueryParser aQueryParser ); |
126 |
171 |
127 /** |
172 /** |
128 * SearchL. Synchronous version. |
173 * SearchL. Synchronous version. |
129 * Commits a search and prepares a list of documents matching the query to be retrieved |
174 * Commits a search and prepares a list of documents matching the query to be retrieved |
130 * from the server. Use NextDocumentL to iterate throught the document list. |
175 * from the server. Use NextDocumentL to iterate throught the document list. |
240 { |
285 { |
241 EStateNone = 0, |
286 EStateNone = 0, |
242 EStateOpenDatabase, |
287 EStateOpenDatabase, |
243 EStateSearch, |
288 EStateSearch, |
244 EStateGetDocument, |
289 EStateGetDocument, |
245 EStateSetAnalyzer |
290 EStateSetAnalyzer, |
|
291 EStateSetQueryParser |
246 }; |
292 }; |
247 |
293 |
248 union TObserver |
294 union TObserver |
249 { |
295 { |
250 void* iAny; |
296 void* iAny; |
251 MCPixOpenDatabaseRequestObserver* iOpenDatabase; |
297 MCPixOpenDatabaseRequestObserver* iOpenDatabase; |
252 MCPixSearchRequestObserver* iSearch; |
298 MCPixSearchRequestObserver* iSearch; |
253 MCPixNextDocumentRequestObserver* iNextDocument; |
299 MCPixNextDocumentRequestObserver* iNextDocument; |
254 MCPixSetAnalyzerRequestObserver* iSetAnalyzer; |
300 MCPixSetAnalyzerRequestObserver* iSetAnalyzer; |
|
301 MCPixSetQueryParserRequestObserver* iSetQueryParser; |
255 }; |
302 }; |
256 |
303 |
257 private: |
304 private: |
258 |
305 |
259 /** |
306 /** |