persistentstorage/dbms/sdbms/Sd_PlatDep.h
changeset 0 08ec8eefde2f
equal deleted inserted replaced
-1:000000000000 0:08ec8eefde2f
       
     1 // Copyright (c) 2004-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 // This header file must be included in Sd_Svr.cpp. It contains platform/target dependent code.
       
    15 // 
       
    16 //
       
    17 
       
    18 #ifndef __SD_PLATDEP_H__
       
    19 #define __SD_PLATDEP_H__
       
    20 
       
    21 ////////////////////////////////////////////////////////////////////////////////////
       
    22 
       
    23 typedef RProcess RDbProcess;
       
    24 
       
    25 inline TInt CreateDbmsProcess(RDbProcess& aProcess)
       
    26 	{
       
    27 	return aProcess.Create(KDbsServerImg,
       
    28 						   KNullDesC,
       
    29 						   TUidType(KNullUid, KNullUid, KDbsServerUid3),
       
    30 						   EOwnerThread);
       
    31 	}
       
    32 
       
    33 ////////////////////////////////////////////////////////////////////////////////////
       
    34 
       
    35 #ifdef __WINS__
       
    36 
       
    37 	inline void LoadDbmsLibraryL()
       
    38 		{
       
    39 		_LIT(KDbmsLibraryName, "EDBMS");
       
    40 		RLibrary lib;
       
    41 		__LEAVE_IF_ERROR(lib.Load(KDbmsLibraryName, KNullDesC));
       
    42 		}
       
    43 
       
    44 #else//__WINS__
       
    45 
       
    46 	#define LoadDbmsLibraryL()
       
    47 
       
    48 #endif//__WINS__
       
    49 
       
    50 ////////////////////////////////////////////////////////////////////////////////////
       
    51 
       
    52 #ifdef _DEBUG
       
    53 
       
    54 	//#define DbgPrint1(aMsg, aPrm) RDebug::Print(aMsg, aPrm)
       
    55 	//#define DbgPrint2(aMsg, aPrm1, aPrm2) RDebug::Print(aMsg, aPrm1, aPrm2)
       
    56 	#define DbgPrint1(aMsg, aPrm)
       
    57 	#define DbgPrint2(aMsg, aPrm1, aPrm2)
       
    58 
       
    59 #else//_DEBUG
       
    60 
       
    61 	#define DbgPrint1(aMsg, aPrm)
       
    62 	#define DbgPrint2(aMsg, aPrm1, aPrm2)
       
    63 
       
    64 #endif//_DEBUG
       
    65 
       
    66 ////////////////////////////////////////////////////////////////////////////////////
       
    67 
       
    68 #endif//__SD_PLATDEP_H__
       
    69