|
1 /* |
|
2 * Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Interface for search operations |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef MCASEARCHINTERFACE_H |
|
20 #define MCASEARCHINTERFACE_H |
|
21 |
|
22 #include "MCAImpsFundClient.h" |
|
23 |
|
24 // FORWARD DECLARATIONS |
|
25 class MCASearchData; |
|
26 class MCASearchObserverInterface; |
|
27 |
|
28 // CLASS DECLARATION |
|
29 |
|
30 /** |
|
31 * Search services interface for UI and Engine. |
|
32 * |
|
33 * @lib CAEngine.lib |
|
34 * @since 2.1 |
|
35 */ |
|
36 class MCASearchInterface |
|
37 { |
|
38 public: |
|
39 |
|
40 /** |
|
41 * Start the search. |
|
42 * @param aPairs defines what is to be searched. |
|
43 * @param aSearchLimit defines how many results you want. |
|
44 * @param aObserver The observer for this search operation |
|
45 * @return Error code. |
|
46 * Leaves |
|
47 * ESearchNotSupported |
|
48 */ |
|
49 virtual TInt StartSearchL( |
|
50 const CSearchPairs& aPairs, |
|
51 TInt aSearchLimit, |
|
52 MCASearchObserverInterface* aObserver ) = 0; |
|
53 |
|
54 /** |
|
55 * Stops the current search. Must be called before starting new search. |
|
56 * @return Error code. |
|
57 * Leaves |
|
58 * ESearchNotSupported |
|
59 */ |
|
60 virtual TInt EndSearchL() = 0; |
|
61 |
|
62 /** |
|
63 * Continues search. This function must only be called when more results |
|
64 * are wanted. |
|
65 * @param aIndex specifies the next index where to start search. |
|
66 * @param aObserver The observer for this search operation |
|
67 * @return Error code. |
|
68 * Leaves |
|
69 * ERequestedResultsButNotAvailable |
|
70 * ESearchNotSupported |
|
71 */ |
|
72 virtual TInt SearchNextL( TInt aIndex, |
|
73 MCASearchObserverInterface* aObserver ) = 0; |
|
74 |
|
75 /** |
|
76 * Get handle to the search data representation. |
|
77 * @return Pointer to the search data interface. |
|
78 */ |
|
79 virtual MCASearchData* SearchDataInterface() const = 0; |
|
80 |
|
81 protected: |
|
82 |
|
83 /** |
|
84 * Destructor. |
|
85 */ |
|
86 virtual ~MCASearchInterface() {}; |
|
87 }; |
|
88 |
|
89 #endif // MCASEARCHINTERFACE_H |
|
90 |
|
91 // End of File |