diff mbox series

[BlueZ,02/14] shared/bass: Make bt_bcast_src private

Message ID 20240821145602.92083-3-iulia.tanasescu@nxp.com (mailing list archive)
State Superseded
Headers show
Series Add Scan Delegator support for Add Source op | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/CheckPatch success CheckPatch PASS
tedd_an/GitLint success Gitlint PASS
tedd_an/IncrementalBuild fail [BlueZ,02/14] shared/bass: Make bt_bcast_src private src/shared/bass.c: In function ‘connect_cb’: src/shared/bass.c:677:27: error: ‘struct bt_bcast_src’ has no member named ‘bises’ 677 | queue_push_tail(bcast_src->bises, io); | ^~ src/shared/bass.c:712:26: error: ‘struct bt_bcast_src’ has no member named ‘bises’ 712 | queue_destroy(bcast_src->bises, bass_bis_unref); | ^~ src/shared/bass.c:713:12: error: ‘struct bt_bcast_src’ has no member named ‘bises’ 713 | bcast_src->bises = NULL; | ^~ src/shared/bass.c:716:34: error: ‘struct bt_bcast_src’ has no member named ‘listen_io’ 716 | g_io_channel_shutdown(bcast_src->listen_io, TRUE, NULL); | ^~ src/shared/bass.c:717:31: error: ‘struct bt_bcast_src’ has no member named ‘listen_io’ 717 | g_io_channel_unref(bcast_src->listen_io); | ^~ src/shared/bass.c:718:12: error: ‘struct bt_bcast_src’ has no member named ‘listen_io’ 718 | bcast_src->listen_io = NULL; | ^~ src/shared/bass.c:721:16: error: ‘struct bt_bcast_src’ has no member named ‘pa_sync_io’ 721 | if (bcast_src->pa_sync_io) { | ^~ src/shared/bass.c:722:35: error: ‘struct bt_bcast_src’ has no member named ‘pa_sync_io’ 722 | g_io_channel_shutdown(bcast_src->pa_sync_io, | ^~ src/shared/bass.c:724:32: error: ‘struct bt_bcast_src’ has no member named ‘pa_sync_io’ 724 | g_io_channel_unref(bcast_src->pa_sync_io); | ^~ src/shared/bass.c:725:13: error: ‘struct bt_bcast_src’ has no member named ‘pa_sync_io’ 725 | bcast_src->pa_sync_io = NULL; | ^~ src/shared/bass.c: In function ‘confirm_cb’: src/shared/bass.c:788:11: error: ‘struct bt_bcast_src’ has no member named ‘pa_sync_io’ 788 | bcast_src->pa_sync_io = io; | ^~ src/shared/bass.c:789:28: error: ‘struct bt_bcast_src’ has no member named ‘pa_sync_io’ 789 | g_io_channel_ref(bcast_src->pa_sync_io); | ^~ src/shared/bass.c:807:37: error: ‘struct bt_bcast_src’ has no member named ‘pa_sync_io’ 807 | if (!bt_io_bcast_accept(bcast_src->pa_sync_io, | ^~ src/shared/bass.c: In function ‘bass_handle_add_src_op’: src/shared/bass.c:1081:12: error: ‘struct bt_bcast_src’ has no member named ‘listen_io’ 1081 | bcast_src->listen_io = io; | ^~ src/shared/bass.c:1082:29: error: ‘struct bt_bcast_src’ has no member named ‘listen_io’ 1082 | g_io_channel_ref(bcast_src->listen_io); | ^~ src/shared/bass.c:1084:32: error: ‘struct bt_bcast_src’ has no member named ‘bises’ 1084 | if (num_bis > 0 && !bcast_src->bises) | ^~ src/shared/bass.c:1085:13: error: ‘struct bt_bcast_src’ has no member named ‘bises’ 1085 | bcast_src->bises = queue_new(); | ^~ src/shared/bass.c: In function ‘bass_handle_set_bcast_code_op’: src/shared/bass.c:1170:16: error: ‘struct bt_bcast_src’ has no member named ‘pa_sync_io’ 1170 | if (!bcast_src->pa_sync_io) | ^~ src/shared/bass.c:1173:41: error: ‘struct bt_bcast_src’ has no member named ‘pa_sync_io’ 1173 | sk = g_io_channel_unix_get_fd(bcast_src->pa_sync_io); | ^~ src/shared/bass.c:1190:35: error: ‘struct bt_bcast_src’ has no member named ‘pa_sync_io’ 1190 | if (!bt_io_bcast_accept(bcast_src->pa_sync_io, connect_cb, | ^~ src/shared/bass.c: In function ‘bass_bcast_src_free’: src/shared/bass.c:1378:15: error: ‘struct bt_bcast_src’ has no member named ‘listen_io’ 1378 | if (bcast_src->listen_io) { | ^~ src/shared/bass.c:1379:34: error: ‘struct bt_bcast_src’ has no member named ‘listen_io’ 1379 | g_io_channel_shutdown(bcast_src->listen_io, TRUE, NULL); | ^~ src/shared/bass.c:1380:31: error: ‘struct bt_bcast_src’ has no member named ‘listen_io’ 1380 | g_io_channel_unref(bcast_src->listen_io); | ^~ src/shared/bass.c:1383:15: error: ‘struct bt_bcast_src’ has no member named ‘pa_sync_io’ 1383 | if (bcast_src->pa_sync_io) { | ^~ src/shared/bass.c:1384:34: error: ‘struct bt_bcast_src’ has no member named ‘pa_sync_io’ 1384 | g_io_channel_shutdown(bcast_src->pa_sync_io, TRUE, NULL); | ^~ src/shared/bass.c:1385:31: error: ‘struct bt_bcast_src’ has no member named ‘pa_sync_io’ 1385 | g_io_channel_unref(bcast_src->pa_sync_io); | ^~ src/shared/bass.c:1388:25: error: ‘struct bt_bcast_src’ has no member named ‘bises’ 1388 | queue_destroy(bcast_src->bises, bass_bis_unref); | ^~ make[1]: *** [Makefile:8672: src/shared/libshared_mainloop_la-bass.lo] Error 1 make[1]: *** Waiting for unfinished jobs.... make: *** [Makefile:4676: all] Error 2

Commit Message

Iulia Tanasescu Aug. 21, 2024, 2:55 p.m. UTC
The bt_bcast_src structure holds information for the BASS Broadcast Audio
Receive State characteristic. This commit makes this structure private
for shared/bass, since this is the only place where GATT characteristics
should be handled.
---
 src/shared/bass.c | 26 ++++++++++++++++++++++++++
 src/shared/bass.h | 30 +-----------------------------
 2 files changed, 27 insertions(+), 29 deletions(-)
diff mbox series

Patch

diff --git a/src/shared/bass.c b/src/shared/bass.c
index bf739526c..ce13f2c24 100644
--- a/src/shared/bass.c
+++ b/src/shared/bass.c
@@ -78,6 +78,32 @@  struct bt_bass {
 	void *user_data;
 };
 
+/* BASS subgroup field of the Broadcast
+ * Receive State characteristic
+ */
+struct bt_bass_subgroup_data {
+	uint32_t bis_sync;
+	uint32_t pending_bis_sync;
+	uint8_t meta_len;
+	uint8_t *meta;
+};
+
+/* BASS Broadcast Source structure */
+struct bt_bcast_src {
+	struct bt_bass *bass;
+	struct gatt_db_attribute *attr;
+	uint8_t id;
+	uint8_t addr_type;
+	bdaddr_t addr;
+	uint8_t sid;
+	uint32_t bid;
+	uint8_t sync_state;
+	uint8_t enc;
+	uint8_t bad_code[BT_BASS_BCAST_CODE_SIZE];
+	uint8_t num_subgroups;
+	struct bt_bass_subgroup_data *subgroup_data;
+};
+
 typedef void (*bass_notify_t)(struct bt_bass *bass, uint16_t value_handle,
 				const uint8_t *value, uint16_t length,
 				void *user_data);
diff --git a/src/shared/bass.h b/src/shared/bass.h
index 878bab51a..086fe335e 100644
--- a/src/shared/bass.h
+++ b/src/shared/bass.h
@@ -8,6 +8,7 @@ 
  */
 
 struct bt_bass;
+struct bt_bcast_src;
 
 #define NUM_BCAST_RECV_STATES				2
 #define BT_BASS_BCAST_CODE_SIZE				16
@@ -32,35 +33,6 @@  struct bt_bass;
 #define BT_BASS_BIG_ENC_STATE_DEC			0x02
 #define BT_BASS_BIG_ENC_STATE_BAD_CODE			0x03
 
-/* BASS subgroup field of the Broadcast
- * Receive State characteristic
- */
-struct bt_bass_subgroup_data {
-	uint32_t bis_sync;
-	uint32_t pending_bis_sync;
-	uint8_t meta_len;
-	uint8_t *meta;
-};
-
-/* BASS Broadcast Source structure */
-struct bt_bcast_src {
-	struct bt_bass *bass;
-	struct gatt_db_attribute *attr;
-	uint8_t id;
-	uint8_t addr_type;
-	bdaddr_t addr;
-	uint8_t sid;
-	uint32_t bid;
-	uint8_t sync_state;
-	uint8_t enc;
-	uint8_t bad_code[BT_BASS_BCAST_CODE_SIZE];
-	uint8_t num_subgroups;
-	struct bt_bass_subgroup_data *subgroup_data;
-	GIOChannel *listen_io;
-	GIOChannel *pa_sync_io;
-	struct queue *bises;
-};
-
 /* Broadcast Audio Scan Control Point
  * header structure
  */