blob: b832c8f84b2d225c98d074525415c87003f84c4d [file] [log] [blame]
Alex Vakulenkoe4eec202017-01-27 14:41:04 -08001#ifndef ANDROID_DVR_VIRTUAL_TOUCHPAD_SERVICE_H
2#define ANDROID_DVR_VIRTUAL_TOUCHPAD_SERVICE_H
3
4#include <android/dvr/BnVirtualTouchpadService.h>
5
6#include "VirtualTouchpad.h"
7
8namespace android {
9namespace dvr {
10
Kevin Schoedel43b5b062017-01-19 13:46:17 -050011// VirtualTouchpadService implements the service side of
12// the Binder interface defined in VirtualTouchpadService.aidl.
13//
Alex Vakulenkoe4eec202017-01-27 14:41:04 -080014class VirtualTouchpadService : public BnVirtualTouchpadService {
15 public:
Kevin Schoedel89af70b2017-03-03 18:11:37 -050016 VirtualTouchpadService(sp<VirtualTouchpad> touchpad)
Alex Vakulenkoe4eec202017-01-27 14:41:04 -080017 : touchpad_(touchpad) {}
18
Alex Vakulenkoe4eec202017-01-27 14:41:04 -080019 protected:
20 // Implements IVirtualTouchpadService.
Kevin Schoedel89af70b2017-03-03 18:11:37 -050021 binder::Status touch(float x, float y, float pressure) override;
22 binder::Status buttonState(int buttons) override;
Alex Vakulenkoe4eec202017-01-27 14:41:04 -080023
24 private:
Kevin Schoedel89af70b2017-03-03 18:11:37 -050025 sp<VirtualTouchpad> touchpad_;
Alex Vakulenkoe4eec202017-01-27 14:41:04 -080026
27 VirtualTouchpadService(const VirtualTouchpadService&) = delete;
28 void operator=(const VirtualTouchpadService&) = delete;
29};
30
31} // namespace dvr
32} // namespace android
33
34#endif // ANDROID_DVR_VIRTUAL_TOUCHPAD_SERVICE_H