sensorfw
alsadaptor-sysfs.h
Go to the documentation of this file.
1
29#ifndef ALSADAPTOR_SYSFS_H
30#define ALSADAPTOR_SYSFS_H
31
32#include "sysfsadaptor.h"
33#include "deviceadaptorringbuffer.h"
35
45class ALSAdaptorSysfs : public SysfsAdaptor
46{
47 Q_OBJECT;
48public:
53 static DeviceAdaptor* factoryMethod(const QString& id)
54 {
55 return new ALSAdaptorSysfs(id);
56 }
57
58protected:
63 ALSAdaptorSysfs(const QString& id);
65
75 virtual bool setStandbyOverride(const bool override) { Q_UNUSED(override); return false; }
76private:
77
85 void processSample(int pathId, int fd);
86
87 DeviceAdaptorRingBuffer<TimedUnsigned>* alsBuffer_;
88};
89
90#endif
Adaptor for internal ambient light sensor of Nokia Sysfs.
virtual bool setStandbyOverride(const bool override)
Reimplemented to prevent standbyOverride for this adaptor.
ALSAdaptorSysfs(const QString &id)
Constructor.
static DeviceAdaptor * factoryMethod(const QString &id)
Factory method for gaining a new instance of ALSAdaptorSysfs class.
Datatype for unsigned values.