imstutils/imconversationview/imcvuiapp/inc/cimcvapprichtextcontainercache.h
branchRCL_3
changeset 22 3104fc151679
parent 21 2b7283837edb
child 23 9a48e301e94b
equal deleted inserted replaced
21:2b7283837edb 22:3104fc151679
     1 /*
       
     2 * Copyright (c) 2007-2008 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:  Cache to Store Rich Text Containers
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef _CIMCVAPPRICHTEXTCONTAINERCACHE_H
       
    20 #define _CIMCVAPPRICHTEXTCONTAINERCACHE_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include "cimcvapprichtextcontainer.h"
       
    24 #include  <e32base.h>
       
    25 
       
    26 //forward declaration
       
    27 class CIMCVAppRichTextContainer;
       
    28 
       
    29 /**
       
    30 *  Rich text container Cache
       
    31 *  @since Series 60 5.0
       
    32 */
       
    33 class CIMCVAppRichTextContainerCache : public CBase
       
    34     {
       
    35 public:
       
    36     
       
    37     /**
       
    38      * NewL()
       
    39      */
       
    40     static CIMCVAppRichTextContainerCache* NewL();
       
    41     
       
    42     /**
       
    43      * Destructor
       
    44      */
       
    45     ~CIMCVAppRichTextContainerCache();
       
    46     
       
    47 private:
       
    48     
       
    49     /**
       
    50      * Constructor
       
    51      */
       
    52     CIMCVAppRichTextContainerCache();
       
    53 
       
    54     
       
    55 public:
       
    56 
       
    57 
       
    58 	void UpdateSkinTextColorL  ();
       
    59 	
       
    60     /**
       
    61      * StoreContainer - stores the container to the cache
       
    62      * @param aPrimaryKey - Primary key used for storage
       
    63      * @param aContainer - CIMCVAppRichTextContainer object to be stored
       
    64      */
       
    65     void StoreContainer( CIMCVAppRichTextContainer *aContainer);
       
    66     
       
    67     /**
       
    68      * LoadContainer - Returns the container from the cache
       
    69      * @param aPrimaryKey - Primary key used for Searching
       
    70      * @return - the object if found else returns NULL
       
    71      */
       
    72     CIMCVAppRichTextContainer* LoadContainer(TInt aServiceId, const TDesC& aPrimaryKey);
       
    73     
       
    74     /**
       
    75      * DeleteContainer - Deletes the container from the cache
       
    76      * @param aPrimaryKey - Primary key used for Searching
       
    77      * @ aServiceId, aservice id
       
    78      */
       
    79     void DeleteContainer(const TDesC& aPrimaryKey, TInt aServiceId );
       
    80     
       
    81     /**
       
    82      * DeleteAllServiceContainer - Deletes the container from the cache which has aServiceId
       
    83      * @param aServiceId - Primary key used for Searching
       
    84      */
       
    85     void DeleteAllServiceContainer(TInt aServiceId );
       
    86     
       
    87 private:
       
    88     
       
    89     // Stores the CIMCVAppRichTextContainer objects
       
    90     // Takes the ownership of objects stored
       
    91     RPointerArray<CIMCVAppRichTextContainer> iRTContainerCache;
       
    92 
       
    93     };
       
    94 
       
    95 #endif // _CIMCVAPPRICHTEXTCONTAINERCACHE_H
       
    96 
       
    97 // End of File