00001 /* 00002 * ============================================================================== 00003 * Name : CLmkEditorDlg.h 00004 * Part of : Landmarks UI / LmkCommonUI.dll 00005 * Interface : Public 00006 * Description : This class provides functionality for viewing and editing 00007 * landmark data. 00008 * Version : 00009 * 00010 * Copyright (c) 2004 Nokia Corporation. 00011 * This material, including documentation and any related 00012 * computer programs, is protected by copyright controlled by 00013 * Nokia Corporation. All rights are reserved. Copying, 00014 * including reproducing, storing, adapting or translating, any 00015 * or all of this material requires the prior written consent of 00016 * Nokia Corporation. This material also contains confidential 00017 * information which may not be disclosed to others without the 00018 * prior written consent of Nokia Corporation. 00019 * ============================================================================== 00020 */ 00021 00022 #ifndef CLMKEDITORDLG_H 00023 #define CLMKEDITORDLG_H 00024 00025 // INCLUDES 00026 #include "EPos_CPosLandmark.h" 00027 #include <EPos_Landmarks.h> // Lm typedefs, constants etc. 00028 #include <e32base.h> // CBase 00029 00030 // FORWARD DECLARATIONS 00031 class CPosLandmarkDatabase; 00032 class CPosLandmark; 00033 class CLmkEditorImpl; 00034 class MObjectProvider; 00035 class TCoeHelpContext; 00036 class CLmkSender; 00037 00038 // TYPE DEFINITIONS 00039 typedef TUint32 TLmkEditorAttributes; 00040 typedef TInt TLmkEditorMode; 00041 00042 // CLASS DECLARATION 00050 class CLmkEditorDlg : public CBase 00051 { 00052 public: // Types 00053 00061 enum _TLmkEditorAttributes 00062 { 00064 ELmkOnlyName = 0x0000, 00066 ELmkCategory = 0x0001, 00068 ELmkStreet = 0x0002, 00070 ELmkCity = 0x0004, 00072 ELmkStateProvince = 0x0008, 00074 ELmkCountry = 0x0010, 00076 ELmkPostalZIP = 0x0020, 00078 ELmkLatitude = 0x0040, 00080 ELmkLongitude = 0x0080, 00084 ELmkPositionAccuracy = 0x0100, 00087 ELmkAltitude = 0x0200, 00090 ELmkAltitudeAccuracy = 0x0400, 00092 ELmkAll = 0xFFFF 00093 #start_since SINCE_3_1_SDK 00094 00095 ,ELmkDescription = 0x0800, 00097 ELmkPhoneNumber = 0x1000, 00099 ELmkWebAddress = 0x2000 00100 #end_since SINCE_3_1_SDK 00101 }; 00102 00110 enum _TLmkEditorMode 00111 { 00113 ELmkEditor, 00115 ELmkViewer // only viewing allowed 00116 }; 00117 00124 class TLmkEditorParams 00125 { 00126 public: // Constructors and destructor 00131 IMPORT_C TLmkEditorParams(); 00132 00133 // Compiler-generated destructor is ok for this class; 00134 00135 private: // Unimplemented functions 00136 // Unimplemented copy constructor 00137 TLmkEditorParams( const TLmkEditorParams& ); 00138 00139 // Unimplemented assignment operator 00140 TLmkEditorParams& operator = ( const TLmkEditorParams& ); 00141 00142 public: // Input parameters 00143 00149 TLmkEditorAttributes iAttributes; 00150 00155 TLmkEditorMode iEditorMode; 00156 }; 00157 00158 public: // Constructors and destructor 00172 IMPORT_C static CLmkEditorDlg* NewL( CPosLandmarkDatabase& aDb, 00173 TPosLmItemId aLandmarkId, 00174 TLmkEditorParams& aParams ); 00175 00191 IMPORT_C static CLmkEditorDlg* NewL( CPosLandmarkDatabase& aDb, 00192 CPosLandmark& aLandmark, 00193 TLmkEditorParams& aParams ); 00194 00198 IMPORT_C ~CLmkEditorDlg(); 00199 00200 public: // New functions 00205 IMPORT_C void SetMopParent( MObjectProvider* aParent ); 00206 00214 IMPORT_C void SetHelpContext( TCoeHelpContext aContext ); 00215 00241 IMPORT_C TInt ExecuteLD(); 00242 #start_since SINCE_3_1_SDK 00243 00250 IMPORT_C void DisableMapAndNavigationMenuOptions(); 00251 #end_since SINCE_3_1_SDK 00252 00253 private: 00258 CLmkEditorDlg(); 00259 00267 void ConstructL( CPosLandmarkDatabase& aDb, 00268 TLmkEditorParams& aParams, 00269 TPosLmItemId aLandmarkId, 00270 CPosLandmark* aLandmark ); 00271 00272 private: // Data 00274 CLmkEditorImpl* iEditorImpl; 00275 00277 TBool* iDestroyedPtr; 00278 00280 CLmkSender* iSender; 00281 }; 00282 00283 // CLMKEDITORDLG_H 00284 #endif 00285 00286 // End of File