/foundation/communication/bluetooth_service/services/bluetooth/stack/src/avctp/ |
H A D | avctp_dev.c | 36 AvctCbDev *cbDev = NULL; in AvctGetCbDevByAddress() local 38 if ((g_avctMng.cbDev[i].alloced) && in AvctGetCbDevByAddress() 39 (!memcmp((char *)g_avctMng.cbDev[i].peerAddr.addr, (char *)&(peerAddr->addr), BT_ADDR_LENGTH))) { in AvctGetCbDevByAddress() 40 cbDev = &g_avctMng.cbDev[i]; in AvctGetCbDevByAddress() 45 return cbDev; in AvctGetCbDevByAddress() 57 AvctCbDev *cbDev = NULL; in AvctGetCbDevByChId() local 59 LOG_DEBUG("[AVCT] %{public}s: g_avctMng.cbDev[%hhu].chLink is %hhu", __func__, i, g_avctMng.cbDev[i].chLink); in AvctGetCbDevByChId() 60 if (((g_avctMng.cbDev[ in AvctGetCbDevByChId() 79 AvctCbDev *cbDev = NULL; AvctCbDevAlloc() local 99 AvctCbDevDealloc(AvctCbDev *cbDev) AvctCbDevDealloc() argument [all...] |
H A D | avctp_br_act.c | 31 * Param[in] *cbDev The point to the device block. 35 uint16_t AvctCbBrChConn(AvctCbDev *cbDev, const AvctEvtData *data) in AvctCbBrChConn() argument 45 AvctRequestSecurity(cbDev, serviceId, AVCT_BR_PSM); in AvctCbBrChConn() 52 * Param[in] *cbDev The point to the device block. 56 uint16_t AvctCbBrChConnFail(AvctCbDev *cbDev, const AvctEvtData *data) in AvctCbBrChConnFail() argument 62 if ((cbConn->status == AVCT_CONN_BIND) && (cbConn->cbDev == cbDev)) { in AvctCbBrChConnFail() 63 if (cbDev->chLink & AVCT_ALLOC_BR) { in AvctCbBrChConnFail() 64 AvctCbConnEvtCallback(cbConn, AVCT_BR_CONNECT_CFM_EVT, data->result, &(cbConn->cbDev->peerAddr)); in AvctCbBrChConnFail() 68 AvctCbChDealloc(&(cbDev in AvctCbBrChConnFail() 81 AvctCbBrChBind(AvctCbDev *cbDev, const AvctEvtData *data) AvctCbBrChBind() argument 97 AvctCbBrChBindFail(AvctCbDev *cbDev, const AvctEvtData *data) AvctCbBrChBindFail() argument 112 AvctCbBrChDisconn(AvctCbDev *cbDev, const AvctEvtData *data) AvctCbBrChDisconn() argument 127 AvctCbBrChUnbind(AvctCbDev *cbDev, const AvctEvtData *data) AvctCbBrChUnbind() argument 143 AvctCbBrChCheckDisconn(AvctCbDev *cbDev, const AvctEvtData *data) AvctCbBrChCheckDisconn() argument 166 AvctCbBrChConnInd(AvctCbDev *cbDev, const AvctEvtData *data) AvctCbBrChConnInd() argument 198 AvctCbBrChCloseInd(AvctCbDev *cbDev, const AvctEvtData *data) AvctCbBrChCloseInd() argument 222 AvctCbBrChCloseCfm(AvctCbDev *cbDev, const AvctEvtData *data) AvctCbBrChCloseCfm() argument 246 AvctCbBrChBusyInd(AvctCbDev *cbDev, const AvctEvtData *data) AvctCbBrChBusyInd() argument 271 AvctCbBrDiscardMsg(AvctCbDev *cbDev, const AvctEvtData *data) AvctCbBrDiscardMsg() argument 284 AvctCbBrSendMsg(AvctCbDev *cbDev, const AvctEvtData *data) AvctCbBrSendMsg() argument 315 AvctCbBrRevMsg(AvctCbDev *cbDev, const AvctEvtData *data) AvctCbBrRevMsg() argument 371 AvctCbBrDiscardRevMsg(AvctCbDev *cbDev, const AvctEvtData *data) AvctCbBrDiscardRevMsg() argument [all...] |
H A D | avctp_br_act.h | 22 extern uint16_t AvctCbBrChConn(AvctCbDev *cbDev, const AvctEvtData *data); 23 extern uint16_t AvctCbBrChConnFail(AvctCbDev *cbDev, const AvctEvtData *data); 24 extern uint16_t AvctCbBrChBind(AvctCbDev *cbDev, const AvctEvtData *data); 25 extern uint16_t AvctCbBrChBindFail(AvctCbDev *cbDev, const AvctEvtData *data); 26 extern uint16_t AvctCbBrChDisconn(AvctCbDev *cbDev, const AvctEvtData *data); 27 extern uint16_t AvctCbBrChUnbind(AvctCbDev *cbDev, const AvctEvtData *data); 28 extern uint16_t AvctCbBrChCheckDisconn(AvctCbDev *cbDev, const AvctEvtData *data); 29 extern uint16_t AvctCbBrChConnInd(AvctCbDev *cbDev, const AvctEvtData *data); 30 extern uint16_t AvctCbBrChCloseInd(AvctCbDev *cbDev, const AvctEvtData *data); 31 extern uint16_t AvctCbBrChCloseCfm(AvctCbDev *cbDev, cons [all...] |
H A D | avctp_ctrl_act.c | 38 * Param[in] *cbDev The point to the device block. 42 uint16_t AvctCbCtrlChConn(AvctCbDev *cbDev, const AvctEvtData *data) in AvctCbCtrlChConn() argument 52 AvctRequestSecurity(cbDev, serviceId, AVCT_PSM); in AvctCbCtrlChConn() 59 * Param[in] *cbDev The point to the device block. 63 uint16_t AvctCbCtrlChConnFail(AvctCbDev *cbDev, const AvctEvtData *data) in AvctCbCtrlChConnFail() argument 69 if ((cbConn->status == AVCT_CONN_BIND) && (cbConn->cbDev == cbDev)) { in AvctCbCtrlChConnFail() 70 AvctCbConnEvtCallback(cbConn, AVCT_CONNECT_CFM_EVT, data->result, &(cbConn->cbDev->peerAddr)); in AvctCbCtrlChConnFail() 74 AvctCbDevDealloc(cbDev); in AvctCbCtrlChConnFail() 82 * Param[in] *cbDev Th 86 AvctCbCtrlChBind(AvctCbDev *cbDev, const AvctEvtData *data) AvctCbCtrlChBind() argument 103 AvctCbCtrlChBindFail(AvctCbDev *cbDev, const AvctEvtData *data) AvctCbCtrlChBindFail() argument 120 AvctCbCtrlChDisconn(AvctCbDev *cbDev, const AvctEvtData *data) AvctCbCtrlChDisconn() argument 135 AvctCbCtrlChUnbind(AvctCbDev *cbDev, const AvctEvtData *data) AvctCbCtrlChUnbind() argument 154 AvctCbCtrlChCheckDisconn(AvctCbDev *cbDev, const AvctEvtData *data) AvctCbCtrlChCheckDisconn() argument 179 AvctCbCtrlChConnInd(AvctCbDev *cbDev, const AvctEvtData *data) AvctCbCtrlChConnInd() argument 223 AvctCbCtrlChCloseInd(AvctCbDev *cbDev, const AvctEvtData *data) AvctCbCtrlChCloseInd() argument 252 AvctCbCtrlChCloseCfm(AvctCbDev *cbDev, const AvctEvtData *data) AvctCbCtrlChCloseCfm() argument 277 AvctCbCtrlChBusyInd(AvctCbDev *cbDev, const AvctEvtData *data) AvctCbCtrlChBusyInd() argument 302 AvctCbCtrlDiscardMsg(AvctCbDev *cbDev, const AvctEvtData *data) AvctCbCtrlDiscardMsg() argument 316 AvctCbCtrlSendMsg(AvctCbDev *cbDev, const AvctEvtData *data) AvctCbCtrlSendMsg() argument 339 AvctCbCtrlRevMsg(AvctCbDev *cbDev, const AvctEvtData *data) AvctCbCtrlRevMsg() argument 395 AvctCbCtrlDiscardRevMsg(AvctCbDev *cbDev, const AvctEvtData *data) AvctCbCtrlDiscardRevMsg() argument [all...] |
H A D | avctp_ctrl_act.h | 28 extern uint16_t AvctCbCtrlChConn(AvctCbDev *cbDev, const AvctEvtData *data); 29 extern uint16_t AvctCbCtrlChBindFail(AvctCbDev *cbDev, const AvctEvtData *data); 30 extern uint16_t AvctCbCtrlChBind(AvctCbDev *cbDev, const AvctEvtData *data); 31 extern uint16_t AvctCbCtrlChConnFail(AvctCbDev *cbDev, const AvctEvtData *data); 32 extern uint16_t AvctCbCtrlChDisconn(AvctCbDev *cbDev, const AvctEvtData *data); 33 extern uint16_t AvctCbCtrlChUnbind(AvctCbDev *cbDev, const AvctEvtData *data); 34 extern uint16_t AvctCbCtrlChCheckDisconn(AvctCbDev *cbDev, const AvctEvtData *data); 35 extern uint16_t AvctCbCtrlChConnInd(AvctCbDev *cbDev, const AvctEvtData *data); 36 extern uint16_t AvctCbCtrlChCloseInd(AvctCbDev *cbDev, const AvctEvtData *data); 37 extern uint16_t AvctCbCtrlChCloseCfm(AvctCbDev *cbDev, cons [all...] |
H A D | avctp_br_l2cap.c | 113 AvctCbDev *cbDev = NULL; in AvctBrRecvConnectionReqAct() local 120 cbDev = AvctGetCbDevByAddress(addr); in AvctBrRecvConnectionReqAct() 121 if (cbDev == NULL) { in AvctBrRecvConnectionReqAct() 124 } else if (!(cbDev->chLink & AVCT_ALLOC_CTRL)) { in AvctBrRecvConnectionReqAct() 127 } else if (cbDev->chLink & AVCT_ALLOC_BR) { in AvctBrRecvConnectionReqAct() 145 cbDev->cbBr = cbBr; in AvctBrRecvConnectionReqAct() 146 cbDev->chLink |= AVCT_ALLOC_BR; in AvctBrRecvConnectionReqAct() 147 cbDev->cbBr->ia = AVCT_ACPT; in AvctBrRecvConnectionReqAct() 203 AvctCbDev *cbDev = AvctGetCbDevByChId(lcid); in AvctBrRecvConnectionRspCBack() local 204 if (cbDev in AvctBrRecvConnectionRspCBack() 276 AvctCbDev *cbDev = AvctGetCbDevByChId(lcid); AvctBrRecvConfigReqCBack() local 343 AvctCbDev *cbDev = AvctGetCbDevByChId(lcid); AvctBrRecvConfigRspCBack() local 413 AvctCbDev *cbDev = AvctGetCbDevByChId(lcid); AvctBrRecvDisconnectionReqCBack() local 461 AvctCbDev *cbDev = AvctGetCbDevByChId(lcid); AvctBrRecvDisconnectionRspCBack() local 510 AvctCbDev *cbDev = AvctGetCbDevByChId(lcid); AvctBrDisconnectAbnormalCBack() local 566 AvctCbDev *cbDev = AvctGetCbDevByChId(lcid); AvctBrRecvDataCBack() local 614 AvctCbDev *cbDev = AvctGetCbDevByChId(lcid); AvctBrRemoteBusyCBack() local 671 AvctCbDev *cbDev = AvctGetCbDevByAddress(addr); AvctBrwL2CIFConnectResult() local [all...] |
H A D | avctp_br.c | 25 typedef uint16_t (*AvctBrAction_t)(AvctCbDev *cbDev, const AvctEvtData *data); 50 uint16_t AvctCbBrEvt(AvctCbDev *cbDev, uint8_t event, const AvctEvtData *data) in AvctCbBrEvt() argument 52 LOG_DEBUG("[AVCT] %{public}s: EventID(%hhu) curState(%hhu)", __func__, event, cbDev->cbBr->stState); in AvctCbBrEvt() 54 AvctCbCh *cbBr = cbDev->cbBr; in AvctCbBrEvt() 63 ret = (*C_AVCT_BR_ACTION[action])(cbDev, data); in AvctCbBrEvt() 82 if (cbConn->cbDev->cbCtrl == NULL) { in AvctBrConnectInitiate() 85 } else if (cbConn->cbDev->chLink & AVCT_ALLOC_BR) { in AvctBrConnectInitiate() 90 if (cbConn->cbDev->cbBr == NULL) { in AvctBrConnectInitiate() 101 cbConn->cbDev->cbBr = cbBr; in AvctBrConnectInitiate() 102 cbConn->cbDev in AvctBrConnectInitiate() [all...] |
H A D | avctp_ctrl_l2cap.c | 121 AvctCbDev *cbDev = AvctGetCbDevByAddress(addr); in AvctRecvConnectionReqAct() local 122 if (cbDev == NULL) { in AvctRecvConnectionReqAct() 124 cbDev = AvctCbDevAlloc(addr); in AvctRecvConnectionReqAct() 125 if (cbDev == NULL) { in AvctRecvConnectionReqAct() 143 cbDev->cbCtrl = cbCtrl; in AvctRecvConnectionReqAct() 144 cbDev->chLink |= AVCT_ALLOC_CTRL; in AvctRecvConnectionReqAct() 196 AvctCbDev *cbDev = AvctGetCbDevByChId(lcid); in AvctRecvConnectionRspCBack() local 197 if (cbDev == NULL) { in AvctRecvConnectionRspCBack() 201 if (cbDev->cbCtrl->stState == AVCT_CH_CONN) { in AvctRecvConnectionRspCBack() 207 cbDev in AvctRecvConnectionRspCBack() 263 AvctCbDev *cbDev = AvctGetCbDevByChId(lcid); AvctRecvConfigReqCBack() local 336 AvctCbDev *cbDev = AvctGetCbDevByChId(lcid); AvctRecvConfigRspCBack() local 402 AvctCbDev *cbDev = AvctGetCbDevByChId(lcid); AvctRecvDisconnectionReqCBack() local 446 AvctCbDev *cbDev = AvctGetCbDevByChId(lcid); AvctRecvDisconnectionRspCBack() local 494 AvctCbDev *cbDev = AvctGetCbDevByChId(lcid); AvctDisconnectAbnormalCBack() local 550 AvctCbDev *cbDev = AvctGetCbDevByChId(lcid); AvctRecvDataCBack() local 596 AvctCbDev *cbDev = AvctGetCbDevByChId(lcid); AvctRemoteBusyCBack() local 652 AvctCbDev *cbDev = AvctGetCbDevByAddress(addr); AvctCtrlConnectResult() local [all...] |
H A D | avctp_ctrl.c | 24 typedef uint16_t (*AvctCtrlAction_t)(AvctCbDev *cbDev, const AvctEvtData *data); 58 uint16_t AvctCbCtrlEvt(AvctCbDev *cbDev, uint8_t event, const AvctEvtData *data) in AvctCbCtrlEvt() argument 60 LOG_DEBUG("[AVCT] %{public}s: EventID(%hhu),curState(%hhu)", __func__, event, cbDev->cbCtrl->stState); in AvctCbCtrlEvt() 62 AvctCbCh *cbCtrl = cbDev->cbCtrl; in AvctCbCtrlEvt() 71 ret = (*C_AVCT_CTRL_ACTION[action])(cbDev, data); in AvctCbCtrlEvt()
|
H A D | avctp_gap.c | 66 AvctCbDev *cbDev = ((AvctCbDev *)context); in AvctSecurityResult() local 72 AvctCbCtrlEvt(cbDev, AVCT_REV_DISCONN_EVT, &evtData); in AvctSecurityResult() 79 cbDev->chLink); in AvctSecurityResult() 81 if (cbDev->chLink & AVCT_ALLOC_CTRL) { in AvctSecurityResult() 82 cbCh = cbDev->cbCtrl; in AvctSecurityResult() 84 if (L2CIF_ConnectReq(&(cbDev->peerAddr), AVCT_PSM, AVCT_PSM, NULL, AvctCtrlL2CIFConnectReqCallback)) { in AvctSecurityResult() 92 if (cbDev->chLink & AVCT_ALLOC_BR) { in AvctSecurityResult() 93 cbCh = cbDev->cbBr; in AvctSecurityResult() 95 if (L2CIF_ConnectReq(&(cbDev->peerAddr), AVCT_BR_PSM, AVCT_BR_PSM, NULL, AvctBrwL2CIFConnectReqCallback)) { in AvctSecurityResult() 170 * Param[in] *cbDev Th 175 AvctRequestSecurity(const AvctCbDev *cbDev, GAP_Service serviceId, uint16_t psm) AvctRequestSecurity() argument [all...] |
H A D | avctp_api.c | 315 ((cbConn->status == AVCT_CONN_BIND) && (cbConn->cbDev->cbCtrl == NULL))) { in AvctSendMsgReq() 326 ret = AvctCbCtrlEvt(cbConn->cbDev, AVCT_SED_MSG_EVT, &evtData); in AvctSendMsgReq() 346 if ((cbConn != NULL) && (cbConn->status == AVCT_CONN_BIND) && (cbConn->cbDev->cbCtrl != NULL)) { in AVCT_GetPeerMtu() 347 peerMtu = cbConn->cbDev->cbCtrl->peerMtu; in AVCT_GetPeerMtu() 515 ((cbConn->status == AVCT_CONN_BIND) && (cbConn->cbDev->cbBr == NULL))) { in AvctBrSendMsgReq() 526 AvctCbBrEvt(cbConn->cbDev, AVCT_SED_MSG_EVT, &evtData); in AvctBrSendMsgReq() 545 if ((cbConn != NULL) && (cbConn->status == AVCT_CONN_BIND) && (cbConn->cbDev->cbBr != NULL)) { in AVCT_BrGetPeerMtu() 546 peerMtu = cbConn->cbDev->cbBr->peerMtu; in AVCT_BrGetPeerMtu() 564 AvctCbDev *cbDev = AvctGetCbDevByAddress(peerAddr); in AvctConnectInitiate() local 565 if (cbDev in AvctConnectInitiate() [all...] |
H A D | avctp_conn.c | 41 g_avctMng.cbConn[i].cbDev = NULL; in AvctCbConnAlloc() 62 cbConn->cbDev = NULL; in AvctCbConnDealloc() 108 * Param[in] *cbDev point to the device block. 112 AvctCbConn *AvctGetCbConnByPid(const AvctCbDev *cbDev, uint16_t pid) in AvctGetCbConnByPid() argument 117 if ((g_avctMng.cbConn[i].status == AVCT_CONN_BIND) && (g_avctMng.cbConn[i].cbDev == cbDev) && in AvctGetCbConnByPid()
|
H A D | avctp_int.h | 116 AvctCbDev *cbDev; /* The point to the device ControlBlock */ member 124 AvctCbDev cbDev[AVCT_MAX_DEVICES]; /* Device control blocks */ member
|
H A D | avctp_br.h | 22 extern uint16_t AvctCbBrEvt(AvctCbDev *cbDev, uint8_t event, const AvctEvtData *data);
|
H A D | avctp_dev.h | 24 extern void AvctCbDevDealloc(AvctCbDev *cbDev);
|
H A D | avctp_conn.h | 24 extern AvctCbConn *AvctGetCbConnByPid(const AvctCbDev *cbDev, uint16_t pid);
|
H A D | avctp_ctrl.h | 22 extern uint16_t AvctCbCtrlEvt(AvctCbDev *cbDev, uint8_t event, const AvctEvtData *data);
|
H A D | avctp_gap.h | 35 extern void AvctRequestSecurity(const AvctCbDev *cbDev, GAP_Service serviceId, uint16_t psm);
|
H A D | avctp.c | 101 AvctCbDevDealloc(&g_avctMng.cbDev[i]); in AvctShutdown()
|