source.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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. * Copyright (C) 2009 Joao Paulo Rechi Vita
  9. *
  10. *
  11. */
  12. typedef enum {
  13. SOURCE_STATE_DISCONNECTED,
  14. SOURCE_STATE_CONNECTING,
  15. SOURCE_STATE_CONNECTED,
  16. SOURCE_STATE_PLAYING,
  17. } source_state_t;
  18. typedef void (*source_state_cb) (struct btd_service *service,
  19. source_state_t old_state,
  20. source_state_t new_state,
  21. void *user_data);
  22. struct btd_service;
  23. unsigned int source_add_state_cb(struct btd_service *service,
  24. source_state_cb cb, void *user_data);
  25. gboolean source_remove_state_cb(unsigned int id);
  26. int source_init(struct btd_service *service);
  27. void source_unregister(struct btd_service *service);
  28. int source_connect(struct btd_service *service);
  29. gboolean source_new_stream(struct btd_service *service, struct avdtp *session,
  30. struct avdtp_stream *stream);
  31. gboolean source_setup_stream(struct btd_service *service,
  32. struct avdtp *session);
  33. int source_disconnect(struct btd_service *service);