summaryrefslogtreecommitdiffstats
path: root/include/gui/SensorEventQueue.h
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2010-07-14 23:41:37 -0700
committerMathias Agopian <mathias@google.com>2010-07-19 17:57:29 -0700
commita7352c9f4a6e642c29782b19db5bc0bd98feddc8 (patch)
tree634f433fd935e8202ede570b19773f79af2c6a4b /include/gui/SensorEventQueue.h
parentac07cd613f943f662b66e5ed1eecebca9d2c3690 (diff)
downloadframeworks_native-a7352c9f4a6e642c29782b19db5bc0bd98feddc8.zip
frameworks_native-a7352c9f4a6e642c29782b19db5bc0bd98feddc8.tar.gz
frameworks_native-a7352c9f4a6e642c29782b19db5bc0bd98feddc8.tar.bz2
new SensorService
remove old sensor service and implement SensorManager on top of the new (native) SensorManger API. Change-Id: Iddb77d498755da3e11646473a44d651f12f40281
Diffstat (limited to 'include/gui/SensorEventQueue.h')
-rw-r--r--include/gui/SensorEventQueue.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/gui/SensorEventQueue.h b/include/gui/SensorEventQueue.h
index d8d8128..bb03c12 100644
--- a/include/gui/SensorEventQueue.h
+++ b/include/gui/SensorEventQueue.h
@@ -42,6 +42,7 @@ namespace android {
class ISensorEventConnection;
class Sensor;
+class PollLoop;
// ----------------------------------------------------------------------------
@@ -56,13 +57,21 @@ public:
ssize_t write(ASensorEvent const* events, size_t numEvents);
ssize_t read(ASensorEvent* events, size_t numEvents);
+ status_t waitForEvent() const;
+ status_t wake() const;
+
status_t enableSensor(Sensor const* sensor) const;
status_t disableSensor(Sensor const* sensor) const;
+ status_t enableSensor(int32_t handle) const;
+ status_t disableSensor(int32_t handle) const;
status_t setEventRate(Sensor const* sensor, nsecs_t ns) const;
private:
+ sp<PollLoop> getPollLoop() const;
sp<ISensorEventConnection> mSensorEventConnection;
sp<SensorChannel> mSensorChannel;
+ mutable Mutex mLock;
+ mutable sp<PollLoop> mPollLoop;
};
// ----------------------------------------------------------------------------