KKopyscinski commented on code in PR #1619:
URL: https://github.com/apache/mynewt-nimble/pull/1619#discussion_r1371242163


##########
nimble/host/include/host/ble_audio_broadcast.h:
##########
@@ -0,0 +1,271 @@
+/*
+ * 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_
+#define H_BLE_AUDIO_BROADCAST_
+
+#include <stdint.h>
+#include "host/ble_gap.h"
+#include "host/ble_iso.h"
+#include "host/ble_audio_common.h"
+
+struct ble_broadcast_create_params {
+    /** BASE to broadcast */
+    struct ble_audio_base *base;
+
+    /** Parameters used to configure Extended advertising */
+    struct ble_gap_ext_adv_params *extended_params;
+
+    /** Parameters used to configure Periodic advertising */
+    struct ble_gap_periodic_adv_params *periodic_params;
+
+    /** Broadcast name - null terminated.
+     * Set NULL to not include in advertising
+     */
+    const char *name;
+
+    /** Advertising instance */
+    uint8_t adv_instance;
+
+    /** BIG parameters */
+    struct ble_iso_big_params *big_params;
+
+    /** Additional data to include in Extended Advertising  */
+    uint8_t *svc_data;
+
+    /** Additional data length  */
+    uint16_t svc_data_len;
+};
+
+struct ble_broadcast_update_params {
+    /** Broadcast name - null terminated.
+     * Set NULL to not include in advertising
+     */
+    const char *name;
+
+    /** Advertising instance */
+    uint8_t adv_instance;
+
+    /** Additional data to include in Extended Advertising  */
+    uint8_t *svc_data;
+
+    /** Additional data length  */
+    uint16_t svc_data_len;
+
+    /** Broadcast ID */
+    uint32_t broadcast_id;
+};
+
+typedef int ble_audio_broadcast_destroy_fn(struct ble_audio_base *base,
+                                           void *args);
+
+/** BASE configuration describing broadcast advertisement */
+struct ble_broadcast_base_config {

Review Comment:
   So my idea for this was that `ble_broadcast_create_params` is `in` 
parameter. So it's used to configure instances and so on. If function is 
successful, `ble_broadcast_base_config` will be filled with `out` values, some 
copied from `ble_broadcast_create_params`, some generated, like 
`base->broadcast_id`. On second thought I see that this is not the best, I 
think I'll remove this parameter and save what's needed in host, so the app 
doesn't need to save `ble_broadcast_base_config` on it's own. And BASE can be 
identified just by `adv_instance`



-- 
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