| Mathias Agopian | 589ce85 | 2010-07-13 22:21:56 -0700 | [diff] [blame] | 1 | /* | 
|  | 2 | * Copyright (C) 2010 The Android Open Source Project | 
|  | 3 | * | 
|  | 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 | 
|  | 7 | * | 
|  | 8 | *      http://www.apache.org/licenses/LICENSE-2.0 | 
|  | 9 | * | 
|  | 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. | 
|  | 15 | */ | 
|  | 16 |  | 
|  | 17 | #ifndef ANDROID_GUI_ISENSORSERVER_H | 
|  | 18 | #define ANDROID_GUI_ISENSORSERVER_H | 
|  | 19 |  | 
|  | 20 | #include <stdint.h> | 
|  | 21 | #include <sys/types.h> | 
|  | 22 |  | 
|  | 23 | #include <utils/Errors.h> | 
|  | 24 | #include <utils/RefBase.h> | 
|  | 25 |  | 
|  | 26 | #include <binder/IInterface.h> | 
|  | 27 |  | 
|  | 28 | namespace android { | 
|  | 29 | // ---------------------------------------------------------------------------- | 
|  | 30 |  | 
|  | 31 | class Sensor; | 
|  | 32 | class ISensorEventConnection; | 
| Aravind Akella | 4949c50 | 2015-02-11 15:54:35 -0800 | [diff] [blame] | 33 | class String8; | 
| Mathias Agopian | 589ce85 | 2010-07-13 22:21:56 -0700 | [diff] [blame] | 34 |  | 
|  | 35 | class ISensorServer : public IInterface | 
|  | 36 | { | 
|  | 37 | public: | 
| Colin Cross | 17576de | 2016-09-26 13:07:06 -0700 | [diff] [blame] | 38 | DECLARE_META_INTERFACE(SensorServer) | 
| Mathias Agopian | 589ce85 | 2010-07-13 22:21:56 -0700 | [diff] [blame] | 39 |  | 
| Svetoslav | b412f6e | 2015-04-29 16:50:41 -0700 | [diff] [blame] | 40 | virtual Vector<Sensor> getSensorList(const String16& opPackageName) = 0; | 
| Peng Xu | 2576cb6 | 2016-01-20 00:22:09 -0800 | [diff] [blame] | 41 | virtual Vector<Sensor> getDynamicSensorList(const String16& opPackageName) = 0; | 
|  | 42 |  | 
| Aravind Akella | a9e6cc3 | 2015-04-16 18:57:31 -0700 | [diff] [blame] | 43 | virtual sp<ISensorEventConnection> createSensorEventConnection(const String8& packageName, | 
| Svetoslav | b412f6e | 2015-04-29 16:50:41 -0700 | [diff] [blame] | 44 | int mode, const String16& opPackageName) = 0; | 
| Aravind Akella | 5c53805 | 2015-06-29 12:37:48 -0700 | [diff] [blame] | 45 | virtual int32_t isDataInjectionEnabled() = 0; | 
| Mathias Agopian | 589ce85 | 2010-07-13 22:21:56 -0700 | [diff] [blame] | 46 | }; | 
|  | 47 |  | 
|  | 48 | // ---------------------------------------------------------------------------- | 
|  | 49 |  | 
|  | 50 | class BnSensorServer : public BnInterface<ISensorServer> | 
|  | 51 | { | 
|  | 52 | public: | 
|  | 53 | virtual status_t    onTransact( uint32_t code, | 
|  | 54 | const Parcel& data, | 
|  | 55 | Parcel* reply, | 
|  | 56 | uint32_t flags = 0); | 
|  | 57 | }; | 
|  | 58 |  | 
|  | 59 | // ---------------------------------------------------------------------------- | 
|  | 60 | }; // namespace android | 
|  | 61 |  | 
|  | 62 | #endif // ANDROID_GUI_ISENSORSERVER_H |