Zephyr API 3.6.99
Loading...
Searching...
No Matches
hfp_ag.h
Go to the documentation of this file.
1
5/*
6 * Copyright (c) 2015-2016 Intel Corporation
7 * Copyright 2023-2024 NXP
8 *
9 * SPDX-License-Identifier: Apache-2.0
10 */
11#ifndef ZEPHYR_INCLUDE_BLUETOOTH_HFP_AG_H_
12#define ZEPHYR_INCLUDE_BLUETOOTH_HFP_AG_H_
13
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27/* HFP AG Indicators */
29 BT_HFP_AG_SERVICE_IND = 0, /* Service availability indicator */
30 BT_HFP_AG_CALL_IND = 1, /* call status indicator */
31 BT_HFP_AG_CALL_SETUP_IND = 2, /* Call set up status indicator */
32 BT_HFP_AG_CALL_HELD_IND = 3, /* Call hold status indicator */
33 BT_HFP_AG_SIGNAL_IND = 4, /* Signal strength indicator */
34 BT_HFP_AG_ROAM_IND = 5, /* Roaming status indicator */
35 BT_HFP_AG_BATTERY_IND = 6, /* Battery change indicator */
36 BT_HFP_AG_IND_MAX /* Indicator MAX value */
37};
38
39/* HFP CODEC */
40#define BT_HFP_AG_CODEC_CVSD 0x01
41#define BT_HFP_AG_CODEC_MSBC 0x02
42#define BT_HFP_AG_CODEC_LC3_SWB 0x03
43
44struct bt_hfp_ag;
45
55 void (*connected)(struct bt_hfp_ag *ag);
64 void (*disconnected)(struct bt_hfp_ag *ag);
73 void (*sco_connected)(struct bt_hfp_ag *ag, struct bt_conn *sco_conn);
82 void (*sco_disconnected)(struct bt_hfp_ag *ag);
83
96 int (*memory_dial)(struct bt_hfp_ag *ag, const char *location, char **number);
97
106 void (*outgoing)(struct bt_hfp_ag *ag, const char *number);
107
116 void (*incoming)(struct bt_hfp_ag *ag, const char *number);
117
126 void (*ringing)(struct bt_hfp_ag *ag, bool in_band);
127
135 void (*accept)(struct bt_hfp_ag *ag);
136
144 void (*reject)(struct bt_hfp_ag *ag);
145
153 void (*terminate)(struct bt_hfp_ag *ag);
154
162 void (*codec)(struct bt_hfp_ag *ag, uint32_t ids);
163};
164
175
186int bt_hfp_ag_connect(struct bt_conn *conn, struct bt_hfp_ag **ag, uint8_t channel);
187
196int bt_hfp_ag_disconnect(struct bt_hfp_ag *ag);
197
207int bt_hfp_ag_remote_incoming(struct bt_hfp_ag *ag, const char *number);
208
217int bt_hfp_ag_reject(struct bt_hfp_ag *ag);
218
227int bt_hfp_ag_accept(struct bt_hfp_ag *ag);
228
237int bt_hfp_ag_terminate(struct bt_hfp_ag *ag);
238
248int bt_hfp_ag_outgoing(struct bt_hfp_ag *ag, const char *number);
249
258int bt_hfp_ag_remote_ringing(struct bt_hfp_ag *ag);
259
268int bt_hfp_ag_remote_reject(struct bt_hfp_ag *ag);
269
278int bt_hfp_ag_remote_accept(struct bt_hfp_ag *ag);
279
288int bt_hfp_ag_remote_terminate(struct bt_hfp_ag *ag);
289
290#ifdef __cplusplus
291}
292#endif
293
298#endif /* ZEPHYR_INCLUDE_BLUETOOTH_HFP_HF_H_ */
Bluetooth subsystem core APIs.
int bt_hfp_ag_remote_terminate(struct bt_hfp_ag *ag)
Notify HFP Unit that the remote terminates the active/hold call.
int bt_hfp_ag_accept(struct bt_hfp_ag *ag)
Accept the incoming call.
bt_hfp_ag_indicator
Definition hfp_ag.h:28
int bt_hfp_ag_register(struct bt_hfp_ag_cb *cb)
Register HFP AG profile.
int bt_hfp_ag_remote_incoming(struct bt_hfp_ag *ag, const char *number)
Notify HFP Unit of an incoming call.
int bt_hfp_ag_remote_reject(struct bt_hfp_ag *ag)
Notify HFP Unit that the remote rejects the call.
int bt_hfp_ag_outgoing(struct bt_hfp_ag *ag, const char *number)
Dial a call.
int bt_hfp_ag_connect(struct bt_conn *conn, struct bt_hfp_ag **ag, uint8_t channel)
Create the hfp ag session.
int bt_hfp_ag_reject(struct bt_hfp_ag *ag)
Reject the incoming call.
int bt_hfp_ag_remote_accept(struct bt_hfp_ag *ag)
Notify HFP Unit that the remote accepts the call.
int bt_hfp_ag_disconnect(struct bt_hfp_ag *ag)
Disconnect the hfp ag session.
int bt_hfp_ag_terminate(struct bt_hfp_ag *ag)
Terminate the active/hold call.
int bt_hfp_ag_remote_ringing(struct bt_hfp_ag *ag)
Notify HFP Unit that the remote starts ringing.
@ BT_HFP_AG_SERVICE_IND
Definition hfp_ag.h:29
@ BT_HFP_AG_CALL_SETUP_IND
Definition hfp_ag.h:31
@ BT_HFP_AG_CALL_HELD_IND
Definition hfp_ag.h:32
@ BT_HFP_AG_SIGNAL_IND
Definition hfp_ag.h:33
@ BT_HFP_AG_BATTERY_IND
Definition hfp_ag.h:35
@ BT_HFP_AG_CALL_IND
Definition hfp_ag.h:30
@ BT_HFP_AG_ROAM_IND
Definition hfp_ag.h:34
@ BT_HFP_AG_IND_MAX
Definition hfp_ag.h:36
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
HFP profile AG application callback.
Definition hfp_ag.h:47
void(* connected)(struct bt_hfp_ag *ag)
HF AG connected callback to application.
Definition hfp_ag.h:55
void(* accept)(struct bt_hfp_ag *ag)
HF call accept Callback.
Definition hfp_ag.h:135
void(* codec)(struct bt_hfp_ag *ag, uint32_t ids)
Supported codec Ids callback.
Definition hfp_ag.h:162
void(* outgoing)(struct bt_hfp_ag *ag, const char *number)
HF outgoing Callback.
Definition hfp_ag.h:106
void(* reject)(struct bt_hfp_ag *ag)
HF call reject Callback.
Definition hfp_ag.h:144
void(* terminate)(struct bt_hfp_ag *ag)
HF call terminate Callback.
Definition hfp_ag.h:153
void(* sco_connected)(struct bt_hfp_ag *ag, struct bt_conn *sco_conn)
HF SCO/eSCO connected Callback.
Definition hfp_ag.h:73
void(* sco_disconnected)(struct bt_hfp_ag *ag)
HF SCO/eSCO disconnected Callback.
Definition hfp_ag.h:82
void(* ringing)(struct bt_hfp_ag *ag, bool in_band)
HF ringing Callback.
Definition hfp_ag.h:126
void(* incoming)(struct bt_hfp_ag *ag, const char *number)
HF incoming Callback.
Definition hfp_ag.h:116
int(* memory_dial)(struct bt_hfp_ag *ag, const char *location, char **number)
HF memory dialing request Callback.
Definition hfp_ag.h:96
void(* disconnected)(struct bt_hfp_ag *ag)
HF disconnected callback to application.
Definition hfp_ag.h:64