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

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

Data Structures

struct  bt_map_mse_mas_rfcomm_server
 MAP Server MAS RFCOMM server. More...
struct  bt_map_mse_mas_l2cap_server
 MAP Server MAS L2CAP server. More...
struct  bt_map_mse_mas_cb
 MAP Server MAS callbacks. More...
struct  bt_map_mse_mas
 MAP Server MAS instance structure. More...

Functions

int bt_map_mse_mas_cb_register (struct bt_map_mse_mas *mse_mas, const struct bt_map_mse_mas_cb *cb)
 Register callbacks for MAP Server MAS.
int bt_map_mse_mas_rfcomm_register (struct bt_map_mse_mas_rfcomm_server *server)
 Register MAP Server MAS RFCOMM server.
int bt_map_mse_mas_rfcomm_disconnect (struct bt_map_mse_mas *mse_mas)
 Disconnect MAP Server MAS over RFCOMM.
int bt_map_mse_mas_l2cap_register (struct bt_map_mse_mas_l2cap_server *server)
 Register MAP Server MAS L2CAP server.
int bt_map_mse_mas_l2cap_disconnect (struct bt_map_mse_mas *mse_mas)
 Disconnect MAP Server MAS over L2CAP.
struct net_bufbt_map_mse_mas_create_pdu (struct bt_map_mse_mas *mse_mas, struct net_buf_pool *pool)
 Create PDU for MAP Server MAS.
int bt_map_mse_mas_connect (struct bt_map_mse_mas *mse_mas, uint8_t rsp_code, struct net_buf *buf)
 Send OBEX connect response.
int bt_map_mse_mas_disconnect (struct bt_map_mse_mas *mse_mas, uint8_t rsp_code, struct net_buf *buf)
 Send OBEX disconnect response.
int bt_map_mse_mas_abort (struct bt_map_mse_mas *mse_mas, uint8_t rsp_code, struct net_buf *buf)
 Send OBEX abort response.
int bt_map_mse_mas_set_folder (struct bt_map_mse_mas *mse_mas, uint8_t rsp_code, struct net_buf *buf)
 Send set folder response.
int bt_map_mse_mas_set_ntf_reg (struct bt_map_mse_mas *mse_mas, uint8_t rsp_code, struct net_buf *buf)
 Send set notification registration response.
int bt_map_mse_mas_get_folder_listing (struct bt_map_mse_mas *mse_mas, uint8_t rsp_code, struct net_buf *buf)
 Send get folder listing response.
int bt_map_mse_mas_get_msg_listing (struct bt_map_mse_mas *mse_mas, uint8_t rsp_code, struct net_buf *buf)
 Send get message listing response.
int bt_map_mse_mas_get_msg (struct bt_map_mse_mas *mse_mas, uint8_t rsp_code, struct net_buf *buf)
 Send get message response.
int bt_map_mse_mas_set_msg_status (struct bt_map_mse_mas *mse_mas, uint8_t rsp_code, struct net_buf *buf)
 Send set message status response.
int bt_map_mse_mas_push_msg (struct bt_map_mse_mas *mse_mas, uint8_t rsp_code, struct net_buf *buf)
 Send push message response.
int bt_map_mse_mas_update_inbox (struct bt_map_mse_mas *mse_mas, uint8_t rsp_code, struct net_buf *buf)
 Send update inbox response.
int bt_map_mse_mas_get_mas_inst_info (struct bt_map_mse_mas *mse_mas, uint8_t rsp_code, struct net_buf *buf)
 Send get MAS instance info response.
int bt_map_mse_mas_set_owner_status (struct bt_map_mse_mas *mse_mas, uint8_t rsp_code, struct net_buf *buf)
 Send set owner status response.
int bt_map_mse_mas_get_owner_status (struct bt_map_mse_mas *mse_mas, uint8_t rsp_code, struct net_buf *buf)
 Send get owner status response.
int bt_map_mse_mas_get_convo_listing (struct bt_map_mse_mas *mse_mas, uint8_t rsp_code, struct net_buf *buf)
 Send get conversation listing response.
int bt_map_mse_mas_set_ntf_filter (struct bt_map_mse_mas *mse_mas, uint8_t rsp_code, struct net_buf *buf)
 Send set notification filter response.

Detailed Description

Messaging Server Equipment(MSE) OBEX Server.

Function Documentation

◆ bt_map_mse_mas_abort()

int bt_map_mse_mas_abort ( struct bt_map_mse_mas * mse_mas,
uint8_t rsp_code,
struct net_buf * buf )

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

Send OBEX abort response.

Responds to an OBEX ABORT request from the remote MCE. Called from the abort callback bt_map_mse_mas_cb::abort.

Parameters
mse_masMAS server instance.
rsp_codeResponse code bt_obex_rsp_code (BT_OBEX_RSP_CODE_SUCCESS to accept).
bufBuffer containing response headers. If NULL, a default response 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_mas_cb_register()

int bt_map_mse_mas_cb_register ( struct bt_map_mse_mas * mse_mas,
const struct bt_map_mse_mas_cb * cb )

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

Register callbacks for MAP Server MAS.

Registers callback functions to handle MAS events and requests. Must be called before accepting any MAS connections.

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

◆ bt_map_mse_mas_connect()

int bt_map_mse_mas_connect ( struct bt_map_mse_mas * mse_mas,
uint8_t rsp_code,
struct net_buf * buf )

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

Send OBEX connect response.

Responds to an OBEX CONNECT request from the remote MCE. Called from the connect callback bt_map_mse_mas_cb::connect.

Parameters
mse_masMAS server instance.
rsp_codeResponse code bt_obex_rsp_code (BT_OBEX_RSP_CODE_SUCCESS to accept).
bufBuffer containing response headers (WHO, connection ID, etc.). If NULL, a default response 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_mas_create_pdu()

struct net_buf * bt_map_mse_mas_create_pdu ( struct bt_map_mse_mas * mse_mas,
struct net_buf_pool * pool )

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

Create PDU for MAP Server MAS.

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

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

◆ bt_map_mse_mas_disconnect()

int bt_map_mse_mas_disconnect ( struct bt_map_mse_mas * mse_mas,
uint8_t rsp_code,
struct net_buf * buf )

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

Send OBEX disconnect response.

Responds to an OBEX DISCONNECT request from the remote MCE. Called from the disconnect callback bt_map_mse_mas_cb::disconnect.

Parameters
mse_masMAS server instance.
rsp_codeResponse code bt_obex_rsp_code (BT_OBEX_RSP_CODE_SUCCESS to accept).
bufBuffer containing response headers. If success returned, the function has taken the ownership of buf.
Returns
0 on success, negative error code on failure.

◆ bt_map_mse_mas_get_convo_listing()

int bt_map_mse_mas_get_convo_listing ( struct bt_map_mse_mas * mse_mas,
uint8_t rsp_code,
struct net_buf * buf )

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

Send get conversation listing response.

Responds to a GetConversationListing request from the remote MCE. May be called multiple times to send fragmented response. Called from the get_convo_listing callback bt_map_mse_mas_cb::get_convo_listing.

Parameters
mse_masMAS server instance.
rsp_codeResponse code bt_obex_rsp_code (BT_OBEX_RSP_CODE_CONTINUE for partial, BT_OBEX_RSP_CODE_SUCCESS for complete).
bufBuffer containing conversation listing XML data and headers. If success returned, the function has taken the ownership of buf.
Returns
0 on success, negative error code on failure.

◆ bt_map_mse_mas_get_folder_listing()

int bt_map_mse_mas_get_folder_listing ( struct bt_map_mse_mas * mse_mas,
uint8_t rsp_code,
struct net_buf * buf )

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

Send get folder listing response.

Responds to a GetFolderListing request from the remote MCE. May be called multiple times to send fragmented response. Called from the get_folder_listing callback bt_map_mse_mas_cb::get_folder_listing.

Parameters
mse_masMAS server instance.
rsp_codeResponse code bt_obex_rsp_code (BT_OBEX_RSP_CODE_CONTINUE for partial, BT_OBEX_RSP_CODE_SUCCESS for complete).
bufBuffer containing folder listing XML data and headers. If success returned, the function has taken the ownership of buf.
Returns
0 on success, negative error code on failure.

◆ bt_map_mse_mas_get_mas_inst_info()

int bt_map_mse_mas_get_mas_inst_info ( struct bt_map_mse_mas * mse_mas,
uint8_t rsp_code,
struct net_buf * buf )

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

Send get MAS instance info response.

Responds to a GetMASInstanceInformation request from the remote MCE. May be called multiple times to send fragmented response. Called from the get_mas_inst_info callback bt_map_mse_mas_cb::get_mas_inst_info.

Parameters
mse_masMAS server instance.
rsp_codeResponse code bt_obex_rsp_code (BT_OBEX_RSP_CODE_CONTINUE for partial, BT_OBEX_RSP_CODE_SUCCESS for complete).
bufBuffer containing instance information XML data and headers. If success returned, the function has taken the ownership of buf.
Returns
0 on success, negative error code on failure.

◆ bt_map_mse_mas_get_msg()

int bt_map_mse_mas_get_msg ( struct bt_map_mse_mas * mse_mas,
uint8_t rsp_code,
struct net_buf * buf )

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

Send get message response.

Responds to a GetMessage request from the remote MCE. May be called multiple times to send fragmented response. Called from the get_msg callback bt_map_mse_mas_cb::get_msg.

Parameters
mse_masMAS server instance.
rsp_codeResponse code bt_obex_rsp_code (BT_OBEX_RSP_CODE_CONTINUE for partial, BT_OBEX_RSP_CODE_SUCCESS for complete).
bufBuffer containing message bMessage data and headers. If success returned, the function has taken the ownership of buf.
Returns
0 on success, negative error code on failure.

◆ bt_map_mse_mas_get_msg_listing()

int bt_map_mse_mas_get_msg_listing ( struct bt_map_mse_mas * mse_mas,
uint8_t rsp_code,
struct net_buf * buf )

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

Send get message listing response.

Responds to a GetMessageListing request from the remote MCE. May be called multiple times to send fragmented response. Called from the get_msg_listing callback bt_map_mse_mas_cb::get_msg_listing.

Parameters
mse_masMAS server instance.
rsp_codeResponse code bt_obex_rsp_code (BT_OBEX_RSP_CODE_CONTINUE for partial, BT_OBEX_RSP_CODE_SUCCESS for complete).
bufBuffer containing message listing XML data and headers. If success returned, the function has taken the ownership of buf.
Returns
0 on success, negative error code on failure.

◆ bt_map_mse_mas_get_owner_status()

int bt_map_mse_mas_get_owner_status ( struct bt_map_mse_mas * mse_mas,
uint8_t rsp_code,
struct net_buf * buf )

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

Send get owner status response.

Responds to a GetOwnerStatus request from the remote MCE. May be called multiple times to send fragmented response. Called from the get_owner_status callback bt_map_mse_mas_cb::get_owner_status.

Parameters
mse_masMAS server instance.
rsp_codeResponse code bt_obex_rsp_code (BT_OBEX_RSP_CODE_CONTINUE for partial, BT_OBEX_RSP_CODE_SUCCESS for complete).
bufBuffer containing owner status data and headers. If success returned, the function has taken the ownership of buf.
Returns
0 on success, negative error code on failure.

◆ bt_map_mse_mas_l2cap_disconnect()

int bt_map_mse_mas_l2cap_disconnect ( struct bt_map_mse_mas * mse_mas)

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

Disconnect MAP Server MAS over L2CAP.

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

Parameters
mse_masMAS server instance.
Returns
0 on success, negative error code on failure.

◆ bt_map_mse_mas_l2cap_register()

int bt_map_mse_mas_l2cap_register ( struct bt_map_mse_mas_l2cap_server * server)

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

Register MAP Server MAS L2CAP server.

Registers an L2CAP server to accept incoming MAS connections. The PSM is allocated automatically or can be specified.

Parameters
serverL2CAP server structure with accept callback configured.
Returns
0 on success, negative error code on failure.

◆ bt_map_mse_mas_push_msg()

int bt_map_mse_mas_push_msg ( struct bt_map_mse_mas * mse_mas,
uint8_t rsp_code,
struct net_buf * buf )

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

Send push message response.

Responds to a PushMessage request from the remote MCE. May be called multiple times if request is fragmented. Called from the push_msg callback bt_map_mse_mas_cb::push_msg.

Parameters
mse_masMAS server instance.
rsp_codeResponse code bt_obex_rsp_code (BT_OBEX_RSP_CODE_CONTINUE for partial, BT_OBEX_RSP_CODE_SUCCESS for complete).
bufBuffer containing message handle (on success) and headers. If success returned, the function has taken the ownership of buf.
Returns
0 on success, negative error code on failure.

◆ bt_map_mse_mas_rfcomm_disconnect()

int bt_map_mse_mas_rfcomm_disconnect ( struct bt_map_mse_mas * mse_mas)

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

Disconnect MAP Server MAS over RFCOMM.

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

Parameters
mse_masMAS server instance.
Returns
0 on success, negative error code on failure.

◆ bt_map_mse_mas_rfcomm_register()

int bt_map_mse_mas_rfcomm_register ( struct bt_map_mse_mas_rfcomm_server * server)

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

Register MAP Server MAS RFCOMM server.

Registers an RFCOMM server to accept incoming MAS connections. The server channel is allocated automatically or can be specified.

Parameters
serverRFCOMM server structure with accept callback configured.
Returns
0 on success, negative error code on failure.

◆ bt_map_mse_mas_set_folder()

int bt_map_mse_mas_set_folder ( struct bt_map_mse_mas * mse_mas,
uint8_t rsp_code,
struct net_buf * buf )

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

Send set folder response.

Responds to a SetPath request from the remote MCE. Called from the set_folder callback bt_map_mse_mas_cb::set_folder.

Parameters
mse_masMAS server instance.
rsp_codeResponse code bt_obex_rsp_code (BT_OBEX_RSP_CODE_SUCCESS on success).
bufBuffer containing response headers. If NULL, a default response 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_mas_set_msg_status()

int bt_map_mse_mas_set_msg_status ( struct bt_map_mse_mas * mse_mas,
uint8_t rsp_code,
struct net_buf * buf )

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

Send set message status response.

Responds to a SetMessageStatus request from the remote MCE. Called from the set_msg_status callback bt_map_mse_mas_cb::set_msg_status.

Parameters
mse_masMAS server instance.
rsp_codeResponse code bt_obex_rsp_code (BT_OBEX_RSP_CODE_SUCCESS on success).
bufBuffer containing response headers. If NULL, a default response 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_mas_set_ntf_filter()

int bt_map_mse_mas_set_ntf_filter ( struct bt_map_mse_mas * mse_mas,
uint8_t rsp_code,
struct net_buf * buf )

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

Send set notification filter response.

Responds to a SetNotificationFilter request from the remote MCE. Called from the set_ntf_filter callback bt_map_mse_mas_cb::set_ntf_filter.

Parameters
mse_masMAS server instance.
rsp_codeResponse code bt_obex_rsp_code (BT_OBEX_RSP_CODE_SUCCESS on success).
bufBuffer containing response headers. If NULL, a default response 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_mas_set_ntf_reg()

int bt_map_mse_mas_set_ntf_reg ( struct bt_map_mse_mas * mse_mas,
uint8_t rsp_code,
struct net_buf * buf )

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

Send set notification registration response.

Responds to a SetNotificationRegistration request from the remote MCE. Called from the set_ntf_reg callback bt_map_mse_mas_cb::set_ntf_reg.

Parameters
mse_masMAS server instance.
rsp_codeResponse code bt_obex_rsp_code (BT_OBEX_RSP_CODE_SUCCESS on success).
bufBuffer containing response headers. If NULL, a default response 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_mas_set_owner_status()

int bt_map_mse_mas_set_owner_status ( struct bt_map_mse_mas * mse_mas,
uint8_t rsp_code,
struct net_buf * buf )

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

Send set owner status response.

Responds to a SetOwnerStatus request from the remote MCE. Called from the set_owner_status callback bt_map_mse_mas_cb::set_owner_status.

Parameters
mse_masMAS server instance.
rsp_codeResponse code bt_obex_rsp_code (BT_OBEX_RSP_CODE_SUCCESS on success).
bufBuffer containing response headers. If NULL, a default response 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_mas_update_inbox()

int bt_map_mse_mas_update_inbox ( struct bt_map_mse_mas * mse_mas,
uint8_t rsp_code,
struct net_buf * buf )

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

Send update inbox response.

Responds to an UpdateInbox request from the remote MCE. Called from the update_inbox callback bt_map_mse_mas_cb::update_inbox.

Parameters
mse_masMAS server instance.
rsp_codeResponse code bt_obex_rsp_code (BT_OBEX_RSP_CODE_SUCCESS on success).
bufBuffer containing response headers. If NULL, a default response is sent. If success returned, the function has taken the ownership of buf.
Returns
0 on success, negative error code on failure.