landmarksui/uicontrols/inc/CLmkDlgPackageSelectorImpl.h
branchRCL_3
changeset 17 1fc85118c3ae
parent 16 8173571d354e
child 18 870918037e16
equal deleted inserted replaced
16:8173571d354e 17:1fc85118c3ae
     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 package viewer dialog.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 #ifndef CLMKDLGPACKAGEVIEWERIMPL_H
       
    25 #define CLMKDLGPACKAGEVIEWERIMPL_H
       
    26 
       
    27 //  INCLUDES
       
    28 #include "CLmkDlgLmSelectorImpl.h"
       
    29 #include "MLmkAOOperationObserver.h"
       
    30 #include "clmkmapnavigationinterface.h"
       
    31 #include "CLmkSaveLandmarkUtils.h"
       
    32 
       
    33 // FORWARD DECLARATIONS
       
    34 class CLmkParser;
       
    35 class CLmkSender;
       
    36 class CAknWaitDialog;
       
    37 
       
    38 // CLASS DECLARATION
       
    39 
       
    40 /**
       
    41 *  Landmark package viewer dialog.
       
    42 */
       
    43 class CLmkDlgPackageSelectorImpl
       
    44 : public CLmkDlgLmSelectorImpl,
       
    45   public MLmkAOOperationObserver
       
    46     {
       
    47     public:  // Constructors and destructor
       
    48 
       
    49         /**
       
    50         * Create package viewer dialog
       
    51         * @param aDb database reference
       
    52         * @param aParser landmark parser reference
       
    53         * @param aSender landmark sender reference
       
    54         * @return newly instantiated object
       
    55         */
       
    56         IMPORT_C static CLmkDlgPackageSelectorImpl* NewL(
       
    57                                 CPosLandmarkDatabase& aDb,
       
    58                                 CLmkParser& aParser,
       
    59                                 CLmkSender& aSender );
       
    60 
       
    61         /**
       
    62         * Destructor.
       
    63         */
       
    64         ~CLmkDlgPackageSelectorImpl();
       
    65 
       
    66     public: // From CLmkDlgSelectorImplBase
       
    67         void SetupListProviderL();
       
    68         void GetDlgResources( TBool aIsSingleSelector,
       
    69                               TInt& aTitlePaneResource,
       
    70                               TInt& aMenuBarResource,
       
    71                               TInt& aDialogResource ) const;
       
    72         TCoeHelpContext HelpContext() const;
       
    73 
       
    74     public: //from MLmkAOOperationObserver
       
    75         void HandleOperationL( TOperationTypes aType,
       
    76                               TReal32 aProgress,
       
    77                               TInt aStatus );
       
    78 
       
    79     protected: // From MEikCommandObserver
       
    80         void ProcessCommandL( TInt aCommandId );
       
    81 
       
    82     protected: // From MLmkDlgMenuObserver
       
    83         void DynInitDlgMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
       
    84 
       
    85     protected: // From MLmkNavigationObserver
       
    86         void HandleLaunchingEventL();
       
    87 
       
    88     protected:  // Constructors and destructor
       
    89         /**
       
    90         * C++ default constructor.
       
    91         */
       
    92         CLmkDlgPackageSelectorImpl( CPosLandmarkDatabase& aDb,
       
    93                                   CLmkParser& aParser,
       
    94                                   CLmkSender& aSender );
       
    95 
       
    96         /**
       
    97         * By default Symbian 2nd phase constructor is private.
       
    98         */
       
    99         void ConstructL();
       
   100 
       
   101     private: // New functions
       
   102         /**
       
   103         * Open landmark
       
   104         */
       
   105         void OpenLandmarkCmdL();
       
   106 
       
   107         /**
       
   108         * Save selected landmark(s)
       
   109         */
       
   110         void SaveLandmarksCmdL();
       
   111 
       
   112         /**
       
   113         * Save all landmarks in the package
       
   114         */
       
   115         void SaveAllLandmarksCmdL();
       
   116 
       
   117         /**
       
   118         * Sends the selected landmarks from the package
       
   119         */
       
   120         void SendSelectedLandmarksCmdL(TInt aCommandId);
       
   121 
       
   122         /**
       
   123         * Sends all the landmarks in package
       
   124         */
       
   125         void SendAllLandmarksCmdL(TInt aCommandId);
       
   126 
       
   127 		/**
       
   128         *
       
   129         */
       
   130 		void GetLandmarksInPackageL(RPointerArray<CPosLandmark> &aLmkArray);
       
   131 
       
   132     	/**
       
   133     	* This method is used to check if the supplied landmark has any valid
       
   134     	* coordinates or address. If either Latitude or Longitude are Nan and if
       
   135     	* none of the address fields have any valid entyr then the method returns
       
   136     	* ETrue otherwise returns EFalse.
       
   137     	*
       
   138     	* @param aLandmark is the landmark on which the check needs to be made
       
   139     	* @return ETrue if Landmark does not have any coordinates or address,
       
   140     	*               EFalse otherwise
       
   141     	*/
       
   142     	TBool IsLandmarkDataEmptyL( CPosLandmark* aLandmark );
       
   143 
       
   144     private:    // Data
       
   145         ///Ref: landmark parser
       
   146         CLmkParser& iParser;
       
   147 
       
   148         ///Ref: landmark sender
       
   149         CLmkSender& iSender;
       
   150 
       
   151         ///Own: iWaiNote
       
   152         CAknWaitDialog* iWaitNote;
       
   153 
       
   154         //Own: Pointer to map and navigation interface
       
   155         CLmkMapNavigationInterface* iMapNavInterface;
       
   156 
       
   157         // Ref: handle to landmark database
       
   158         CPosLandmarkDatabase& iDb;
       
   159 
       
   160         TCategoryName iNewCategoryFound;
       
   161         TInt iNoOfNewCategories;
       
   162         CLmkSaveLandmarkUtils* iSaveLmUtils;
       
   163         TOperationTypes iType;
       
   164         RArray<TUint> iTotalLms;
       
   165 
       
   166     };
       
   167 
       
   168 #endif      // CLMKDLGPACKAGEVIEWERIMPL_H
       
   169 
       
   170 // End of File