Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
Messaging Server Equipment(MSE) OBEX Client

Messaging Server Equipment(MSE) OBEX Client. More...

Data Structures

struct  bt_map_mse_mns_cb
 MAP Server MNS callbacks. More...
struct  bt_map_mse_mns
 MAP Server MNS instance structure. More...

Functions

int bt_map_mse_mns_cb_register (struct bt_map_mse_mns *mse_mns, const struct bt_map_mse_mns_cb *cb)
 Register callbacks for MAP Server MNS.
int bt_map_mse_mns_rfcomm_connect (struct bt_conn *conn, struct bt_map_mse_mns *mse_mns, uint8_t channel)
 Connect MAP Server MNS over RFCOMM.
int bt_map_mse_mns_rfcomm_disconnect (struct bt_map_mse_mns *mse_mns)
 Disconnect MAP Server MNS over RFCOMM.
int bt_map_mse_mns_l2cap_connect (struct bt_conn *conn, struct bt_map_mse_mns *mse_mns, uint16_t psm)
 Connect MAP Server MNS over L2CAP.
int bt_map_mse_mns_l2cap_disconnect (struct bt_map_mse_mns *mse_mns)
 Disconnect MAP Server MNS over L2CAP.
struct net_bufbt_map_mse_mns_create_pdu (struct bt_map_mse_mns *mse_mns, struct net_buf_pool *pool)
 Create PDU for MAP Server MNS.
int bt_map_mse_mns_connect (struct bt_map_mse_mns *mse_mns, struct net_buf *buf)
 Send OBEX connect request.
int bt_map_mse_mns_disconnect (struct bt_map_mse_mns *mse_mns, struct net_buf *buf)
 Send OBEX disconnect request.
int bt_map_mse_mns_abort (struct bt_map_mse_mns *mse_mns, struct net_buf *buf)
 Send OBEX abort request.
int bt_map_mse_mns_send_event (struct bt_map_mse_mns *mse_mns, bool final, struct net_buf *buf)
 Send event notification request.

Detailed Description

Messaging Server Equipment(MSE) OBEX Client.

Function Documentation

◆ bt_map_mse_mns_abort()

int bt_map_mse_mns_abort ( struct bt_map_mse_mns * mse_mns,
struct net_buf * buf )

#include <zephyr/bluetooth/classic/map.h>

Send OBEX abort request.

Aborts the currently ongoing operation. Once OBEX abort response received, the abort callback bt_map_mse_mns_cb::abort will be called.

Parameters
mse_mnsMNS client instance.
bufBuffer containing abort headers (connection ID, etc.). If NULL, a default abort request is sent. If success returned, the function has taken the ownership of buf.
Returns
0 on success, negative error code on failure.

◆ bt_map_mse_mns_cb_register()

int bt_map_mse_mns_cb_register ( struct bt_map_mse_mns * mse_mns,
const struct bt_map_mse_mns_cb * cb )

#include <zephyr/bluetooth/classic/map.h>

Register callbacks for MAP Server MNS.

Registers callback functions to handle MNS events and responses. Must be called before initiating any MNS operations.

Parameters
mse_mnsMNS client instance.
cbPointer to callback structure (must remain valid).
Returns
0 on success, negative error code on failure.

◆ bt_map_mse_mns_connect()

int bt_map_mse_mns_connect ( struct bt_map_mse_mns * mse_mns,
struct net_buf * buf )

#include <zephyr/bluetooth/classic/map.h>

Send OBEX connect request.

Initiates OBEX session establishment with the MNS. Must be called after transport connection is established. Once OBEX connect response received, the connect callback bt_map_mse_mns_cb::connect will be called.

Parameters
mse_mnsMNS client instance.
bufBuffer containing connect headers (target UUID, etc.). If NULL, a default connect request is sent. If success returned, the function has taken the ownership of buf.
Returns
0 on success, negative error code on failure.

◆ bt_map_mse_mns_create_pdu()

struct net_buf * bt_map_mse_mns_create_pdu ( struct bt_map_mse_mns * mse_mns,
struct net_buf_pool * pool )

#include <zephyr/bluetooth/classic/map.h>

Create PDU for MAP Server MNS.

Allocates a buffer for building MAP request packets. The buffer is sized appropriately for the negotiated MTU.

Parameters
mse_mnsMNS client instance.
poolBuffer pool to allocate from (NULL for default pool).
Returns
Allocated buffer, or NULL on allocation failure.

◆ bt_map_mse_mns_disconnect()

int bt_map_mse_mns_disconnect ( struct bt_map_mse_mns * mse_mns,
struct net_buf * buf )

#include <zephyr/bluetooth/classic/map.h>

Send OBEX disconnect request.

Initiates OBEX session termination. Once OBEX disconnect response received, the disconnect callback bt_map_mse_mns_cb::disconnect will be called.

Parameters
mse_mnsMNS client instance.
bufBuffer containing disconnect headers (connection ID, etc.). If NULL, a default disconnect request is sent. If success returned, the function has taken the ownership of buf.
Returns
0 on success, negative error code on failure.

◆ bt_map_mse_mns_l2cap_connect()

int bt_map_mse_mns_l2cap_connect ( struct bt_conn * conn,
struct bt_map_mse_mns * mse_mns,
uint16_t psm )

#include <zephyr/bluetooth/classic/map.h>

Connect MAP Server MNS over L2CAP.

Initiates L2CAP transport connection to a remote MNS. On success, the l2cap_connected callback bt_map_mse_mns_cb::l2cap_connected will be called.

Parameters
connBluetooth connection to remote device.
mse_mnsMNS client instance.
psmL2CAP PSM (from SDP discovery).
Returns
0 on success, negative error code on failure.

◆ bt_map_mse_mns_l2cap_disconnect()

int bt_map_mse_mns_l2cap_disconnect ( struct bt_map_mse_mns * mse_mns)

#include <zephyr/bluetooth/classic/map.h>

Disconnect MAP Server MNS over L2CAP.

Closes the L2CAP transport connection. On success, the l2cap_disconnected callback bt_map_mse_mns_cb::l2cap_disconnected will be called.

Parameters
mse_mnsMNS client instance.
Returns
0 on success, negative error code on failure.

◆ bt_map_mse_mns_rfcomm_connect()

int bt_map_mse_mns_rfcomm_connect ( struct bt_conn * conn,
struct bt_map_mse_mns * mse_mns,
uint8_t channel )

#include <zephyr/bluetooth/classic/map.h>

Connect MAP Server MNS over RFCOMM.

Initiates RFCOMM transport connection to a remote MNS. On success, the rfcomm_connected callback bt_map_mse_mns_cb::rfcomm_connected will be called.

Parameters
connBluetooth connection to remote device.
mse_mnsMNS client instance.
channelRFCOMM server channel (from SDP discovery).
Returns
0 on success, negative error code on failure.

◆ bt_map_mse_mns_rfcomm_disconnect()

int bt_map_mse_mns_rfcomm_disconnect ( struct bt_map_mse_mns * mse_mns)

#include <zephyr/bluetooth/classic/map.h>

Disconnect MAP Server MNS over RFCOMM.

Closes the RFCOMM transport connection. On success, the rfcomm_disconnected callback bt_map_mse_mns_cb::rfcomm_disconnected will be called.

Parameters
mse_mnsMNS client instance.
Returns
0 on success, negative error code on failure.

◆ bt_map_mse_mns_send_event()

int bt_map_mse_mns_send_event ( struct bt_map_mse_mns * mse_mns,
bool final,
struct net_buf * buf )

#include <zephyr/bluetooth/classic/map.h>

Send event notification request.

Sends an event notification to the remote MCE. May be called multiple times to send fragmented event data. Once send_event response received, the send_event callback bt_map_mse_mns_cb::send_event will be called (possibly multiple times).

Parameters
mse_mnsMNS client instance.
finalTrue if this is the last packet, false if more data follows.
bufBuffer containing event report XML data and headers. Must include connection ID, type header, and application parameters for initial request. Must include end-of-body header when final is true. If success returned, the function has taken the ownership of buf.
Returns
0 on success, negative error code on failure.