diff -r f5050f1da672 -r 04becd199f91 javaextensions/sensor/src.s60/csensorconditionbase.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/javaextensions/sensor/src.s60/csensorconditionbase.h Tue Apr 27 16:30:29 2010 +0300 @@ -0,0 +1,59 @@ +/* +* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Base class for Sensor conditions +* +*/ + +#ifndef CSENSORCONDITIONBASE_H +#define CSENSORCONDITIONBASE_H + +#include + +class CSensorConditionBase : public CBase +{ +public: + /** + * Destructor + */ + virtual ~CSensorConditionBase(); + +protected: + /** + * Constructor + */ + CSensorConditionBase(TInt aChannelId); + +public: // New methods + + /** + * Evaluate condition + * @param aData value this conditions is matched against + * @return ETrue if matched, EFalse if not + */ + virtual TBool Evaluate(TReal aValue, TInt aChannelId) = 0; + + inline TInt GetChannelId() + { + return iChannelId; + }; + +protected: // Member data + + /** + * ID number of the channel this condition is interested in + */ + TInt iChannelId; +}; + +#endif // CSENSORCONDITIONBASE_H