Bluetooth: Audio: MICS client return pointer to instance on discover

Add return of instance pointer in bt_mics_discover so that a client
will get a bt_mics pointer when doing discover, which will be
used going forward in the API.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This commit is contained in:
Emil Gydesen 2021-06-08 13:42:11 +02:00 committed by Carles Cufí
commit f42d6c475c
4 changed files with 18 additions and 7 deletions

View file

@ -149,16 +149,18 @@ struct bt_mics_cb {
* @brief Discover Microphone Input Control Service
*
* This will start a GATT discovery and setup handles and subscriptions.
* This shall be called once before any other actions can be executed for
* the peer device.
* This shall be called once before any other actions can be executed for the
* peer device, and the @ref bt_mics_discover_cb callback will notify when it
* is possible to start remote operations.
*
* This shall only be done as the client.
*
* @param conn The connection to initialize the profile for.
* @param[out] mics Valid remote instance object on success.
*
* @return 0 on success, GATT error value on fail.
*/
int bt_mics_discover(struct bt_conn *conn);
int bt_mics_discover(struct bt_conn *conn, struct bt_mics **mics);
/**
* @brief Unmute the server.