First public contribution.
2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
19 #if (!defined __T_HAL_DATA_H__)
20 #define __T_HAL_DATA_H__
24 #include "DataWrapperBase.h"
29 typedef TBool (*THalFunctionSetPrepare)(CDataWrapperBase* aDataWrapper, const TDesC& aSectName, TInt& aValue);
30 typedef TBool (*THalFunctionGetPrepare)(CDataWrapperBase* aDataWrapper, const TDesC& aSectName, TInt& aValueStart, TInt& aValueEnd);
31 typedef void (*THalFunctionGetValidation)(CDataWrapperBase* aDataWrapper, const TDesC& aSectName, TInt aValue, TBool aForceValidation);
32 typedef void (*THalFunctionStore)(CDataWrapperBase* aDataWrapper, TInt aValue);
35 * Test Active Notification class
38 class CT_HALData : public CDataWrapperBase
41 struct THalTableLookup
43 const TDesC& iHalString;
44 HALData::TAttribute iHalAttribute;
45 THalFunctionSetPrepare iHalFunctionSetPrepare;
46 THalFunctionGetPrepare iHalFunctionGetPrepare;
47 THalFunctionGetValidation iHalFunctionGetValidation;
48 THalFunctionStore iHalFunctionStore;
49 TBool iHalForceValidation;
53 CT_HALData(const THalTableLookup* aTable);
56 virtual TAny* GetObject();
57 virtual TBool DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);
59 static void GetValidationBool(CDataWrapperBase* aThis, const TDesC& aSection, TInt aValue, TBool aForceValidation);
60 static void GetValidationInt(CDataWrapperBase* aThis, const TDesC& aSection, TInt aValue, TBool aForceValidation);
61 static void GetValidationUint(CDataWrapperBase* aThis, const TDesC& aSection, TInt aValue, TBool aForceValidation);
63 static TBool SetPrepareInt(CDataWrapperBase* aThis, const TDesC& aSection, TInt& aValue);
64 static TBool SetPrepareUint(CDataWrapperBase* aThis, const TDesC& aSection, TInt& aValue);
67 const THalTableLookup* LookUp(const TDesC& aValue);
70 TInt DoCmdSet(const TDesC& aSection);
71 TInt DoCmdGet(const TDesC& aSection);
74 const THalTableLookup* iTable;
78 #endif /* __T_HAL_DATA_H__ */