Replace the existing Apache 2.0 boilerplate header with an SPDX tag throughout the zephyr code tree. This patch was generated via a script run over the master branch. Also updated doc/porting/application.rst that had a dependency on line numbers in a literal include. Manually updated subsys/logging/sys_log.c that had a malformed header in the original file. Also cleanup several cases that already had a SPDX tag and we either got a duplicate or missed updating. Jira: ZEP-1457 Change-Id: I6131a1d4ee0e58f5b938300c2d2fc77d2e69572c Signed-off-by: David B. Kinder <david.b.kinder@intel.com> Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
123 lines
3.2 KiB
C
123 lines
3.2 KiB
C
/** @file
|
|
* @brief Handsfree Profile handling.
|
|
*/
|
|
|
|
/*
|
|
* Copyright (c) 2015-2016 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
#ifndef __BT_HFP_H
|
|
#define __BT_HFP_H
|
|
|
|
/**
|
|
* @brief Hands Free Profile (HFP)
|
|
* @defgroup bt_hfp Hands Free Profile (HFP)
|
|
* @ingroup bluetooth
|
|
* @{
|
|
*/
|
|
|
|
#include <bluetooth/bluetooth.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/** @brief HFP profile application callback */
|
|
struct bt_hfp_hf_cb {
|
|
/** HF connected callback to application
|
|
*
|
|
* If this callback is provided it will be called whenever the
|
|
* connection completes.
|
|
*
|
|
* @param conn Connection object.
|
|
*/
|
|
void (*connected)(struct bt_conn *conn);
|
|
/** HF disconnected callback to application
|
|
*
|
|
* If this callback is provided it will be called whenever the
|
|
* connection gets disconnected, including when a connection gets
|
|
* rejected or cancelled or any error in SLC establisment.
|
|
*
|
|
* @param conn Connection object.
|
|
*/
|
|
void (*disconnected)(struct bt_conn *conn);
|
|
/** HF indicator Callback
|
|
*
|
|
* This callback provides service indicator value to the application
|
|
*
|
|
* @param conn Connection object.
|
|
* @param value service indicator value received from the AG.
|
|
*/
|
|
void (*service)(struct bt_conn *conn, uint32_t value);
|
|
/** HF indicator Callback
|
|
*
|
|
* This callback provides call indicator value to the application
|
|
*
|
|
* @param conn Connection object.
|
|
* @param value call indicator value received from the AG.
|
|
*/
|
|
void (*call)(struct bt_conn *conn, uint32_t value);
|
|
/** HF indicator Callback
|
|
*
|
|
* This callback provides call setup indicator value to the application
|
|
*
|
|
* @param conn Connection object.
|
|
* @param value call setup indicator value received from the AG.
|
|
*/
|
|
void (*call_setup)(struct bt_conn *conn, uint32_t value);
|
|
/** HF indicator Callback
|
|
*
|
|
* This callback provides call held indicator value to the application
|
|
*
|
|
* @param conn Connection object.
|
|
* @param value call held indicator value received from the AG.
|
|
*/
|
|
void (*call_held)(struct bt_conn *conn, uint32_t value);
|
|
/** HF indicator Callback
|
|
*
|
|
* This callback provides signal indicator value to the application
|
|
*
|
|
* @param conn Connection object.
|
|
* @param value signal indicator value received from the AG.
|
|
*/
|
|
void (*signal)(struct bt_conn *conn, uint32_t value);
|
|
/** HF indicator Callback
|
|
*
|
|
* This callback provides roaming indicator value to the application
|
|
*
|
|
* @param conn Connection object.
|
|
* @param value roaming indicator value received from the AG.
|
|
*/
|
|
void (*roam)(struct bt_conn *conn, uint32_t value);
|
|
/** HF indicator Callback
|
|
*
|
|
* This callback battery service indicator value to the application
|
|
*
|
|
* @param conn Connection object.
|
|
* @param value battery indicator value received from the AG.
|
|
*/
|
|
void (*battery)(struct bt_conn *conn, uint32_t value);
|
|
};
|
|
|
|
/** @brief Register HFP HF profile
|
|
*
|
|
* Register Handsfree profile callbacks to monitor the state and get the
|
|
* required HFP details to display.
|
|
*
|
|
* @param cb callback structure.
|
|
*
|
|
* @return 0 in case of success or negative value in case of error.
|
|
*/
|
|
int bt_hfp_hf_register(struct bt_hfp_hf_cb *cb);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
/**
|
|
* @}
|
|
*/
|
|
|
|
#endif /* __BT_HFP_H */
|