sink.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. *
  4. * BlueZ - Bluetooth protocol stack for Linux
  5. *
  6. * Copyright (C) 2006-2010 Nokia Corporation
  7. * Copyright (C) 2004-2010 Marcel Holtmann <marcel@holtmann.org>
  8. *
  9. *
  10. */
  11. typedef enum {
  12. SINK_STATE_DISCONNECTED,
  13. SINK_STATE_CONNECTING,
  14. SINK_STATE_CONNECTED,
  15. SINK_STATE_PLAYING,
  16. } sink_state_t;
  17. typedef void (*sink_state_cb) (struct btd_service *service,
  18. sink_state_t old_state,
  19. sink_state_t new_state,
  20. void *user_data);
  21. struct btd_service;
  22. unsigned int sink_add_state_cb(struct btd_service *service, sink_state_cb cb,
  23. void *user_data);
  24. gboolean sink_remove_state_cb(unsigned int id);
  25. int sink_init(struct btd_service *service);
  26. void sink_unregister(struct btd_service *service);
  27. gboolean sink_is_active(struct btd_service *service);
  28. int sink_connect(struct btd_service *service);
  29. gboolean sink_new_stream(struct btd_service *service, struct avdtp *session,
  30. struct avdtp_stream *stream);
  31. gboolean sink_setup_stream(struct btd_service *service, struct avdtp *session);
  32. int sink_disconnect(struct btd_service *service);