sensorfw: adaptors/alsadaptor-sysfs/alsadaptor-sysfs.h Source File

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"
34 #include "datatypes/timedunsigned.h"
35
45 class ALSAdaptorSysfs : public SysfsAdaptor
46 {
47 Q_OBJECT;
48 public:
53 static DeviceAdaptor* factoryMethod(const QString& id)
54 {
55 return new ALSAdaptorSysfs(id);
56 }
57
58 protected:
63 ALSAdaptorSysfs(const QString& id);
64 ~ALSAdaptorSysfs();
65
75 virtual bool setStandbyOverride(const bool override) { Q_UNUSED(override); return false; }
76 private:
77
85 void processSample(int pathId, int fd);
86
87 DeviceAdaptorRingBuffer<TimedUnsigned>* alsBuffer_;
88 };
89
90 #endif
ALSAdaptorSysfs
Adaptor for internal ambient light sensor of Nokia Sysfs.
Definition: alsadaptor-sysfs.h:46
ALSAdaptorSysfs::setStandbyOverride
virtual bool setStandbyOverride(const bool override)
Reimplemented to prevent standbyOverride for this adaptor.
Definition: alsadaptor-sysfs.h:75
ALSAdaptorSysfs::ALSAdaptorSysfs
ALSAdaptorSysfs(const QString &id)
Constructor.
ALSAdaptorSysfs::~ALSAdaptorSysfs
~ALSAdaptorSysfs()
ALSAdaptorSysfs::factoryMethod
static DeviceAdaptor * factoryMethod(const QString &id)
Factory method for gaining a new instance of ALSAdaptorSysfs class.
Definition: alsadaptor-sysfs.h:53
timedunsigned.h
Datatype for unsigned values.