/**
 * @file
 * $Id$
 * $Revision$
 * $Author$
 * $Date$
 *
 * This file is part of The iWear Framework.
 *
 * The iWear Framework is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by the
 * Free Software Foundation as in version 2 of the License.

 * 
 * The iWear Framework is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 * more details.
 * 
 * You should have received a copy of the GNU General Public License along with
 * The iWear Framework; if not, write to the Free Software Foundation, Inc., 59
 * Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

#ifndef __IWSENS_IPAQLIGHTSENSOR_H
#define __IWSENS_IPAQLIGHTSENSOR_H

#ifndef __IWSENS_DATASENSOR_H
#include <iwsens/datasensor.h>
#endif

namespace iwear
{
    namespace sensor
    {
class SensorHandler;
/**
 * An IpaqLightSensor DataSensor. This will return the brightness value
 * currently measured by iPAQ's internal light sensor in lux (TODO calibration).
 */
class IpaqLightSensor: public DataSensor {
private:
    IpaqLightSensor();
protected:
public:
    IpaqLightSensor( SensorHandler* );
    virtual ~IpaqLightSensor();
    /**
     * Returns the current luminous flux in lux of this sensor
     * TODO this must still be calibrated...
     */
    virtual double get_value( void ) const;
    /**
     * IpaqLightSensor is measured in luminous flux = lux
     * TODO this must still be calibrated...
     */
    virtual units get_unit( void ) const { return unit_lux; }

    /**
     * We know about brightness so we tell it.
     */
    virtual datasensor_type get_datasensor_type( void ) const { return brightness; }

    /**
     * Module requires us to implement this. But we dont have one so just
     * return succes.
     */
    virtual uint32_t activate_power_state( power_state ) { return 0; }

};

} // namespace sensor
} // namespace iwear
#endif

