MariuszSkamra commented on code in PR #1677:
URL: https://github.com/apache/mynewt-nimble/pull/1677#discussion_r1603137063


##########
nimble/host/audio/include/audio/ble_audio_broadcast_sink.h:
##########
@@ -0,0 +1,267 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#ifndef H_BLE_AUDIO_BROADCAST_SINK_
+#define H_BLE_AUDIO_BROADCAST_SINK_
+
+/**
+ * @file ble_audio_broadcast_sink.h
+ *
+ * @brief Bluetooth LE Audio BAP Broadcast Sink API
+ *
+ * @defgroup ble_audio_broadcast_sink Bluetooth LE Audio BAP Broadcast Sink
+ * @ingroup bt_host
+ * @{
+ *
+ */
+
+#include <stdint.h>
+#include "host/ble_gap.h"
+#include "host/ble_iso.h"
+#include "audio/ble_audio.h"
+#include "audio/ble_audio_scan_delegator.h"
+#include "nimble/ble.h"
+
+enum ble_audio_broadcast_sink_action_type {
+    /** Broadcast Sink Action Type: PA sync */
+    BLE_AUDIO_BROADCAST_SINK_ACTION_PA_SYNC,
+
+    /** Broadcast Sink Action Type: BIG sync */
+    BLE_AUDIO_BROADCAST_SINK_ACTION_BIG_SYNC,
+
+    /** Broadcast Sink Action Type: BIS sync */
+    BLE_AUDIO_BROADCAST_SINK_ACTION_BIS_SYNC,
+
+    /** Broadcast Sink Action Type: Start discovery (scan) */
+    BLE_AUDIO_BROADCAST_SINK_ACTION_DISC_START,
+
+    /** Broadcast Sink Action Type: Start discovery (scan) */
+    BLE_AUDIO_BROADCAST_SINK_ACTION_DISC_STOP,
+};
+
+struct ble_audio_broadcast_sink_action {
+    /**
+     * Indicates the type of action that is requested.
+     */
+    enum ble_audio_broadcast_sink_action_type type;
+
+    /**
+     * A discriminated union containing additional details concerning the 
action.
+     * The 'type' field indicates which member of the union is valid.
+     */
+    union {
+        /**
+         * Represents PA Sync parameters request.
+         *
+         * The action triggered on locally or remotely initiated PA 
synchronization request.
+         * The application should initialize the `out_parameters`, or abort 
the process.
+         *
+         * Valid for the following action types:
+         *     o BLE_AUDIO_BROADCAST_SINK_ACTION_PA_SYNC
+         *
+         * Return:
+         *     o 0 on success;
+         *     o A non-zero value to abort.
+         */
+        struct {
+            /** Pointer to Periodic Sync parameters to initialize. */
+            struct ble_gap_periodic_sync_params *out_params;
+        } pa_sync;
+
+        /**
+         * Represents BIG Sync request.
+         *
+         * The action triggered on locally or remotely initiated BIG 
synchronization request.
+         * The application should provide the `out_mse` and `out_sync_timeout`,
+         * or reject the request.
+         *
+         * Valid for the following action types:
+         *     o BLE_AUDIO_BROADCAST_SINK_ACTION_BIG_SYNC
+         *
+         * Return:
+         *     o 0 on success;
+         *     o A non-zero value to abort.
+         */
+        struct {
+            /** Source ID. */
+            uint8_t source_id;
+
+            /** ISO Interval. */
+            uint16_t iso_interval;
+
+            /** Presentation delay. */
+            uint32_t presentation_delay;
+
+            /** Pointer to Maximum Subevents value to initialize. */
+            uint8_t *out_mse;
+
+            /** Pointer to Sync Timeout value to initialize. */
+            uint16_t *out_sync_timeout;

Review Comment:
   done



##########
nimble/host/audio/include/audio/ble_audio_broadcast_sink.h:
##########
@@ -0,0 +1,267 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#ifndef H_BLE_AUDIO_BROADCAST_SINK_
+#define H_BLE_AUDIO_BROADCAST_SINK_
+
+/**
+ * @file ble_audio_broadcast_sink.h
+ *
+ * @brief Bluetooth LE Audio BAP Broadcast Sink API
+ *
+ * @defgroup ble_audio_broadcast_sink Bluetooth LE Audio BAP Broadcast Sink
+ * @ingroup bt_host
+ * @{
+ *
+ */
+
+#include <stdint.h>
+#include "host/ble_gap.h"
+#include "host/ble_iso.h"
+#include "audio/ble_audio.h"
+#include "audio/ble_audio_scan_delegator.h"
+#include "nimble/ble.h"
+
+enum ble_audio_broadcast_sink_action_type {
+    /** Broadcast Sink Action Type: PA sync */
+    BLE_AUDIO_BROADCAST_SINK_ACTION_PA_SYNC,
+
+    /** Broadcast Sink Action Type: BIG sync */
+    BLE_AUDIO_BROADCAST_SINK_ACTION_BIG_SYNC,
+
+    /** Broadcast Sink Action Type: BIS sync */
+    BLE_AUDIO_BROADCAST_SINK_ACTION_BIS_SYNC,
+
+    /** Broadcast Sink Action Type: Start discovery (scan) */
+    BLE_AUDIO_BROADCAST_SINK_ACTION_DISC_START,
+
+    /** Broadcast Sink Action Type: Start discovery (scan) */
+    BLE_AUDIO_BROADCAST_SINK_ACTION_DISC_STOP,
+};
+
+struct ble_audio_broadcast_sink_action {
+    /**
+     * Indicates the type of action that is requested.
+     */
+    enum ble_audio_broadcast_sink_action_type type;
+
+    /**
+     * A discriminated union containing additional details concerning the 
action.
+     * The 'type' field indicates which member of the union is valid.
+     */
+    union {
+        /**
+         * Represents PA Sync parameters request.
+         *
+         * The action triggered on locally or remotely initiated PA 
synchronization request.
+         * The application should initialize the `out_parameters`, or abort 
the process.
+         *
+         * Valid for the following action types:
+         *     o BLE_AUDIO_BROADCAST_SINK_ACTION_PA_SYNC
+         *
+         * Return:
+         *     o 0 on success;
+         *     o A non-zero value to abort.
+         */
+        struct {
+            /** Pointer to Periodic Sync parameters to initialize. */
+            struct ble_gap_periodic_sync_params *out_params;
+        } pa_sync;
+
+        /**
+         * Represents BIG Sync request.
+         *
+         * The action triggered on locally or remotely initiated BIG 
synchronization request.
+         * The application should provide the `out_mse` and `out_sync_timeout`,
+         * or reject the request.
+         *
+         * Valid for the following action types:
+         *     o BLE_AUDIO_BROADCAST_SINK_ACTION_BIG_SYNC
+         *
+         * Return:
+         *     o 0 on success;
+         *     o A non-zero value to abort.
+         */
+        struct {
+            /** Source ID. */
+            uint8_t source_id;
+
+            /** ISO Interval. */
+            uint16_t iso_interval;
+
+            /** Presentation delay. */
+            uint32_t presentation_delay;
+
+            /** Pointer to Maximum Subevents value to initialize. */
+            uint8_t *out_mse;

Review Comment:
   done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to