Aurum  0.1.1
 All Classes Functions Variables Pages
IDevice.h
1 #ifndef IDEVICE_H
2 #define IDEVICE_H
3 #include "config.h"
4 
5 #include <string>
6 
11 enum class TimeRequestType {
12  WALLCLOCK,
13  MONOTONIC,
14 };
15 
20 enum class KeyRequestType {
21  STROKE,
22  LONG_STROKE,
23  PRESS,
24  RELEASE,
25 };
26 
31 class IDevice {
32 public:
37  virtual ~IDevice() {}
38 
43  virtual bool click(const int x, const int y) = 0;
44 
49  virtual bool click(const int x, const int y, const unsigned int intv) = 0;
50 
55  virtual bool drag(const int sx, const int sy, const int ex, const int ey,
56  const int steps, const int durationMs) = 0;
57 
62  virtual int touchDown(const int x, const int y) = 0;
63 
68  virtual bool touchMove(const int x, const int y, const int seq) = 0;
69 
74  virtual bool touchUp(const int x, const int y, const int seq) = 0;
75 
81  virtual bool wheelUp(int amount, const int durationMs) = 0;
82 
87  virtual bool wheelDown(int amount, const int durationMs) = 0;
88 
93  virtual bool pressBack(KeyRequestType type) = 0;
94 
99  virtual bool pressHome(KeyRequestType type) = 0;
100 
105  virtual bool pressMenu(KeyRequestType type) = 0;
106 
111  virtual bool pressVolUp(KeyRequestType type) = 0;
112 
117  virtual bool pressVolDown(KeyRequestType type) = 0;
118 
123  virtual bool pressPower(KeyRequestType type) = 0;
124 
129  virtual bool pressKeyCode(std::string keycode, KeyRequestType type) = 0;
130 
135  virtual bool takeScreenshot(std::string path, float scale, int quality) = 0;
136 
141  virtual long long getSystemTime(TimeRequestType type) = 0;
142 };
143 #endif