Zephyr API Documentation 4.3.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
ccp.h
Go to the documentation of this file.
1
5
6/*
7 * Copyright (c) 2024 Nordic Semiconductor ASA
8 *
9 * SPDX-License-Identifier: Apache-2.0
10 */
11
12#ifndef ZEPHYR_INCLUDE_BLUETOOTH_AUDIO_CCP_H_
13#define ZEPHYR_INCLUDE_BLUETOOTH_AUDIO_CCP_H_
14
34
35#include <stddef.h>
36
37#include <zephyr/autoconf.h>
40#include <zephyr/sys/slist.h>
41
42#ifdef __cplusplus
43extern "C" {
44#endif
51struct bt_ccp_call_control_server_bearer;
52
76 struct bt_ccp_call_control_server_bearer **bearer);
77
94int bt_ccp_call_control_server_unregister_bearer(struct bt_ccp_call_control_server_bearer *bearer);
95
108 struct bt_ccp_call_control_server_bearer *bearer, const char *name);
109
121 struct bt_ccp_call_control_server_bearer *bearer, const char **name);
122
133int bt_ccp_call_control_server_get_bearer_uci(struct bt_ccp_call_control_server_bearer *bearer,
134 const char **uci);
135 /* End of group bt_ccp_call_control_server */
137
144struct bt_ccp_call_control_client;
145
147struct bt_ccp_call_control_client_bearer;
148
151#if defined(CONFIG_BT_TBS_CLIENT_GTBS)
153 struct bt_ccp_call_control_client_bearer *gtbs_bearer;
154#endif /* CONFIG_BT_TBS_CLIENT_GTBS */
155
156#if defined(CONFIG_BT_TBS_CLIENT_TBS)
158 size_t tbs_count;
159
161 struct bt_ccp_call_control_client_bearer
162 *tbs_bearers[CONFIG_BT_CCP_CALL_CONTROL_CLIENT_BEARER_COUNT];
163#endif /* CONFIG_BT_TBS_CLIENT_TBS */
164};
165
182 void (*discover)(struct bt_ccp_call_control_client *client, int err,
183 struct bt_ccp_call_control_client_bearers *bearers);
184
185#if defined(CONFIG_BT_TBS_CLIENT_BEARER_PROVIDER_NAME)
196 void (*bearer_provider_name)(struct bt_ccp_call_control_client_bearer *bearer, int err,
197 const char *name);
198#endif /* CONFIG_BT_TBS_CLIENT_BEARER_PROVIDER_NAME */
199
202 sys_snode_t _node;
204};
205
224int bt_ccp_call_control_client_discover(struct bt_conn *conn,
225 struct bt_ccp_call_control_client **out_client);
226
237
248
258int bt_ccp_call_control_client_get_bearers(struct bt_ccp_call_control_client *client,
259 struct bt_ccp_call_control_client_bearers *bearers);
260
277 struct bt_ccp_call_control_client_bearer *bearer); /* End of group bt_ccp_call_control_client */
279#ifdef __cplusplus
280}
281#endif
282
286
287#endif /* ZEPHYR_INCLUDE_BLUETOOTH_AUDIO_CCP_H_ */
Bluetooth connection handling.
int bt_ccp_call_control_client_discover(struct bt_conn *conn, struct bt_ccp_call_control_client **out_client)
Discovers the Telephone Bearer Service (TBS) support on a remote device.
int bt_ccp_call_control_client_read_bearer_provider_name(struct bt_ccp_call_control_client_bearer *bearer)
Read the bearer provider name of a remote TBS bearer.
int bt_ccp_call_control_client_unregister_cb(struct bt_ccp_call_control_client_cb *cb)
Unregister callbacks for the Call Control Client.
int bt_ccp_call_control_client_register_cb(struct bt_ccp_call_control_client_cb *cb)
Register callbacks for the Call Control Client.
int bt_ccp_call_control_client_get_bearers(struct bt_ccp_call_control_client *client, struct bt_ccp_call_control_client_bearers *bearers)
Get the bearers of a client instance.
int bt_ccp_call_control_server_get_bearer_provider_name(struct bt_ccp_call_control_server_bearer *bearer, const char **name)
Get the bearer provider name.
int bt_ccp_call_control_server_register_bearer(const struct bt_tbs_register_param *param, struct bt_ccp_call_control_server_bearer **bearer)
Register a Telephone Bearer.
int bt_ccp_call_control_server_get_bearer_uci(struct bt_ccp_call_control_server_bearer *bearer, const char **uci)
Get the bearer UCI.
int bt_ccp_call_control_server_unregister_bearer(struct bt_ccp_call_control_server_bearer *bearer)
Unregister a Telephone Bearer.
int bt_ccp_call_control_server_set_bearer_provider_name(struct bt_ccp_call_control_server_bearer *bearer, const char *name)
Set a new bearer provider name.
struct _snode sys_snode_t
Single-linked list node structure.
Definition slist.h:39
Struct with information about bearers of a client.
Definition ccp.h:150
Struct to hold the Telephone Bearer Service client callbacks.
Definition ccp.h:171
void(* discover)(struct bt_ccp_call_control_client *client, int err, struct bt_ccp_call_control_client_bearers *bearers)
Callback function for bt_ccp_call_control_client_discover().
Definition ccp.h:182
Parameters for registering a Telephone Bearer Service.
Definition tbs.h:478
Public APIs for Bluetooth Telephone Bearer Service.