bt_mce.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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_INCLUDE_BT_MCE_H
  17. #define ANDROID_INCLUDE_BT_MCE_H
  18. __BEGIN_DECLS
  19. /** MAS instance description */
  20. typedef struct {
  21. int id;
  22. int scn;
  23. int msg_types;
  24. char* p_name;
  25. } btmce_mas_instance_t;
  26. /** callback for get_remote_mas_instances */
  27. typedef void (*btmce_remote_mas_instances_callback)(
  28. bt_status_t status, RawAddress* bd_addr, int num_instances,
  29. btmce_mas_instance_t* instances);
  30. typedef struct {
  31. /** set to sizeof(btmce_callbacks_t) */
  32. size_t size;
  33. btmce_remote_mas_instances_callback remote_mas_instances_cb;
  34. } btmce_callbacks_t;
  35. typedef struct {
  36. /** set to size of this struct */
  37. size_t size;
  38. /** register BT MCE callbacks */
  39. bt_status_t (*init)(btmce_callbacks_t* callbacks);
  40. /** search for MAS instances on remote device */
  41. bt_status_t (*get_remote_mas_instances)(RawAddress* bd_addr);
  42. } btmce_interface_t;
  43. __END_DECLS
  44. #endif /* ANDROID_INCLUDE_BT_MCE_H */