persistentstorage/dbms/tdbms/t_dbplatsecdef.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 // t_dbplatsecdef - Common declarations
       
    15 // 
       
    16 //
       
    17 
       
    18 #ifndef T_DBPLATSECDEF_H
       
    19 #define T_DBPLATSECDEF_H
       
    20 
       
    21 #include <e32test.h>
       
    22 #include <d32dbms.h>
       
    23 
       
    24 #ifdef __T_DBPLATSECDEF__
       
    25 	#define CONST_LIT8(var, val) extern const TLitC8<sizeof(val)> var = {sizeof(val) - 1, val}
       
    26 	#define CONST_LIT16(var, val) extern const TLitC16<sizeof(L##val)/2> var = {sizeof(L##val)/2 - 1, L##val}
       
    27 	#define CONST_TTEXT(var, val) extern const TText var = val
       
    28 #else
       
    29 	#define CONST_LIT8(var, val) extern const TLitC8<sizeof(val)> var
       
    30 	#define CONST_LIT16(var, val) extern const TLitC16<sizeof(L##val)/2> var
       
    31 	#define CONST_TTEXT(var, val) extern const TText var
       
    32 #endif
       
    33 
       
    34 #ifdef _UNICODE
       
    35 	#define CONST_LIT(var, val) CONST_LIT16(var, val)
       
    36 #else
       
    37 	#define CONST_LIT(var, val) CONST_LIT8(var, val)
       
    38 #endif
       
    39 
       
    40 extern RTest 				TheTest;
       
    41 extern RDbs 				TheDbs;
       
    42 extern RDbNamedDatabase 	TheDb1;
       
    43 extern RDbNamedDatabase 	TheDb2;
       
    44 extern RDbTable				TheTbl1;
       
    45 extern RDbTable				TheTbl2;
       
    46 
       
    47 const TUid KSecureDbUid = {0x11335577};
       
    48 const TUid KSecureDbUid2 = {0x11335578};//Not enough rights for database operations here
       
    49 
       
    50 const TInt KDatabaseNamePos = 2;
       
    51 
       
    52 CONST_LIT(KSecure,	"SECURE");
       
    53 CONST_LIT(KDb1Name, "c:A.dB");
       
    54 CONST_LIT(KDb2Name, "C:b.Db");
       
    55 CONST_LIT(KDb3Name, "c:C.db");
       
    56 CONST_LIT(KTableName1, "ATBL");
       
    57 CONST_LIT(KTableName2, "BTbL");
       
    58 CONST_LIT(KTableName3, "ctBl");
       
    59 CONST_LIT(KTableName4, "dTbL");
       
    60 CONST_LIT(KProtDb1ZName, "z:A.db");
       
    61 CONST_LIT(KProtDb1CName, "c:a.db");
       
    62 CONST_LIT(KProtDb2CName, "C:B.DB");
       
    63 CONST_LIT(KProtDb3CName, "c:z.DB");
       
    64 
       
    65 CONST_LIT(KCol1, "ID");
       
    66 CONST_LIT(KCol2, "DATA1");
       
    67 CONST_LIT(KCol3, "DATA2");
       
    68 
       
    69 #endif//T_DBPLATSECDEF_H