Zephyr Project API 4.2.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
bt_obex_transport_ops Struct Reference

OBEX transport operations structure. More...

#include <obex.h>

Data Fields

struct net_buf *(* alloc_buf )(struct bt_obex *obex, struct net_buf_pool *pool)
 allocate buf callback
 
int(* send )(struct bt_obex *obex, struct net_buf *buf)
 Send OBEX data via transport.
 
int(* disconnect )(struct bt_obex *obex)
 Disconnect from transport.
 

Detailed Description

OBEX transport operations structure.

The object has to stay valid and constant for the lifetime of the OBEX client/server.

Field Documentation

◆ alloc_buf

struct net_buf *(* bt_obex_transport_ops::alloc_buf) (struct bt_obex *obex, struct net_buf_pool *pool)

allocate buf callback

If this callback is provided it will be called to allocate a net buffer to store the outgoing data.

Parameters
obexThe OBEX object.
poolWhich pool to take the buffer from.
Returns
Allocated buffer.

◆ disconnect

int(* bt_obex_transport_ops::disconnect) (struct bt_obex *obex)

Disconnect from transport.

If this callback is provided it will be called to disconnect transport.

Parameters
obexThe OBEX object.
Returns
0 in case of success or negative value in case of error.

◆ send

int(* bt_obex_transport_ops::send) (struct bt_obex *obex, struct net_buf *buf)

Send OBEX data via transport.

If this callback is provided it will be called to send data via OBEX transport.

Parameters
obexThe OBEX object.
bufOBEX packet.
Returns
0 in case of success or negative value in case of error.
-EMSGSIZE if buf is larger than obex's MOPL.

The documentation for this struct was generated from the following file: