landmarksui/uicontrols/inc/CLmkDlgLmSelectorImpl.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 -    CLmkDlgLmSelectorImpl class
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 #ifndef CLMKDLGLMSELECTORIMPL_H
       
    25 #define CLMKDLGLMSELECTORIMPL_H
       
    26 
       
    27 //  INCLUDES
       
    28 #include "CLmkDlgSelectorImplBase.h"
       
    29 #include "MLmkListProviderObserver.h"
       
    30 #include <eikcmobs.h>       // MEikCommandObserver
       
    31 
       
    32 // FORWARD DECLARATIONS
       
    33 class CPosLmSearchCriteria;
       
    34 
       
    35 // CLASS DECLARATION
       
    36 
       
    37 /**
       
    38 * CLmkDlgLmSelectorImpl class
       
    39 */
       
    40 class CLmkDlgLmSelectorImpl : public CLmkDlgSelectorImplBase
       
    41     {
       
    42     public:  // Constructors and destructor
       
    43         /**
       
    44         * Create CLmkDlgLmSelectorImpl object
       
    45         * @param aDb
       
    46         * @return newly instantiated object
       
    47         */
       
    48         IMPORT_C static CLmkDlgLmSelectorImpl* NewL(
       
    49                             CPosLandmarkDatabase& aDb );
       
    50 
       
    51         /**
       
    52         * Create CLmkDlgLmSelectorImpl object
       
    53         * @param aDb
       
    54         * @param aCriteria
       
    55         * @return newly instantiated object
       
    56         */
       
    57         IMPORT_C static CLmkDlgLmSelectorImpl* NewL(
       
    58                                             CPosLandmarkDatabase& aDb,
       
    59                                             CPosLmSearchCriteria* aCriteria );
       
    60 
       
    61         /**
       
    62         * Destructor.
       
    63         */
       
    64         ~CLmkDlgLmSelectorImpl();
       
    65 
       
    66     public: // From CLmkSelectorImplBase
       
    67         void SetupListProviderL();
       
    68         const CLmkListProviderBase& ListProvider() const;
       
    69         void GetDlgResources( TBool aIsSingleSelector,
       
    70                               TInt& aTitlePaneResource,
       
    71                               TInt& aMenuBarResource,
       
    72                               TInt& aDialogResource ) const;
       
    73 
       
    74     protected: // From MLmkListProviderObserver
       
    75         void HandleListProviderEvent( TLmkListProviderEventType aEvent );
       
    76         void HandleListProviderError( TInt aError );
       
    77 
       
    78     protected:  // Constructors and destructor
       
    79         /**
       
    80         * C++ default constructor.
       
    81         * @param aDb
       
    82         * @return newly instantiated object
       
    83         */
       
    84         CLmkDlgLmSelectorImpl( CPosLandmarkDatabase& aDb );
       
    85 
       
    86         /**
       
    87         * C++ default constructor.
       
    88         * @param aDb
       
    89         * @parma aCriteria
       
    90         * @return newly instantiated object
       
    91         */
       
    92         CLmkDlgLmSelectorImpl( CPosLandmarkDatabase& aDb,
       
    93                                CPosLmSearchCriteria* aCriteria );
       
    94 
       
    95         /**
       
    96         * By default Symbian 2nd phase constructor is private.
       
    97         */
       
    98         void ConstructL();
       
    99 
       
   100     private:    // Data
       
   101         /**
       
   102         * Updates the Navi Label, based on the category id
       
   103         * Used only when gets ELmkEventCategoryUpdated event.
       
   104         */
       
   105         void UpdateNaviLabelL();
       
   106         /**
       
   107         * This function is called to check if the criteria based category
       
   108         * exists in the Landmarks database or not, this check is required,
       
   109         * since the category might have been deleted from the landmarks,
       
   110         * Hence the Category contents dialog which is open needs to be
       
   111         * closed.
       
   112         */
       
   113         TBool CheckDbIfCriteriaCategoryExistsL();
       
   114     private:    // Data
       
   115         ///Own:
       
   116         CPosLmSearchCriteria* iCriteria;
       
   117     };
       
   118 
       
   119 #endif      // CLMKDLGLMSELECTORIMPL_H
       
   120 
       
   121 // End of File