ISensorServer.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. #ifndef ANDROID_GUI_ISENSORSERVER_H
  17. #define ANDROID_GUI_ISENSORSERVER_H
  18. #include <stdint.h>
  19. #include <sys/types.h>
  20. #include <utils/Errors.h>
  21. #include <utils/RefBase.h>
  22. #include <binder/IInterface.h>
  23. namespace android {
  24. // ----------------------------------------------------------------------------
  25. class Sensor;
  26. class ISensorEventConnection;
  27. class String8;
  28. class ISensorServer : public IInterface
  29. {
  30. public:
  31. DECLARE_META_INTERFACE(SensorServer);
  32. virtual Vector<Sensor> getSensorList(const String16& opPackageName) = 0;
  33. virtual sp<ISensorEventConnection> createSensorEventConnection(const String8& packageName,
  34. int mode, const String16& opPackageName) = 0;
  35. virtual int32_t isDataInjectionEnabled() = 0;
  36. };
  37. // ----------------------------------------------------------------------------
  38. class BnSensorServer : public BnInterface<ISensorServer>
  39. {
  40. public:
  41. virtual status_t onTransact( uint32_t code,
  42. const Parcel& data,
  43. Parcel* reply,
  44. uint32_t flags = 0);
  45. };
  46. // ----------------------------------------------------------------------------
  47. }; // namespace android
  48. #endif // ANDROID_GUI_ISENSORSERVER_H