landmarksui/uicontrols/inc/CLmkSelectorCache.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 -    Selector's cache class
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 
       
    25 #ifndef CLMKSELECTORCACHE_H
       
    26 #define CLMKSELECTORCACHE_H
       
    27 
       
    28 //  INCLUDES
       
    29 #include <e32base.h>        // CBase
       
    30 #include "MLmkListProviderObserver.h"
       
    31 
       
    32 // FORWARD DECLARATIONS
       
    33 class CLmkListProviderBase;
       
    34 class CLmkUiItemBase;
       
    35 
       
    36 
       
    37 // CLASS DECLARATION
       
    38 /**
       
    39 * CLmkSelectorCache class
       
    40 */
       
    41 class CLmkSelectorCache : public CBase, public MLmkListProviderObserver
       
    42     {
       
    43     private:
       
    44         class CLinkedItem: public CBase
       
    45             {
       
    46             public:
       
    47                 CLinkedItem();
       
    48                 ~CLinkedItem();
       
    49             public:
       
    50                 TInt iIndex;
       
    51                 CLmkUiItemBase* iPtr;
       
    52             };
       
    53 
       
    54     public:  // Constructors and destructor
       
    55 
       
    56         /**
       
    57         *
       
    58         *
       
    59         * @return newly instantiated object
       
    60         */
       
    61         static CLmkSelectorCache* NewL( CLmkListProviderBase& aListProvider );
       
    62 
       
    63         /**
       
    64         * Destructor.
       
    65         */
       
    66         ~CLmkSelectorCache();
       
    67 
       
    68     public: // New functions
       
    69 
       
    70         CLmkUiItemBase& ItemAtL( TInt aIndex );
       
    71 
       
    72         TInt ItemCount() const;
       
    73 
       
    74     public: // From MLmkListProviderObserver
       
    75 
       
    76         void HandleListProviderEvent( TLmkListProviderEventType aEvent );
       
    77 
       
    78         void HandleListProviderError( TInt aError );
       
    79 
       
    80     protected:  // New functions
       
    81 
       
    82     protected:  // Functions from base classes
       
    83 
       
    84     private:  // Constructors and destructor
       
    85 
       
    86         /**
       
    87         * C++ default constructor.
       
    88         */
       
    89         CLmkSelectorCache( CLmkListProviderBase& aListProvider );
       
    90 
       
    91         /**
       
    92         * By default Symbian 2nd phase constructor is private.
       
    93         */
       
    94         void ConstructL();
       
    95 
       
    96     private:    // Data
       
    97 
       
    98         CLmkListProviderBase& iListProvider;
       
    99         RPointerArray<CLinkedItem> iItemList;
       
   100     };
       
   101 
       
   102 #endif      // CLMKSELECTORCACHE_H
       
   103 
       
   104 // End of File