sl@0: /* sl@0: * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * sl@0: */ sl@0: sl@0: sl@0: #if (!defined __T_HAL_DATA_H__) sl@0: #define __T_HAL_DATA_H__ sl@0: sl@0: sl@0: // User Includes sl@0: #include "DataWrapperBase.h" sl@0: sl@0: // EPOC Includes sl@0: #include sl@0: sl@0: typedef TBool (*THalFunctionSetPrepare)(CDataWrapperBase* aDataWrapper, const TDesC& aSectName, TInt& aValue); sl@0: typedef TBool (*THalFunctionGetPrepare)(CDataWrapperBase* aDataWrapper, const TDesC& aSectName, TInt& aValueStart, TInt& aValueEnd); sl@0: typedef void (*THalFunctionGetValidation)(CDataWrapperBase* aDataWrapper, const TDesC& aSectName, TInt aValue, TBool aForceValidation); sl@0: typedef void (*THalFunctionStore)(CDataWrapperBase* aDataWrapper, TInt aValue); sl@0: sl@0: /** sl@0: * Test Active Notification class sl@0: * sl@0: */ sl@0: class CT_HALData : public CDataWrapperBase sl@0: { sl@0: public: sl@0: struct THalTableLookup sl@0: { sl@0: const TDesC& iHalString; sl@0: HALData::TAttribute iHalAttribute; sl@0: THalFunctionSetPrepare iHalFunctionSetPrepare; sl@0: THalFunctionGetPrepare iHalFunctionGetPrepare; sl@0: THalFunctionGetValidation iHalFunctionGetValidation; sl@0: THalFunctionStore iHalFunctionStore; sl@0: TBool iHalForceValidation; sl@0: }; sl@0: sl@0: public: sl@0: CT_HALData(const THalTableLookup* aTable); sl@0: ~CT_HALData(); sl@0: sl@0: virtual TAny* GetObject(); sl@0: virtual TBool DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex); sl@0: sl@0: static void GetValidationBool(CDataWrapperBase* aThis, const TDesC& aSection, TInt aValue, TBool aForceValidation); sl@0: static void GetValidationInt(CDataWrapperBase* aThis, const TDesC& aSection, TInt aValue, TBool aForceValidation); sl@0: static void GetValidationUint(CDataWrapperBase* aThis, const TDesC& aSection, TInt aValue, TBool aForceValidation); sl@0: sl@0: static TBool SetPrepareInt(CDataWrapperBase* aThis, const TDesC& aSection, TInt& aValue); sl@0: static TBool SetPrepareUint(CDataWrapperBase* aThis, const TDesC& aSection, TInt& aValue); sl@0: sl@0: protected: sl@0: const THalTableLookup* LookUp(const TDesC& aValue); sl@0: sl@0: private: sl@0: TInt DoCmdSet(const TDesC& aSection); sl@0: TInt DoCmdGet(const TDesC& aSection); sl@0: sl@0: protected: sl@0: const THalTableLookup* iTable; sl@0: TInt iValue; sl@0: }; sl@0: sl@0: #endif /* __T_HAL_DATA_H__ */