1 /* 2 * Copyright (C) 2021 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 #ifndef AVCTP_CTRL_ACT_H 16 #define AVCTP_CTRL_ACT_H 17 #include "avctp_int.h" 18 #ifdef __cplusplus 19 extern "C" { 20 #endif 21 22 #define PKG_TYPE_MASK 3 23 #define MOVE_8BIT 8 24 #define MOVE_4BIT 4 25 #define MOVE_2BIT 2 26 #define MOVE_1BIT 1 27 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, const AvctEvtData *data); 38 extern uint16_t AvctCbCtrlChBusyInd(AvctCbDev *cbDev, const AvctEvtData *data); 39 extern uint16_t AvctCbCtrlDiscardMsg(AvctCbDev *cbDev, const AvctEvtData *data); 40 extern uint16_t AvctCbCtrlSendMsg(AvctCbDev *cbDev, const AvctEvtData *data); 41 extern uint16_t AvctCbCtrlRevMsg(AvctCbDev *cbDev, const AvctEvtData *data); 42 extern uint16_t AvctCbCtrlDiscardRevMsg(AvctCbDev *cbDev, const AvctEvtData *data); 43 44 /* Frag/asmbl msg data IF */ 45 uint16_t AvctSendSignleMsg(const AvctCbCh *cbCh, const AvctTxMsg txMsg); 46 uint16_t AvctSendFraMsg(const AvctCbCh *cbCh, const AvctTxMsg txMsg); 47 extern Packet *AvctMsgAsmbl(AvctCbCh *cbCh, Packet *pkt); 48 49 extern void AvctPktDataPrint(const Packet *pkt); 50 51 #ifdef __cplusplus 52 } 53 #endif 54 #endif /* AVCTP_CTRL_ACT_H */