os/kernelhwsrv/kerneltest/e32test/hcr/d_hcrut_psl_config.cpp
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/kernelhwsrv/kerneltest/e32test/hcr/d_hcrut_psl_config.cpp	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,86 @@
     1.4 +// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of the License "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +// This file is part of the NE1_TB Variant Base Port
    1.18 +// Hardware Configuration Respoitory Platform Specific Layer (PSL) 
    1.19 +//
    1.20 +
    1.21 +
    1.22 +/** 
    1.23 +@file hcr_psl_config.h
    1.24 +File provides dummy test configuration for HCR prototype developement. 
    1.25 +Definitions will be replaced by real NE1 configuration later.
    1.26 +
    1.27 +@internalTechnology
    1.28 +*/
    1.29 +
    1.30 +// -- INCLUDES ----------------------------------------------------------------
    1.31 +
    1.32 +
    1.33 +#include "hcr_hai.h"
    1.34 +#include "hcr_uids.h"
    1.35 +
    1.36 +using namespace HCR;
    1.37 +
    1.38 +
    1.39 +// -- GLOBALS -----------------------------------------------------------------
    1.40 +
    1.41 +#define STRING_TTEXT8  "Hardware Configuration Repository"
    1.42 +
    1.43 +
    1.44 +const TUint8   gETypeData[] = {0x53, 0x79, 0x6d, 0x62, 0x69, 0x61, 0x6e, 0x20, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e};
    1.45 +const TText8*  gETypeText8 = reinterpret_cast<const TText8*>(STRING_TTEXT8);
    1.46 +const TInt64   gETypeInt64 = I64LIT(-0x200000020);
    1.47 +const TUint64  gETypeUInt64 = UI64LIT(0x200000000);
    1.48 +const TInt32   geTypeInt32A[] = { -2147483647, 0, 1, 2147483647 };
    1.49 +const TUint32  geTypeUInt32A[] = { 101010, 0xffffffff, 0, 128, 0xfffffffe, 76 };
    1.50 +const TInt32   geTypeInt32Az[] = { 0 };
    1.51 +
    1.52 +SSettingC gSettingsList[] = 
    1.53 +    {
    1.54 +    { { { KHCRUID_TestCategory1, 1}, ETypeInt32,   0x0000, 0 }, { { 2345123 }}},
    1.55 +    { { { KHCRUID_TestCategory1, 2}, ETypeInt16,   0x0000, 0 }, { { 32001 }}},
    1.56 +    { { { KHCRUID_TestCategory1, 3}, ETypeInt8,    0x0000, 0 }, { { -126 }}},
    1.57 +    { { { KHCRUID_TestCategory1, 4}, ETypeBool,    0x0000, 0 }, { { ETrue }}},
    1.58 +    { { { KHCRUID_TestCategory1, 5}, ETypeUInt32,  0x0000, 0 }, { { 0xaabbccdd }}},
    1.59 +    { { { KHCRUID_TestCategory1, 6}, ETypeUInt16,  0x0000, 0 }, { { 0x1122 }}},
    1.60 +    { { { KHCRUID_TestCategory1, 7}, ETypeUInt8,   0x0000, 0 }, { { 0x33 }}},
    1.61 +    { { { KHCRUID_TestCategory1, 9}, ETypeLinAddr, 0x0000, 0 }, { { 0x01008000 }}},
    1.62 +    
    1.63 +    { { { KHCRUID_TestCategory1, 10}, ETypeBinData,0x0000, sizeof(gETypeData) },   { { reinterpret_cast<TInt32>(gETypeData) }}},
    1.64 +    { { { KHCRUID_TestCategory1, 11}, ETypeText8,  0x0000, sizeof(STRING_TTEXT8) },  { { reinterpret_cast<TInt32>(gETypeText8) }}},
    1.65 +    { { { KHCRUID_TestCategory1, 13}, ETypeInt64,  0x0000, sizeof(gETypeInt64) },  { { reinterpret_cast<TInt32>(&gETypeInt64) }}},
    1.66 +    { { { KHCRUID_TestCategory1, 14}, ETypeUInt64, 0x0000, sizeof(gETypeUInt64) }, { { reinterpret_cast<TInt32>(&gETypeUInt64) }}},
    1.67 +
    1.68 +    { { { KHCRUID_TestCategory1, 15}, ETypeArrayInt32,  0x0000, sizeof(geTypeInt32A) },  { { reinterpret_cast<TInt32>(&geTypeInt32A) }}},
    1.69 +    { { { KHCRUID_TestCategory1, 16}, ETypeArrayUInt32, 0x0000, sizeof(geTypeUInt32A) }, { { reinterpret_cast<TInt32>(&geTypeUInt32A) }}},
    1.70 +    { { { KHCRUID_TestCategory1, 17}, ETypeArrayInt32,  0x0000, sizeof(geTypeInt32Az) },  { { reinterpret_cast<TInt32>(&geTypeInt32Az) }}}
    1.71 +
    1.72 +    };
    1.73 +
    1.74 +SRepositoryBase gHeader = 
    1.75 +    {
    1.76 +    HCR_FINGER_PRINT, 
    1.77 +    EReposCompiled, 
    1.78 +    KRepositoryFirstVersion,
    1.79 +    EReposReadOnly,
    1.80 +    (sizeof(gSettingsList)/sizeof(SSettingC))
    1.81 +    };
    1.82 +
    1.83 +GLDEF_C SRepositoryCompiled gRepository = 
    1.84 +    { 
    1.85 +    &gHeader, 
    1.86 +    gSettingsList 
    1.87 +    };
    1.88 +
    1.89 +