ISoundTriggerHwService.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*
  2. * Copyright (C) 2014 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_HARDWARE_ISOUNDTRIGGER_SERVICE_H
  17. #define ANDROID_HARDWARE_ISOUNDTRIGGER_SERVICE_H
  18. #include <utils/RefBase.h>
  19. #include <binder/IInterface.h>
  20. #include <binder/Parcel.h>
  21. #include <system/sound_trigger.h>
  22. namespace android {
  23. class ISoundTrigger;
  24. class ISoundTriggerClient;
  25. class ISoundTriggerHwService : public IInterface
  26. {
  27. public:
  28. DECLARE_META_INTERFACE(SoundTriggerHwService);
  29. virtual status_t listModules(const String16& opPackageName,
  30. struct sound_trigger_module_descriptor *modules,
  31. uint32_t *numModules) = 0;
  32. virtual status_t attach(const String16& opPackageName,
  33. const sound_trigger_module_handle_t handle,
  34. const sp<ISoundTriggerClient>& client,
  35. sp<ISoundTrigger>& module) = 0;
  36. virtual status_t setCaptureState(bool active) = 0;
  37. };
  38. // ----------------------------------------------------------------------------
  39. class BnSoundTriggerHwService: public BnInterface<ISoundTriggerHwService>
  40. {
  41. public:
  42. virtual status_t onTransact( uint32_t code,
  43. const Parcel& data,
  44. Parcel* reply,
  45. uint32_t flags = 0);
  46. };
  47. }; // namespace android
  48. #endif //ANDROID_HARDWARE_ISOUNDTRIGGER_SERVICE_H