upnpharvester/common/cmlibrary/inc/cmstorelistitem.h
branchIOP_Improvements
changeset 40 08b5eae9f9ff
parent 39 6369bfd1b60d
child 41 b4d83ea1d6e2
equal deleted inserted replaced
39:6369bfd1b60d 40:08b5eae9f9ff
     1 /*
       
     2 * Copyright (c) 2006-2007 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:      Capsulating Store file list items
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 #ifndef __CMSTORELISTITEM_H
       
    24 #define __CMSTORELISTITEM_H
       
    25 
       
    26 // INCLUDES
       
    27 #include <e32base.h>
       
    28 #include "cmbaselistitem.h"
       
    29 
       
    30 // FORWARD DECLARATIONS
       
    31 class RWriteStream;
       
    32 class RReadStream;
       
    33 
       
    34 /**
       
    35  *  CCmStoreListItem class
       
    36  *    Capsulating Store file list items
       
    37  *  @lib cmcommon.lib
       
    38  *  @since S60 v3.0
       
    39  */
       
    40 class CCmStoreListItem : public CCmBaseListItem
       
    41     {
       
    42 
       
    43 public:
       
    44 
       
    45     /* Constructors and destructor. */
       
    46 
       
    47     /**
       
    48      * Creates new CCmStoreListItem class.
       
    49      * @return  pointer to CCmStoreListItem class
       
    50      */
       
    51     IMPORT_C static CCmStoreListItem* NewL();
       
    52     
       
    53     /**
       
    54      * Creates new CCmStoreListItem class and 
       
    55      * leaves the instance in the cleanup stack.
       
    56      * @return  pointer to CCmStoreListItem class
       
    57      */
       
    58     IMPORT_C static CCmStoreListItem* NewLC();
       
    59 
       
    60     /**
       
    61      * Destructor.
       
    62      */
       
    63     IMPORT_C virtual ~CCmStoreListItem();
       
    64 
       
    65 public:
       
    66     
       
    67     // Sets
       
    68     IMPORT_C void SetListId( const TUint aListId );
       
    69         
       
    70     IMPORT_C void SetDevId( const TUint8 aId, TCmListItemStatus aStatus );
       
    71 
       
    72     // Gets
       
    73     IMPORT_C TUint ListId() const;
       
    74     
       
    75     IMPORT_C RArray<TInt> DevIds() const;
       
    76     
       
    77     IMPORT_C RArray<TCmListItemStatus> StatusValues() const;
       
    78     
       
    79     IMPORT_C void UpdateFileStatusL( const TUint8 aId, 
       
    80                         TCmListItemStatus aStatus );
       
    81     
       
    82     /** 
       
    83     * Externalizes container information to stream.
       
    84     * Leaves in case of errors.
       
    85     * @since Series 60 3.1
       
    86     * @param reference to RWriteStream
       
    87     * @return none
       
    88     */
       
    89     IMPORT_C void ExternalizeL( RWriteStream& aStream ) const;
       
    90     
       
    91     /**
       
    92     * Internalizes container information from stream.
       
    93     * Leaves in case of errors.
       
    94     * @since Series 60 3.1
       
    95     * @param reference to RReadStream
       
    96     * @return none
       
    97     */
       
    98     IMPORT_C void InternalizeL( RReadStream& aStream );    
       
    99 
       
   100 protected:
       
   101 
       
   102     /**
       
   103      * Constructor.
       
   104      */
       
   105     CCmStoreListItem();
       
   106 
       
   107     /**
       
   108      * Second-phase constructor.
       
   109      */
       
   110     void ConstructL();
       
   111     
       
   112 
       
   113 private: // data
       
   114 
       
   115     TUint iListId;
       
   116     RArray<TInt>iDeviceIds;
       
   117     RArray<TCmListItemStatus>iStatusValues;
       
   118     };
       
   119 
       
   120 #endif //  __CMSTORELISTITEM_H