/**************************************************************************** Handle the outcome of the SDP register request if we're initialising the HFP profile lib. */ void aghfpHandleSdpInternalRegisterInit(AGHFP *aghfp, const AGHFP_INTERNAL_SDP_REGISTER_CFM_T *cfm) { if (cfm->status == aghfp_success) { /* Service record register succeeded */ aghfpSendInternalInitCfm(&aghfp->task, aghfp_init_success, 0); } else { /* Service record register failed - we don't get more detail than this! */ aghfpSendInternalInitCfm(&aghfp->task, aghfp_init_sdp_reg_fail, 0); } }
/**************************************************************************** Rfcomm channel has been allocated. */ void aghfpHandleRfcommRegisterCfm(AGHFP *aghfp, const CL_RFCOMM_REGISTER_CFM_T *cfm) { /* Check the result code */ if (cfm->status == success) { /* Rfcomm channel allocation succeeded send an init cfm */ aghfpSendInternalInitCfm(&aghfp->task, aghfp_init_success, cfm->server_channel); } else { /* Send an init cfm with error code indicating channel alloc failed */ aghfpSendInternalInitCfm(&aghfp->task, aghfp_init_rfc_chan_fail, 0); } }