wmdrm/wmdrmengine/wmdrmserver/server/inc/slotdatacache.h
changeset 0 95b198f216e5
equal deleted inserted replaced
-1:000000000000 0:95b198f216e5
       
     1 /*
       
     2 * Copyright (c) 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:  Server definitions
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __SLOTDATACACHE_H
       
    20 #define __SLOTDATACACHE_H
       
    21 
       
    22 #include <e32base.h>
       
    23 #include <f32file.h>
       
    24 
       
    25 class CWmDrmKeyStorage;
       
    26 class CWmDrmServer;
       
    27 class CSlotData;
       
    28 
       
    29 class CSlotDataCache: public CBase
       
    30     {
       
    31 public:
       
    32     
       
    33     static CSlotDataCache* NewL( CWmDrmServer* aServer );
       
    34 
       
    35     void ConstructL();
       
    36     
       
    37     CSlotDataCache( CWmDrmServer* aServer );
       
    38     
       
    39     ~CSlotDataCache();
       
    40     
       
    41 
       
    42     CSlotData* GetSlotDataL( 
       
    43         const TDesC8& aStore,
       
    44         const TDesC8& aNamespace,
       
    45         const TDesC8& aHashKey,
       
    46         const TDesC8& aUniqueKey );
       
    47 
       
    48     void Claim( CSlotData* aData );
       
    49 
       
    50     void Release( CSlotData* aData );
       
    51 
       
    52     TInt Delete( CSlotData* aData );
       
    53 
       
    54     void Cleanup();
       
    55 
       
    56     void FlushL();
       
    57     
       
    58     TInt iMaxCachedSlots;
       
    59 	CWmDrmKeyStorage* iKeyStorage;    
       
    60     RPointerArray<CSlotData> iSlotCache;
       
    61     CWmDrmServer* iServer;
       
    62     };
       
    63 
       
    64 #endif