|
1 /* |
|
2 * Copyright (c) 2005 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: Operation to search for landmarks or landmark categories from a |
|
15 * local database. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef CPOSLMLOCALSEARCHOPERATION_H |
|
21 #define CPOSLMLOCALSEARCHOPERATION_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <epos_cposlmlocaloperation.h> |
|
25 |
|
26 // FORWARD DECLARATION |
|
27 class CPosLmLocalDatabase; |
|
28 class CPosLmLocalSearch; |
|
29 class CPosLmLocalSearchHandler; |
|
30 |
|
31 // CLASS DECLARATION |
|
32 |
|
33 /** |
|
34 * Operation to search for landmarks or landmark categories from a |
|
35 * local database. |
|
36 */ |
|
37 class CPosLmLocalSearchOperation : public CPosLmLocalOperation |
|
38 { |
|
39 |
|
40 public: // Constructors and destructor |
|
41 |
|
42 /** |
|
43 * Two-phased constructor. |
|
44 * @param aDb A database object. |
|
45 * @param aLocalSearch A local search class. |
|
46 * @param aLocalSearchHandler A local search handler. |
|
47 */ |
|
48 static CPosLmLocalSearchOperation* NewL( |
|
49 /* IN */ CPosLmLocalDatabase* aDb, |
|
50 /* IN */ CPosLmLocalSearch* aLocalSearch, |
|
51 /* IN */ CPosLmLocalSearchHandler* aLocalSearchHandler |
|
52 ); |
|
53 |
|
54 /** |
|
55 * Destructor. |
|
56 */ |
|
57 virtual ~CPosLmLocalSearchOperation(); |
|
58 |
|
59 public: // New functions |
|
60 |
|
61 /** |
|
62 * This function must be called by the CPosLmLocalSearch class if it is |
|
63 * deleted before the search operation has completed. |
|
64 */ |
|
65 void HandleLocalSearchDeleted(); |
|
66 |
|
67 public: // Functions from base classes |
|
68 |
|
69 /** |
|
70 * From CPosLmLocalOperation; |
|
71 * |
|
72 * @param aProgress Will be set to the progress of the operation when |
|
73 * the step has finished. |
|
74 * @return @p KPosLmOperationNotComplete if the step has completed but |
|
75 * more steps are needed before the operation has finished, |
|
76 * @p KErrNone if the operation has finished successfully. |
|
77 */ |
|
78 TInt NextStepL( |
|
79 /* OUT */ TReal32& aProgress |
|
80 ); |
|
81 |
|
82 /** |
|
83 * From CPosLmLocalOperation; |
|
84 * |
|
85 * @param aError An error code generated by NextStepL. |
|
86 */ |
|
87 void HandleError( |
|
88 /* IN/OUT */ TInt& aError |
|
89 ); |
|
90 |
|
91 /** |
|
92 * From CPosLmLocalOperation; |
|
93 */ |
|
94 void HandleOperationCompleted(); |
|
95 |
|
96 protected: |
|
97 |
|
98 private: |
|
99 |
|
100 // By default, prohibit copy constructor |
|
101 CPosLmLocalSearchOperation( |
|
102 const CPosLmLocalSearchOperation& ); |
|
103 // Prohibit assigment operator |
|
104 CPosLmLocalSearchOperation& operator= ( |
|
105 const CPosLmLocalSearchOperation& ); |
|
106 |
|
107 /** |
|
108 * C++ default constructor. |
|
109 * @param aDb A database object. |
|
110 * @param aLocalSearch A local search class. |
|
111 * @param aLocalSearchHandler A local search handler. |
|
112 */ |
|
113 CPosLmLocalSearchOperation( |
|
114 /* IN */ CPosLmLocalDatabase* aDb, |
|
115 /* IN */ CPosLmLocalSearch* aLocalSearch, |
|
116 /* IN */ CPosLmLocalSearchHandler* aLocalSearchHandler |
|
117 ); |
|
118 |
|
119 /** |
|
120 * Symbian 2nd phase constructor. |
|
121 */ |
|
122 void ConstructL(); |
|
123 |
|
124 private: |
|
125 |
|
126 CPosLmLocalSearch* iLocalSearch; |
|
127 CPosLmLocalSearchHandler* iLocalSearchHandler; |
|
128 |
|
129 }; |
|
130 |
|
131 #endif // CPOSLMLOCALSEARCHOPERATION_H |
|
132 |
|
133 // End of File |