persistentstorage/dbms/inc/D32CACHE.H
changeset 0 08ec8eefde2f
equal deleted inserted replaced
-1:000000000000 0:08ec8eefde2f
       
     1 // Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // Caching interface for server-side implementations
       
    15 // 
       
    16 //
       
    17 
       
    18 #ifndef __D32CACHE_H__
       
    19 #define __D32CACHE_H__
       
    20 
       
    21 #ifndef __E32STD_H__
       
    22 #include <e32std.h>
       
    23 #endif
       
    24 
       
    25 // Classes referenced
       
    26 class CBase;
       
    27 
       
    28 class RDbCache
       
    29 /**
       
    30 @internalComponent
       
    31 */
       
    32 	{
       
    33 private:
       
    34 	enum { EDefaultSlots = 2 };
       
    35 	class CCache;
       
    36 public:
       
    37 	inline RDbCache();
       
    38 	TInt Open(TInt aSize = EDefaultSlots, TBool aUseTimer = EFalse );
       
    39 	void Close();
       
    40 //
       
    41 	void Hold( CBase* aObject, TUint aMicroSeconds );
       
    42 	void Release( const CBase& aObject ) const;
       
    43 	void Flush();
       
    44 private:
       
    45 	CCache* iCache;
       
    46 	};
       
    47 
       
    48 inline RDbCache::RDbCache()
       
    49 	:iCache( 0 )
       
    50 	{}
       
    51 
       
    52 #endif