blob: 571acb5d3969af7d8fb1e5875f86e2a59e84327a [file] [log] [blame]
Mathias Agopian589ce852010-07-13 22:21:56 -07001/*
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
28namespace android {
29// ----------------------------------------------------------------------------
30
31class Sensor;
32class ISensorEventConnection;
Aravind Akella4949c502015-02-11 15:54:35 -080033class String8;
Mathias Agopian589ce852010-07-13 22:21:56 -070034
35class ISensorServer : public IInterface
36{
37public:
38 DECLARE_META_INTERFACE(SensorServer);
39
Svetoslavb412f6e2015-04-29 16:50:41 -070040 virtual Vector<Sensor> getSensorList(const String16& opPackageName) = 0;
Peng Xu2576cb62016-01-20 00:22:09 -080041 virtual Vector<Sensor> getDynamicSensorList(const String16& opPackageName) = 0;
42
Aravind Akellaa9e6cc32015-04-16 18:57:31 -070043 virtual sp<ISensorEventConnection> createSensorEventConnection(const String8& packageName,
Svetoslavb412f6e2015-04-29 16:50:41 -070044 int mode, const String16& opPackageName) = 0;
Aravind Akella5c538052015-06-29 12:37:48 -070045 virtual int32_t isDataInjectionEnabled() = 0;
Mathias Agopian589ce852010-07-13 22:21:56 -070046};
47
48// ----------------------------------------------------------------------------
49
50class BnSensorServer : public BnInterface<ISensorServer>
51{
52public:
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