sensorfw
tapadaptor.h
Go to the documentation of this file.
1 
28 #ifndef TAPADAPTOR_H
29 #define TAPADAPTOR_H
30 
31 #include "inputdevadaptor.h"
32 #include "deviceadaptorringbuffer.h"
33 #include "datatypes/tapdata.h"
34 
41 class TapAdaptor : public InputDevAdaptor
42 {
43  Q_OBJECT;
44 public:
49  static DeviceAdaptor* factoryMethod(const QString& id)
50  {
51  return new TapAdaptor(id);
52  }
53 
54 protected:
59  TapAdaptor(const QString& id);
60  ~TapAdaptor();
61 
62  virtual bool setInterval(const unsigned int value, const int sessionId);
63 
64 private:
65  DeviceAdaptorRingBuffer<TapData>* tapBuffer_;
67  void interpretEvent(int src, struct input_event *ev);
68  void interpretSync(int src, struct input_event *ev);
69  void commitOutput(const TapData& data);
70 };
71 
72 #endif
Adaptor class for detecting device tap events.
Definition: tapadaptor.h:41
virtual bool setInterval(const unsigned int value, const int sessionId)
static DeviceAdaptor * factoryMethod(const QString &id)
Factory method for gaining a new instance of TapAdaptor class.
Definition: tapadaptor.h:49
Datatype for device tap events.
Definition: tapdata.h:36
TapAdaptor(const QString &id)
Constructor.
Datatype for device tap events.