sensorfw
hybriswakeupadaptor.h
Go to the documentation of this file.
1/****************************************************************************
2**
3** Copyright (c) 2025 Jollyboys Ltd.
4**
5** $QT_BEGIN_LICENSE:LGPL$
6**
7** GNU Lesser General Public License Usage
8** Alternatively, this file may be used under the terms of the GNU Lesser
9** General Public License version 2.1 as published by the Free Software
10** Foundation and appearing in the file LICENSE.LGPL included in the
11** packaging of this file. Please review the following information to
12** ensure the GNU Lesser General Public License version 2.1 requirements
13** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
14**
15** $QT_END_LICENSE$
16**
17****************************************************************************/
18
19#ifndef HYBRISWAKEUPADAPTOR_H
20#define HYBRISWAKEUPADAPTOR_H
21#include "hybrisadaptor.h"
22
23#include <QString>
24#include <QStringList>
25#include <QTime>
26#include <linux/input.h>
28#include "deviceadaptorringbuffer.h"
29
37class HybrisWakeupAdaptor : public HybrisAdaptor
38{
39 Q_OBJECT
40
41public:
42 static DeviceAdaptor *factoryMethod(const QString &id) {
43 return new HybrisWakeupAdaptor(id);
44 }
45 HybrisWakeupAdaptor(const QString &id);
47
49 void stopSensor();
50
51protected:
52 void processSample(const sensors_event_t &data);
53
54private:
55 DeviceAdaptorRingBuffer<TimedUnsigned> *m_buffer;
56 QByteArray m_powerStatePath;
57};
58#endif // HYBRISWAKEUPADAPTOR_H
HybrisWakeupAdaptor(const QString &id)
void processSample(const sensors_event_t &data)
static DeviceAdaptor * factoryMethod(const QString &id)
Datatype for unsigned values.