/* * SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 *//* ... */#pragmaonce#include"common/bt_target.h"#include"stack/obex_api.h"#include"obex_tl.h"#include"obex_tl_l2cap.h"#if(OBEX_INCLUDED==TRUE)#defineOBEX_BT_HDR_MIN_OFFSETOBEX_TL_L2CAP_BT_HDR_MIN_OFFSET/* should set to max value of all transport layer */#defineOBEX_ROLE_CLIENT0x01#defineOBEX_ROLE_SERVER0x02/* OBEX connection state */#defineOBEX_STATE_IDLE0/* No connection */#defineOBEX_STATE_OPENING1/* Starting to open a connection */#defineOBEX_STATE_OPENED2/* Connection opened */6 defines/* OBEX Connection Control block */typedefstruct{tOBEX_MSG_CBACK*callback;/* Connection msg callback function */UINT16tl_hdl;/* Transport layer non-zeros connection handle*/UINT16tl_peer_mtu;/* Transport layer peer mtu */UINT16tl_our_mtu;/* Transport layer our mtu */UINT8tl_cong;/* 1 if transport layer congestion, otherwise 0 */UINT8tl;/* OBEX_OVER_L2CAP or OBEX_OVER_RFCOMM */UINT8allocated;/* 0, not allocated. index+1, otherwise. equal to api handle */UINT8state;/* This OBEX connection state */UINT8role;/* This OBEX connection role */}{...}tOBEX_CCB;/* OBEX Server Control block */typedefstruct{tOBEX_MSG_CBACK*callback;/* Connection msg callback function */UINT16tl_hdl;/* Transport layer non-zeros server handle*/UINT8tl;/* OBEX_OVER_L2CAP or OBEX_OVER_RFCOMM */UINT8allocated;/* 0, not allocated. index+1, otherwise. */}{...}tOBEX_SCB;/* OBEX Control block */typedefstruct{tOBEX_CCBccb[OBEX_MAX_CONNECTION];/* connection control blocks */tOBEX_SCBscb[OBEX_MAX_SERVER];/* server control blocks */tOBEX_TL_OPS*tl_ops[OBEX_NUM_TL];/* transport operation function pointer */UINT8trace_level;/* trace level */}{...}tOBEX_CB;#ifOBEX_DYNAMIC_MEMORY==FALSEexterntOBEX_CBobex_cb;#elseexterntOBEX_CB*obex_cb_ptr;#defineobex_cb(*obex_cb_ptr)/* ... */#endifvoidobex_tl_l2cap_callback(tOBEX_TL_EVTevt,tOBEX_TL_MSG*msg);tOBEX_CCB*obex_allocate_ccb(void);tOBEX_SCB*obex_allocate_scb(void);voidobex_free_ccb(tOBEX_CCB*p_ccb);voidobex_free_scb(tOBEX_SCB*p_scb);/* ... */#endif/* #if (OBEX_INCLUDED == TRUE) */
Details
Show: from
Types: Columns:
All items filtered out
All items filtered out
This file uses the notable symbols shown below. Click anywhere in the file to view more details.