upnpframework/upnpcommonui/inc/upnpbrowsecacheitem.h
branchIOP_Improvements
changeset 40 08b5eae9f9ff
parent 39 6369bfd1b60d
child 41 b4d83ea1d6e2
equal deleted inserted replaced
39:6369bfd1b60d 40:08b5eae9f9ff
     1 /*
       
     2 * Copyright (c) 2005-2006 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:  Header file for the UPnPSelectionDialog class implementation
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __UPNP_BROWSE_CACHE_ITEM_H__
       
    20 #define __UPNP_BROWSE_CACHE_ITEM_H__
       
    21 
       
    22 // FORWARD DECLARATIONS
       
    23 class CUpnpObject;
       
    24 
       
    25 class CUPnPBrowseCacheItem : public CBase
       
    26     {
       
    27 
       
    28     public:  // Constructors and destructor
       
    29 
       
    30         /**
       
    31         * Two-phased constructor.
       
    32         */
       
    33         //IMPORT_C static CUPnPBrowseCacheItem* NewL();
       
    34 
       
    35         /**
       
    36         * Two-phased constructor.
       
    37         */
       
    38         IMPORT_C static CUPnPBrowseCacheItem* NewL(
       
    39                             const TDesC8& aContainer,
       
    40                             TInt aHighLightedItem,
       
    41                             TInt aFirstItem);
       
    42 
       
    43         /**
       
    44         * Destructor.
       
    45         */
       
    46         IMPORT_C virtual ~CUPnPBrowseCacheItem();
       
    47 
       
    48         /**
       
    49         * Returns the container Id
       
    50         * @since Series 60 3.1
       
    51         * @param None
       
    52         * @return HBufC8& the container Id 
       
    53         */
       
    54         IMPORT_C const HBufC8& ContainerId() const;
       
    55 
       
    56         /**
       
    57         * Sets the item array
       
    58         * @since Series 60 3.1
       
    59         * @param aBrowseArray CUpnpObjectList Pointer
       
    60         * @return None
       
    61         */
       
    62         IMPORT_C void SetItemArrayL(
       
    63                         const RPointerArray<CUpnpObject>& aBrowseArray );
       
    64 
       
    65         /**
       
    66         * Sets the index of the first item
       
    67         * @since Series 60 3.1
       
    68         * @param aFirstItem (TInt) index of the first item
       
    69         * @return None
       
    70         */
       
    71         IMPORT_C void SetFirstItem( const TInt aFirstItem );
       
    72 
       
    73         /**
       
    74         * Sets the total count of items in this container
       
    75         * @since Series 60 3.2
       
    76         * @param aTotalCount (TInt) number of items in this container
       
    77         * @return None
       
    78         */
       
    79         void SetTotalCount( const TInt aTotalCount );
       
    80 
       
    81         /**
       
    82         * Sets the index of the highlighted item
       
    83         * @since Series 60 3.1
       
    84         * @param aHighLightedItem (TInt) index of the first item
       
    85         * @return None
       
    86         */
       
    87         IMPORT_C void SetHighLightedItem(const TInt aHighLightedItem);
       
    88 
       
    89         /**
       
    90         * Returns an object
       
    91         * @since Series 60 3.1
       
    92         * @param aItemToGet (TInt) index of the item
       
    93         * @return CUpnpObject& the object
       
    94         */
       
    95         IMPORT_C const CUpnpObject* GetItem(const TInt aItemToGet);
       
    96 
       
    97         /**
       
    98         * Returns the number of items
       
    99         * @since Series 60 3.1
       
   100         * @param None
       
   101         * @return TInt& the number of items
       
   102         */
       
   103         IMPORT_C TInt GetNumberOfItems() const;
       
   104 
       
   105         /**
       
   106         * Returns the index of the top most item
       
   107         * @since Series 60 3.1
       
   108         * @param None
       
   109         * @return TInt& the index of the top most item
       
   110         */
       
   111         IMPORT_C TInt GetUpperMostItem() const;
       
   112 
       
   113         /**
       
   114         * Returns the total count of items in this container
       
   115         * @since Series 60 3.2
       
   116         * @param None
       
   117         * @return TInt total number of items
       
   118         */
       
   119         TInt GetTotalCount() const;
       
   120 
       
   121         /**
       
   122         * Returns the index of the highlighted item
       
   123         * @since Series 60 3.1
       
   124         * @param None
       
   125         * @return TInt& the index the highlighted item
       
   126         */
       
   127         IMPORT_C TInt GetHighlightedItem() const;
       
   128 
       
   129     protected:
       
   130 
       
   131         /**
       
   132         * C++ default constructor.
       
   133         */
       
   134         CUPnPBrowseCacheItem();
       
   135 
       
   136     private:
       
   137 
       
   138         /**
       
   139         * 2nd constructor
       
   140         */
       
   141         void ConstructL( const TDesC8& aContainer,
       
   142                          TInt aHighLightedItem,
       
   143                          TInt aFirstItem );
       
   144 
       
   145     protected: // Data
       
   146 
       
   147         // Object ID
       
   148         HBufC8*                     iContainerData; //owned
       
   149 
       
   150         //array of items
       
   151         RPointerArray<CUpnpObject>  iItemArray; // owned
       
   152 
       
   153         //first Item in Array
       
   154         TInt                        iFirstItem;
       
   155 
       
   156         //first Item in Array
       
   157         TInt                        iTotalCount;
       
   158 
       
   159         //highlighted item
       
   160         TInt                        iHighLightedItem;
       
   161       
       
   162       };
       
   163 
       
   164 #endif // __UPNP_BROWSE_CACHE_ITEM_H__
       
   165 
       
   166 // End of file