18
|
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 - CLmkSaveLandmarkUtils contains methods in aiding saving landmarks
|
|
15 |
* : from the received landmarks package via Landmarks messaging
|
|
16 |
*
|
|
17 |
*/
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
|
22 |
|
|
23 |
|
|
24 |
|
|
25 |
#ifndef CLMKSAVELANDMARKUTILS_H
|
|
26 |
#define CLMKSAVELANDMARKUTILS_H
|
|
27 |
|
|
28 |
#include <e32std.h>
|
|
29 |
#include <e32base.h>
|
|
30 |
#include <EPos_CPosLandmarkDatabase.h>
|
|
31 |
#include "CLmkLandMarkCategoriesName.h"
|
|
32 |
#include "CLmkAOOperation.h"
|
|
33 |
|
|
34 |
// FORWARD DECLARATIONS
|
|
35 |
class CLmkParser;
|
|
36 |
class CEikonEnv;
|
|
37 |
|
|
38 |
|
|
39 |
/**
|
|
40 |
* CLmkSaveLandmarkUtils class.
|
|
41 |
* This class contains the methods for saving landmarks from
|
|
42 |
* received landmarks package via Landmarks messaging
|
|
43 |
* These methods are currently used by CLmkPackageEditor and
|
|
44 |
* CLmkPackageSelector
|
|
45 |
*/
|
|
46 |
class CLmkSaveLandmarkUtils : public CBase, public MLmkAOOperationObserver
|
|
47 |
{
|
|
48 |
public: // Constructors and destructor
|
|
49 |
|
|
50 |
/**
|
|
51 |
* Creates CLmkSaveLandmarkUtils
|
|
52 |
* @return newly instantiated object
|
|
53 |
*/
|
|
54 |
IMPORT_C static CLmkSaveLandmarkUtils* NewL(CPosLandmarkDatabase& aDb,CLmkParser& aParser);
|
|
55 |
|
|
56 |
/**
|
|
57 |
* Destructor.
|
|
58 |
*/
|
|
59 |
virtual ~ CLmkSaveLandmarkUtils();
|
|
60 |
|
|
61 |
protected: // Constructors and destructor
|
|
62 |
/**
|
|
63 |
* C++ constructor.
|
|
64 |
* @return newly instantiated object
|
|
65 |
*/
|
|
66 |
CLmkSaveLandmarkUtils(CPosLandmarkDatabase& aDb,CLmkParser& aParser);
|
|
67 |
|
|
68 |
/**
|
|
69 |
* By default Symbian 2nd phase constructor is private.
|
|
70 |
*/
|
|
71 |
void ConstructL();
|
|
72 |
public://from MLmkAOOperationObserver
|
|
73 |
|
|
74 |
void HandleOperationL(TOperationTypes aType, TReal32 aProgress, TInt aStatus );
|
|
75 |
|
|
76 |
public :
|
|
77 |
|
|
78 |
/*
|
|
79 |
* Check for new received categories
|
|
80 |
*/
|
|
81 |
TInt CheckForNewCategoriesL(RArray<TUint> & aSelectedIndices,
|
|
82 |
TDes& aNewFoundCategory,
|
|
83 |
RArray<TCategoryName>& aNewcategories);
|
|
84 |
/**
|
|
85 |
* Checks the new received categories, this function is used by the
|
|
86 |
* category search operation.
|
|
87 |
* @param aNewFoundCategory
|
|
88 |
* @param aNewcategories
|
|
89 |
*/
|
|
90 |
TInt CheckForNewCategories2L(
|
|
91 |
TDes& aNewFoundCategory,
|
|
92 |
RArray<TCategoryName>& aNewcategories);
|
|
93 |
/*
|
|
94 |
* Display confirmation query
|
|
95 |
*/
|
|
96 |
TInt CategoryAddConfirmationQueryL( TInt aAmount, const TDesC& aNewCategoryName );
|
|
97 |
/*
|
|
98 |
* Display confirmation note
|
|
99 |
*/
|
|
100 |
void LmsSavedConfirmationNoteL(RArray<TUint> & aImportIndexes,
|
|
101 |
TInt aEditedItemIndex = 0);
|
|
102 |
|
|
103 |
public://New Functions
|
|
104 |
/**
|
|
105 |
* Sets the observer for searching new categories operations
|
|
106 |
* from a landmarks pacakge.
|
|
107 |
* @param aObserver
|
|
108 |
*/
|
|
109 |
void SetObserver(MLmkAOOperationObserver* aObserver);
|
|
110 |
/**
|
|
111 |
* Cancels operations for searching new categories from the landmarks
|
|
112 |
* pacakge
|
|
113 |
*/
|
|
114 |
void CancelSearchNewCat();
|
|
115 |
/**
|
|
116 |
* Starts the search operations to find out new categories in landmarks
|
|
117 |
* package
|
|
118 |
* @param aNoOfNewCategories
|
|
119 |
* @param aNewCategories
|
|
120 |
* @param aNewCategoryFound
|
|
121 |
*/
|
|
122 |
void StartSearchNewCatL(TInt& aNoOfNewCategories,
|
|
123 |
RArray<TCategoryName>& aNewCategories,
|
|
124 |
TCategoryName& aNewCategoryFound);
|
|
125 |
private :
|
|
126 |
void CheckCategoryInDatabaseL(RArray<TCategoryName>& aNewcategories,
|
|
127 |
const TDesC& aCategoryTobeAdded);
|
|
128 |
|
|
129 |
private: // Data
|
|
130 |
|
|
131 |
/// Reference to database
|
|
132 |
CPosLandmarkDatabase& iDb;
|
|
133 |
|
|
134 |
///Ref: landmark parser
|
|
135 |
CLmkParser& iParser;
|
|
136 |
|
|
137 |
// Ref :Eikon Env
|
|
138 |
CEikonEnv* iEnv;
|
|
139 |
//Ref
|
|
140 |
MLmkAOOperationObserver* iObserver;
|
|
141 |
|
|
142 |
//Owns
|
|
143 |
CLmkAOOperation* iAOOperation;
|
|
144 |
};
|
|
145 |
|
|
146 |
#endif // CLMKSAVELANDMARKUTILS_H
|