Bluetooth MAP Profile
- group BT_MAP
Provide BT MAP profile interfaces.
Typedefs
-
typedef enum t_bt_map_folder T_BT_MAP_FOLDER
Define BT MAP folder.
-
typedef enum t_bt_map_response_code T_BT_MAP_RESPONSE_CODE
BT MAP response code.
-
typedef enum t_bt_map_push_msg_action T_BT_MAP_PUSH_MSG_ACTION
BT MAP push message action.
Enums
-
enum t_bt_map_folder
Define BT MAP folder.
Values:
-
enumerator BT_MAP_FOLDER_ROOT
-
enumerator BT_MAP_FOLDER_TELECOM
-
enumerator BT_MAP_FOLDER_MSG
-
enumerator BT_MAP_FOLDER_INBOX
-
enumerator BT_MAP_FOLDER_OUTBOX
-
enumerator BT_MAP_FOLDER_SENT
-
enumerator BT_MAP_FOLDER_DELETED
-
enumerator BT_MAP_FOLDER_DRAFT
-
enumerator BT_MAP_FOLDER_ROOT
-
enum t_bt_map_response_code
BT MAP response code.
Values:
-
enumerator BT_MAP_RSP_CONTINUE
-
enumerator BT_MAP_RSP_SUCCESS
-
enumerator BT_MAP_RSP_BAD_REQUEST
-
enumerator BT_MAP_RSP_UNAUTHORIZED
-
enumerator BT_MAP_RSP_FORBIDDEN
-
enumerator BT_MAP_RSP_NOT_IMPLEMENTED
-
enumerator BT_MAP_RSP_SERVICE_UNAVAILABLE
-
enumerator BT_MAP_RSP_CONTINUE
Functions
-
bool bt_map_init(uint8_t mns_server_chann, uint16_t mns_l2c_psm, uint32_t support_feat)
Initialize MAP profile.
- Parameters:
mns_server_chann – [in] RFCOMM server channel to be allocated for MNS.
mns_l2c_psm – [in] L2CAP PSM to be allocated for MNS.
support_feat – [in] MAP client supported features.
- Return values:
true – MAP profile was initialized successfully.
false – MAP profile was failed to initialize.
- Returns:
The status of initializing MAP profile.
-
bool bt_map_mns_connect_cfm(uint8_t bd_addr[6], bool accept)
Accept or reject the incoming MNS connection.
- Parameters:
bd_addr – [in] Remote BT address.
accept – [in] Accept or reject the connection indication.
true Accept the connection indication.
false Reject the connection indication
- Return values:
true – MNS connection confirmation was sent successfully.
false – MNS connection confirmation was failed to send.
- Returns:
The status of sending the MNS connection confirmation.
-
bool bt_map_mas_connect_over_rfc_req(uint8_t bd_addr[6], uint8_t server_chann)
Send a MAS connection request over RFCOMM.
- Parameters:
bd_addr – [in] Remote BT address.
server_chann – [in] The remote server channel defined in SDP record.
- Return values:
true – MAS connection request was sent successfully.
false – MAS connection request was failed to send.
- Returns:
The status of sending the MAS connection request.
-
bool bt_map_mas_connect_over_l2c_req(uint8_t bd_addr[6], uint16_t l2c_psm)
Send a MAS connection request over L2CAP.
- Parameters:
bd_addr – [in] Remote BT address.
l2c_psm – [in] The remote L2CAP PSM defined in SDP record.
- Return values:
true – MAS connection request was sent successfully.
false – MAS connection request was failed to send.
- Returns:
The status of sending the MAS connection request.
-
bool bt_map_mas_disconnect_req(uint8_t bd_addr[6])
Send a MAS disconnection request.
- Parameters:
bd_addr – [in] Remote BT address.
- Return values:
true – MAS disconnection request was sent successfully.
false – MAS disconnection request was failed to send.
- Returns:
The status of sending the MAS disconnection request.
-
bool bt_map_mns_send_event_rsp(uint8_t bd_addr[6], T_BT_MAP_RESPONSE_CODE rsp_code)
Acknowledge on receiving an event report Indication.
- Parameters:
bd_addr – [in] Remote BT address.
rsp_code – [in] Response code on on receiving an event report.
- Return values:
true – MNS SendEvent response was sent successfully.
false – MNS SendEvent response was failed to send.
- Returns:
The status of sending the SendEvent response.
-
bool bt_map_mas_msg_notification_set(uint8_t bd_addr[6], bool enable)
Register or unregister the message notifications.
- Parameters:
bd_addr – [in] Remote BT address.
enable – [in] True to register and false to unregister.
- Return values:
true – Request was sent successfully.
false – Request was failed to send.
- Returns:
The status of sending the set folder request.
-
bool bt_map_mas_folder_set(uint8_t bd_addr[6], T_BT_MAP_FOLDER folder)
Request to navigate the folders of MSE.
- Parameters:
bd_addr – [in] Remote BT address.
folder – [in] Folder to be navigated of MSE.
- Return values:
true – Request was sent successfully.
false – Request was failed to send.
- Returns:
The status of sending the set folder request.
-
bool bt_map_mas_folder_listing_get(uint8_t bd_addr[6], uint16_t max_list_count, uint16_t start_offset)
Request to get the remote folder listing.
- Parameters:
bd_addr – [in] Remote BT address.
max_list_count – [in] The maximum number of folders to be listed.
start_offset – [in] Offset of the first entry to be listed.
- Return values:
true – Request was sent successfully.
false – Request was failed to send.
- Returns:
The status of sending the get folder listing request.
-
bool bt_map_mas_msg_listing_get(uint8_t bd_addr[6], uint8_t *folder, uint16_t folder_len, uint16_t max_list_count, uint16_t start_offset)
Request to get the list of messages from the MSE folder.
- Parameters:
bd_addr – [in] Remote BT address.
folder – [in] Name of the child folder or null for the current folder.
folder_len – [in] Length of folder name.
max_list_count – [in] The maximum number of folders to be listed.
start_offset – [in] Offset of the first entry to be listed.
- Return values:
true – Request was sent successfully.
false – Request was failed to send.
- Returns:
The status of sending the get message listing request.
-
bool bt_map_mas_msg_get(uint8_t bd_addr[6], uint8_t *msg_handle, uint8_t handle_len, bool native)
Request to get the message from the MSE folder.
- Parameters:
bd_addr – [in] Remote BT address.
msg_handle – [in] Message handle, null-terminated Unicode text string with 16 hexadecimal digits.
handle_len – [in] Length of message handle.
native – [in] True for native and false for UTF-8 message.
- Return values:
true – Request was sent successfully.
false – Request was failed to send.
- Returns:
The status of sending the get message request.
-
bool bt_map_mas_get_continue(uint8_t bd_addr[6])
Request to get more data from the remote server.
- Parameters:
bd_addr – [in] Remote BT address.
- Return values:
true – Request was sent successfully.
false – Request was failed to send.
- Returns:
The status of sending get continue message.
-
bool bt_map_mas_get_abort(uint8_t bd_addr[6])
Request to terminate the ongoing get operation.
- Parameters:
bd_addr – [in] Remote BT address.
- Return values:
true – Request was sent successfully.
false – Request was failed to send.
- Returns:
The status of sending get abort message.
-
bool bt_map_mas_msg_push(uint8_t bd_addr[6], uint8_t *folder, uint16_t folder_len, bool native, bool more_data, uint8_t *msg, uint16_t msg_len)
Request to send a new message.
- Parameters:
bd_addr – [in] Remote BT address.
folder – [in] Name of the message folder.
folder_len – [in] Length of folder name.
native – [in] True for native and false for UTF-8 message.
more_data – [in] True if the message is partial and more data to send later.
msg – [in] The message to be sent.
msg_len – [in] Length of message.
- Return values:
true – Request was sent successfully.
false – Request was failed to send.
- Returns:
The status of sending the message.
-
typedef enum t_bt_map_folder T_BT_MAP_FOLDER