📄 hfp_headset_call_control.c
字号:
/****************************************************************************
Copyright (C) Cambridge Silicon Radio Ltd. 2004
FILE NAME
hfp_headset_call_control.c
DESCRIPTION
NOTES
*/
/****************************************************************************
Header files
*/
#include "headset_private.h"
#include "hfp_headset_call_control.h"
#include "hfp_headset_sco.h"
#include <hfp.h>
/****************************************************************************
NAME
hfpHeadsetAnswerCall
DESCRIPTION
Answer an incoming call from the headset
RETURNS
void
*/
void hfpHeadsetAnswerCall(const headsetTaskData *app)
{
/*
Call the HFP lib function, this will determine the AT cmd to send
depending on whether the profile instance is HSP or HFP compliant.
*/
HfpAnswerCall(app->hfp);
}
/****************************************************************************
NAME
hfpHeadsetHandleAnswerCallCfm
DESCRIPTION
Cfm from the HFP lib telling us whether the answer call response was
accepted by the AG or not.
RETURNS
void
*/
void hfpHeadsetHandleAnswerCallCfm(headsetTaskData *app, const HFP_ANSWER_CALL_CFM_T *cfm)
{
app = app;
cfm = cfm;
}
/****************************************************************************
NAME
hfpHeadsetRejectCall
DESCRIPTION
Reject an incoming/ outgoing call from the headset
RETURNS
void
*/
void hfpHeadsetRejectCall(const headsetTaskData *app)
{
/* Reject incoming call - only valid for instances of HFP */
HfpRejectCall(app->hfp);
}
/****************************************************************************
NAME
hfpHeadsetHandleRejectCallCfm
DESCRIPTION
Cfm from the HFP lib telling us whether the reject call response was
accepted by the AG or not.
RETURNS
void
*/
void hfpHeadsetHandleRejectCallCfm(headsetTaskData *app, const HFP_REJECT_CALL_CFM_T *cfm)
{
app = app;
cfm = cfm;
}
/****************************************************************************
NAME
hfpHeadsetHangUpCall
DESCRIPTION
Hang up the call from the headset.
RETURNS
void
*/
void hfpHeadsetHangUpCall(const headsetTaskData *app)
{
/* Terminate the current ongoing call process */
HfpTerminateCall(app->hfp);
}
/****************************************************************************
NAME
hfpHeadsetHandleTerminateCallCfm
DESCRIPTION
Cfm from the HFP lib telling us whether the hang up call response was
accepted by the AG or not.
RETURNS
void
*/
void hfpHeadsetHandleTerminateCallCfm(headsetTaskData *app, const HFP_TERMINATE_CALL_CFM_T *cfm)
{
app = app;
cfm = cfm;
}
/****************************************************************************
NAME
hfpHeadsetTransferAudio
DESCRIPTION
If the audio is at the headset end transfer it back to the AG and
vice versa.
RETURNS
void
*/
void hfpHeadsetTransferAudio(const headsetTaskData *app, hfp_audio_transfer_direction dir)
{
/*
Decide what packet type to use based on the SCO packets supported by
the remote end and initiate the audio transfer.
*/
HfpTransferAudioConnection(app->hfp, dir, hfpGetBestScoPktType(app));
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -