1984826cc158193e61e3a00359ef4f6699c7d748aMathias Agopian/* 2984826cc158193e61e3a00359ef4f6699c7d748aMathias Agopian * Copyright (C) 2011 The Android Open Source Project 3984826cc158193e61e3a00359ef4f6699c7d748aMathias Agopian * 4984826cc158193e61e3a00359ef4f6699c7d748aMathias Agopian * Licensed under the Apache License, Version 2.0 (the "License"); 5984826cc158193e61e3a00359ef4f6699c7d748aMathias Agopian * you may not use this file except in compliance with the License. 6984826cc158193e61e3a00359ef4f6699c7d748aMathias Agopian * You may obtain a copy of the License at 7984826cc158193e61e3a00359ef4f6699c7d748aMathias Agopian * 8984826cc158193e61e3a00359ef4f6699c7d748aMathias Agopian * http://www.apache.org/licenses/LICENSE-2.0 9984826cc158193e61e3a00359ef4f6699c7d748aMathias Agopian * 10984826cc158193e61e3a00359ef4f6699c7d748aMathias Agopian * Unless required by applicable law or agreed to in writing, software 11984826cc158193e61e3a00359ef4f6699c7d748aMathias Agopian * distributed under the License is distributed on an "AS IS" BASIS, 12984826cc158193e61e3a00359ef4f6699c7d748aMathias Agopian * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13984826cc158193e61e3a00359ef4f6699c7d748aMathias Agopian * See the License for the specific language governing permissions and 14984826cc158193e61e3a00359ef4f6699c7d748aMathias Agopian * limitations under the License. 15984826cc158193e61e3a00359ef4f6699c7d748aMathias Agopian */ 16984826cc158193e61e3a00359ef4f6699c7d748aMathias Agopian 17984826cc158193e61e3a00359ef4f6699c7d748aMathias Agopian#ifndef ANDROID_ORIENTATION_SENSOR_H 18984826cc158193e61e3a00359ef4f6699c7d748aMathias Agopian#define ANDROID_ORIENTATION_SENSOR_H 19984826cc158193e61e3a00359ef4f6699c7d748aMathias Agopian 20984826cc158193e61e3a00359ef4f6699c7d748aMathias Agopian#include <stdint.h> 21984826cc158193e61e3a00359ef4f6699c7d748aMathias Agopian#include <sys/types.h> 22984826cc158193e61e3a00359ef4f6699c7d748aMathias Agopian 23801ea093b0e923a61b832f2adba698a273479880Mathias Agopian#include <sensor/Sensor.h> 24984826cc158193e61e3a00359ef4f6699c7d748aMathias Agopian 25984826cc158193e61e3a00359ef4f6699c7d748aMathias Agopian#include "SensorInterface.h" 26984826cc158193e61e3a00359ef4f6699c7d748aMathias Agopian 27984826cc158193e61e3a00359ef4f6699c7d748aMathias Agopian// --------------------------------------------------------------------------- 28984826cc158193e61e3a00359ef4f6699c7d748aMathias Agopiannamespace android { 29984826cc158193e61e3a00359ef4f6699c7d748aMathias Agopian// --------------------------------------------------------------------------- 30984826cc158193e61e3a00359ef4f6699c7d748aMathias Agopian 31984826cc158193e61e3a00359ef4f6699c7d748aMathias Agopianclass SensorDevice; 32984826cc158193e61e3a00359ef4f6699c7d748aMathias Agopianclass SensorFusion; 33984826cc158193e61e3a00359ef4f6699c7d748aMathias Agopian 34755c451c7861a029e26e5f16e319b629169e656dPeng Xuclass OrientationSensor : public VirtualSensor { 35984826cc158193e61e3a00359ef4f6699c7d748aMathias Agopianpublic: 36984826cc158193e61e3a00359ef4f6699c7d748aMathias Agopian OrientationSensor(); 370cc8f809924706c7d683da30605f432635dd5bb6Peng Xu virtual bool process(sensors_event_t* outEvent, const sensors_event_t& event) override; 380cc8f809924706c7d683da30605f432635dd5bb6Peng Xu virtual status_t activate(void* ident, bool enabled) override; 390cc8f809924706c7d683da30605f432635dd5bb6Peng Xu virtual status_t setDelay(void* ident, int handle, int64_t ns) override; 40984826cc158193e61e3a00359ef4f6699c7d748aMathias Agopian}; 41984826cc158193e61e3a00359ef4f6699c7d748aMathias Agopian 42984826cc158193e61e3a00359ef4f6699c7d748aMathias Agopian// --------------------------------------------------------------------------- 43984826cc158193e61e3a00359ef4f6699c7d748aMathias Agopian}; // namespace android 44984826cc158193e61e3a00359ef4f6699c7d748aMathias Agopian 45984826cc158193e61e3a00359ef4f6699c7d748aMathias Agopian#endif // ANDROID_ORIENTATION_SENSOR_H 46