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

Messaging Client Equipment(MCE) OBEX Client. More...

Data Structures

struct  bt_map_mce_mas_cb
 MAP Client MAS callbacks. More...
struct  bt_map_mce_mas
 MAP Client MAS instance structure. More...

Functions

int bt_map_mce_mas_cb_register (struct bt_map_mce_mas *mce_mas, const struct bt_map_mce_mas_cb *cb)
 Register callbacks for MAP Client MAS.
int bt_map_mce_mas_rfcomm_connect (struct bt_conn *conn, struct bt_map_mce_mas *mce_mas, uint8_t channel)
 Connect MAP Client MAS over RFCOMM.
int bt_map_mce_mas_rfcomm_disconnect (struct bt_map_mce_mas *mce_mas)
 Disconnect MAP Client MAS over RFCOMM.
int bt_map_mce_mas_l2cap_connect (struct bt_conn *conn, struct bt_map_mce_mas *mce_mas, uint16_t psm)
 Connect MAP Client MAS over L2CAP.
int bt_map_mce_mas_l2cap_disconnect (struct bt_map_mce_mas *mce_mas)
 Disconnect MAP Client MAS over L2CAP.
struct net_bufbt_map_mce_mas_create_pdu (struct bt_map_mce_mas *mce_mas, struct net_buf_pool *pool)
 Create PDU for MAP Client MAS.
int bt_map_mce_mas_connect (struct bt_map_mce_mas *mce_mas, struct net_buf *buf)
 Send OBEX connect request.
int bt_map_mce_mas_disconnect (struct bt_map_mce_mas *mce_mas, struct net_buf *buf)
 Send OBEX disconnect request.
int bt_map_mce_mas_abort (struct bt_map_mce_mas *mce_mas, struct net_buf *buf)
 Send OBEX abort request.
int bt_map_mce_mas_set_folder (struct bt_map_mce_mas *mce_mas, uint8_t flags, struct net_buf *buf)
 Send set folder request.
int bt_map_mce_mas_set_ntf_reg (struct bt_map_mce_mas *mce_mas, bool final, struct net_buf *buf)
 Send set notification registration request.
int bt_map_mce_mas_get_folder_listing (struct bt_map_mce_mas *mce_mas, bool final, struct net_buf *buf)
 Send get folder listing request.
int bt_map_mce_mas_get_msg_listing (struct bt_map_mce_mas *mce_mas, bool final, struct net_buf *buf)
 Send get message listing request.
int bt_map_mce_mas_get_msg (struct bt_map_mce_mas *mce_mas, bool final, struct net_buf *buf)
 Send get message request.
int bt_map_mce_mas_set_msg_status (struct bt_map_mce_mas *mce_mas, bool final, struct net_buf *buf)
 Send set message status request.
int bt_map_mce_mas_push_msg (struct bt_map_mce_mas *mce_mas, bool final, struct net_buf *buf)
 Send push message request.
int bt_map_mce_mas_update_inbox (struct bt_map_mce_mas *mce_mas, bool final, struct net_buf *buf)
 Send update inbox request.
int bt_map_mce_mas_get_mas_inst_info (struct bt_map_mce_mas *mce_mas, bool final, struct net_buf *buf)
 Send get MAS instance info request.
int bt_map_mce_mas_set_owner_status (struct bt_map_mce_mas *mce_mas, bool final, struct net_buf *buf)
 Send set owner status request.
int bt_map_mce_mas_get_owner_status (struct bt_map_mce_mas *mce_mas, bool final, struct net_buf *buf)
 Send get owner status request.
int bt_map_mce_mas_get_convo_listing (struct bt_map_mce_mas *mce_mas, bool final, struct net_buf *buf)
 Send get conversation listing request.
int bt_map_mce_mas_set_ntf_filter (struct bt_map_mce_mas *mce_mas, bool final, struct net_buf *buf)
 Send set notification filter request.

Detailed Description

Messaging Client Equipment(MCE) OBEX Client.

Function Documentation

◆ bt_map_mce_mas_abort()

int bt_map_mce_mas_abort ( struct bt_map_mce_mas * mce_mas,
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_mce_mas_cb::abort will be called.

Parameters
mce_masMAS 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_mce_mas_cb_register()

int bt_map_mce_mas_cb_register ( struct bt_map_mce_mas * mce_mas,
const struct bt_map_mce_mas_cb * cb )

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

Register callbacks for MAP Client MAS.

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

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

◆ bt_map_mce_mas_connect()

int bt_map_mce_mas_connect ( struct bt_map_mce_mas * mce_mas,
struct net_buf * buf )

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

Send OBEX connect request.

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

Parameters
mce_masMAS client instance.
bufBuffer containing connect headers (target UUID, supported features, 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_mce_mas_create_pdu()

struct net_buf * bt_map_mce_mas_create_pdu ( struct bt_map_mce_mas * mce_mas,
struct net_buf_pool * pool )

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

Create PDU for MAP Client MAS.

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

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

◆ bt_map_mce_mas_disconnect()

int bt_map_mce_mas_disconnect ( struct bt_map_mce_mas * mce_mas,
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_mce_mas_cb::disconnect will be called.

Parameters
mce_masMAS 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_mce_mas_get_convo_listing()

int bt_map_mce_mas_get_convo_listing ( struct bt_map_mce_mas * mce_mas,
bool final,
struct net_buf * buf )

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

Send get conversation listing request.

Retrieves list of conversations. Once get_convo_listing response received, the get_convo_listing callback bt_map_mce_mas_cb::get_convo_listing will be called (possibly multiple times).

Parameters
mce_masMAS client instance.
finalTrue if this is the final packet, false if more data follows.
bufBuffer containing filter parameters and headers. Must include connection ID and type header for initial request. If success returned, the function has taken the ownership of buf.
Returns
0 on success, negative error code on failure.

◆ bt_map_mce_mas_get_folder_listing()

int bt_map_mce_mas_get_folder_listing ( struct bt_map_mce_mas * mce_mas,
bool final,
struct net_buf * buf )

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

Send get folder listing request.

Retrieves list of subfolders in the current folder. Once get_folder_listing response received, the get_folder_listing callback bt_map_mce_mas_cb::get_folder_listing will be called (possibly multiple times).

Parameters
mce_masMAS client instance.
finalTrue if this is the final packet, false if more data follows.
bufBuffer containing filter parameters and headers. Must include connection ID and type header for initial request. If success returned, the function has taken the ownership of buf.
Returns
0 on success, negative error code on failure.

◆ bt_map_mce_mas_get_mas_inst_info()

int bt_map_mce_mas_get_mas_inst_info ( struct bt_map_mce_mas * mce_mas,
bool final,
struct net_buf * buf )

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

Send get MAS instance info request.

Retrieves information about the MAS instance. Once get_mas_inst_info response received, the get_mas_inst_info callback bt_map_mce_mas_cb::get_mas_inst_info will be called (possibly multiple times).

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

◆ bt_map_mce_mas_get_msg()

int bt_map_mce_mas_get_msg ( struct bt_map_mce_mas * mce_mas,
bool final,
struct net_buf * buf )

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

Send get message request.

Retrieves a specific message by handle. Once get_msg response received, the get_msg callback bt_map_mce_mas_cb::get_msg will be called (possibly multiple times).

Parameters
mce_masMAS client instance.
finalTrue if this is the final packet, false if more data follows.
bufBuffer containing message handle, parameters, and headers. Must include connection ID, type header, and name header for initial request. If success returned, the function has taken the ownership of buf.
Returns
0 on success, negative error code on failure.

◆ bt_map_mce_mas_get_msg_listing()

int bt_map_mce_mas_get_msg_listing ( struct bt_map_mce_mas * mce_mas,
bool final,
struct net_buf * buf )

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

Send get message listing request.

Retrieves list of messages in the current folder. Once get_msg_listing response received, the get_msg_listing callback bt_map_mce_mas_cb::get_msg_listing will be called (possibly multiple times).

Parameters
mce_masMAS client instance.
finalTrue if this is the final packet, false if more data follows.
bufBuffer containing folder name, filter parameters, and headers. Must include connection ID, type header, and name header for initial request. If success returned, the function has taken the ownership of buf.
Returns
0 on success, negative error code on failure.

◆ bt_map_mce_mas_get_owner_status()

int bt_map_mce_mas_get_owner_status ( struct bt_map_mce_mas * mce_mas,
bool final,
struct net_buf * buf )

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

Send get owner status request.

Retrieves the owner's presence and chat state. Once get_owner_status response received, the get_owner_status callback bt_map_mce_mas_cb::get_owner_status will be called (possibly multiple times).

Parameters
mce_masMAS client instance.
finalTrue if this is the final packet, false if more data follows.
bufBuffer containing headers. Must include connection ID and type header for initial request. If success returned, the function has taken the ownership of buf.
Returns
0 on success, negative error code on failure.

◆ bt_map_mce_mas_l2cap_connect()

int bt_map_mce_mas_l2cap_connect ( struct bt_conn * conn,
struct bt_map_mce_mas * mce_mas,
uint16_t psm )

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

Connect MAP Client MAS over L2CAP.

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

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

◆ bt_map_mce_mas_l2cap_disconnect()

int bt_map_mce_mas_l2cap_disconnect ( struct bt_map_mce_mas * mce_mas)

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

Disconnect MAP Client MAS over L2CAP.

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

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

◆ bt_map_mce_mas_push_msg()

int bt_map_mce_mas_push_msg ( struct bt_map_mce_mas * mce_mas,
bool final,
struct net_buf * buf )

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

Send push message request.

Uploads a new message to the server. Once push_msg response received, the push_msg callback bt_map_mce_mas_cb::push_msg will be called (possibly multiple times).

Parameters
mce_masMAS client instance.
finalTrue if this is the last packet, false if more data follows.
bufBuffer containing message data (bMessage format) and headers. Must include connection ID, type header, name 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.

◆ bt_map_mce_mas_rfcomm_connect()

int bt_map_mce_mas_rfcomm_connect ( struct bt_conn * conn,
struct bt_map_mce_mas * mce_mas,
uint8_t channel )

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

Connect MAP Client MAS over RFCOMM.

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

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

◆ bt_map_mce_mas_rfcomm_disconnect()

int bt_map_mce_mas_rfcomm_disconnect ( struct bt_map_mce_mas * mce_mas)

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

Disconnect MAP Client MAS over RFCOMM.

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

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

◆ bt_map_mce_mas_set_folder()

int bt_map_mce_mas_set_folder ( struct bt_map_mce_mas * mce_mas,
uint8_t flags,
struct net_buf * buf )

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

Send set folder request.

Navigates the folder hierarchy on the MAS. Once set_folder response received, the set_folder callback bt_map_mce_mas_cb::set_folder will be called.

Parameters
mce_masMAS client instance.
flagsNavigation flags (see bt_map_set_folder_flags).
bufBuffer containing folder name (for DOWN) and headers. Must include connection ID. If success returned, the function has taken the ownership of buf.
Returns
0 on success, negative error code on failure.

◆ bt_map_mce_mas_set_msg_status()

int bt_map_mce_mas_set_msg_status ( struct bt_map_mce_mas * mce_mas,
bool final,
struct net_buf * buf )

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

Send set message status request.

Modifies the status of a message (read/deleted/etc). Once set_msg_status response received, the set_msg_status callback bt_map_mce_mas_cb::set_msg_status will be called.

Parameters
mce_masMAS client instance.
finalTrue if this is the final packet, false if more data follows.
bufBuffer containing message handle, status parameters, and headers. Must include connection ID, type header, name header, and application parameters. If success returned, the function has taken the ownership of buf.
Returns
0 on success, negative error code on failure.

◆ bt_map_mce_mas_set_ntf_filter()

int bt_map_mce_mas_set_ntf_filter ( struct bt_map_mce_mas * mce_mas,
bool final,
struct net_buf * buf )

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

Send set notification filter request.

Configures which event types to receive notifications for. Once set_ntf_filter response received, the set_ntf_filter callback bt_map_mce_mas_cb::set_ntf_filter will be called.

Parameters
mce_masMAS client instance.
finalTrue if this is the final packet, false if more data follows.
bufBuffer containing filter mask and headers. Must include connection ID, type header, and application parameters. If success returned, the function has taken the ownership of buf.
Returns
0 on success, negative error code on failure.

◆ bt_map_mce_mas_set_ntf_reg()

int bt_map_mce_mas_set_ntf_reg ( struct bt_map_mce_mas * mce_mas,
bool final,
struct net_buf * buf )

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

Send set notification registration request.

Enables or disables event notifications from the MAS. Once set_ntf_reg response received, the set_ntf_reg callback bt_map_mce_mas_cb::set_ntf_reg will be called.

Parameters
mce_masMAS client instance.
finalTrue if this is the final packet, false if more data follows.
bufBuffer containing notification status and headers. Must include connection ID, type header, and application parameters. If success returned, the function has taken the ownership of buf.
Returns
0 on success, negative error code on failure.

◆ bt_map_mce_mas_set_owner_status()

int bt_map_mce_mas_set_owner_status ( struct bt_map_mce_mas * mce_mas,
bool final,
struct net_buf * buf )

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

Send set owner status request.

Sets the owner's presence and chat state. Once set_owner_status response received, the set_owner_status callback bt_map_mce_mas_cb::set_owner_status will be called.

Parameters
mce_masMAS client instance.
finalTrue if this is the final packet, false if more data follows.
bufBuffer containing owner status data and headers. Must include connection ID, type header, and application parameters. If success returned, the function has taken the ownership of buf.
Returns
0 on success, negative error code on failure.

◆ bt_map_mce_mas_update_inbox()

int bt_map_mce_mas_update_inbox ( struct bt_map_mce_mas * mce_mas,
bool final,
struct net_buf * buf )

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

Send update inbox request.

Requests the server to check for new messages. Once update_inbox response received, the update_inbox callback bt_map_mce_mas_cb::update_inbox will be called.

Parameters
mce_masMAS client instance.
finalTrue if this is the final packet, false if more data follows.
bufBuffer containing headers. Must include connection ID and type header. If success returned, the function has taken the ownership of buf.
Returns
0 on success, negative error code on failure.