2 * Copyright (c) 2016 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 #ifndef __MOTION_GESTURE_SENSOR_H__
19 #define __MOTION_GESTURE_SENSOR_H__
21 #include <gesture_recognition.h>
22 #include "SensorAdapter.h"
24 struct _gesture_data_s {
33 class GestureSensor : public ISensorListener {
38 bool setGesture(gesture_type_e type);
39 void setPowerSave(bool ps);
40 void setCallback(gesture_recognition_cb cb);
41 void setUserData(void* data);
46 static bool isSupported(gesture_type_e type);
49 void onEvent(double timestamp, float* values, int accuracy);
51 static sensor_type_t __toSensor(gesture_type_e type);
53 gesture_type_e __gestureType;
54 gesture_recognition_cb __callback;
56 SensorAdapter __sensorAdapter;
61 #endif /* __MOTION_GESTURE_SENSOR_H__ */