1 /* |
|
2 * Copyright (c) 2004 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: LandmarksUi Content File - Landmark list provider. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 #ifndef CLMKLANDMARKLISTPROVIDER_H |
|
26 #define CLMKLANDMARKLISTPROVIDER_H |
|
27 |
|
28 // INCLUDES |
|
29 #include "CLmkLmItemListProvider.h" |
|
30 |
|
31 // FORWARD DECLARATIONS |
|
32 class CPosLmPartialReadParameters; |
|
33 class CPosLandmarkSearch; |
|
34 class CPosLmOperation; |
|
35 |
|
36 // CLASS DECLARATION |
|
37 |
|
38 /** |
|
39 * CLmkLandmarkListProvider class |
|
40 */ |
|
41 class CLmkLandmarkListProvider : public CLmkLmItemListProvider |
|
42 { |
|
43 public: // Constructors and destructor |
|
44 /** |
|
45 * Creates a provider for all items in the database. |
|
46 * @param aDb landmark database reference |
|
47 * @return newly instantiated object |
|
48 */ |
|
49 static CLmkLandmarkListProvider* NewL( CPosLandmarkDatabase& aDb ); |
|
50 |
|
51 /** |
|
52 * Destructor. |
|
53 */ |
|
54 ~CLmkLandmarkListProvider(); |
|
55 |
|
56 public: // From CLmkListProviderBase |
|
57 CLmkUiItemBase* ItemAtL( TInt aIndex ); |
|
58 |
|
59 public: // From MLmkDbObserver |
|
60 void HandleDatabaseEvent( TPosLmEvent& aEvent ); |
|
61 |
|
62 protected: // From CLmkLmItemListProvider |
|
63 void PrepareListL(); |
|
64 TBool PrepareListL(const TDesC& aSearchPattern, |
|
65 TBool aSearchOnlyInPreviousMatches); |
|
66 void RemoveLandmarksL(const RArray<TPosLmItemId>& aSelectedItems ) ; |
|
67 |
|
68 protected: // From MLmkAOOperationObserver |
|
69 void HandleOperationL( TOperationTypes aType, |
|
70 TReal32 aProgress, |
|
71 TInt aStatus ); |
|
72 |
|
73 protected: // New methods |
|
74 /** |
|
75 * Read items to array |
|
76 */ |
|
77 void ReadItemsToArrayL(); |
|
78 |
|
79 /** |
|
80 * Prepare items for deletion |
|
81 */ |
|
82 void PrepareForDeleteL() ; |
|
83 |
|
84 private: // Constructors and destructor |
|
85 /** |
|
86 * C++ constructor. |
|
87 * @param aDb |
|
88 * @return newly instantiated object |
|
89 */ |
|
90 CLmkLandmarkListProvider( CPosLandmarkDatabase& aDb ); |
|
91 |
|
92 /** |
|
93 * By default Symbian 2nd phase constructor is private. |
|
94 */ |
|
95 void ConstructL(); |
|
96 |
|
97 private: // Data |
|
98 ///Own: |
|
99 CPosLmPartialReadParameters* iReadParams; |
|
100 |
|
101 ///Own: |
|
102 CPosLandmarkSearch* iSearch; |
|
103 |
|
104 ///Own: |
|
105 CLmkAOOperation* iSearchAO; |
|
106 }; |
|
107 |
|
108 #endif // CLMKLANDMARKLISTPROVIDER_H |
|
109 |
|
110 // End of File |
|