bt_gatt.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /* SPDX-License-Identifier: Apache-2.0 */
  2. /*
  3. * Copyright (C) 2013 The Android Open Source Project
  4. *
  5. */
  6. #ifndef ANDROID_INCLUDE_BT_GATT_H
  7. #define ANDROID_INCLUDE_BT_GATT_H
  8. #include <stdint.h>
  9. #include "bt_gatt_client.h"
  10. #include "bt_gatt_server.h"
  11. __BEGIN_DECLS
  12. /** BT-GATT callbacks */
  13. typedef struct {
  14. /** Set to sizeof(btgatt_callbacks_t) */
  15. size_t size;
  16. /** GATT Client callbacks */
  17. const btgatt_client_callbacks_t* client;
  18. /** GATT Server callbacks */
  19. const btgatt_server_callbacks_t* server;
  20. } btgatt_callbacks_t;
  21. /** Represents the standard Bluetooth GATT interface. */
  22. typedef struct {
  23. /** Set to sizeof(btgatt_interface_t) */
  24. size_t size;
  25. /**
  26. * Initializes the interface and provides callback routines
  27. */
  28. bt_status_t (*init)( const btgatt_callbacks_t* callbacks );
  29. /** Closes the interface */
  30. void (*cleanup)( void );
  31. /** Pointer to the GATT client interface methods.*/
  32. const btgatt_client_interface_t* client;
  33. /** Pointer to the GATT server interface methods.*/
  34. const btgatt_server_interface_t* server;
  35. } btgatt_interface_t;
  36. __END_DECLS
  37. #endif /* ANDROID_INCLUDE_BT_GATT_H */