idlefw/tsrc/devicestatusplugin/mt_devstaplg/CContentCache.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Thu, 19 Aug 2010 10:13:44 +0300
branchRCL_3
changeset 28 053c6c7c14f3
permissions -rw-r--r--
Revision: 201026 Kit: 201033

/*
* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:
*
*/


#ifndef C_CONTENTCACHE_H
#define C_CONTENTCACHE_H

class CContentCache : public CBase
    {
    public:
    ~CContentCache()
        {
        delete iText;
        delete iData;
        }
    
    HBufC* iText;
    HBufC8* iData;
    TBool iClean;
    TInt iResource;
    TInt iIndex;
    TInt iId;
    };


LOCAL_C CContentCache* GetContent( RPointerArray<CContentCache>& aArray, TInt aId, TBool aClean = EFalse )
    {
    const TInt count( aArray.Count() );
    for( TInt i( 0 ); i < count; i++ )
        {
        if( aArray[i]->iId == aId )
            {
            if( !aClean && aArray[i]->iClean)
                {
                continue;
                }
            return aArray[i];
            }
        }
        
    return NULL;
    }


#endif      //  C_CONTENTCACHE_H

// End of file