SWRU580 April   2021 CC2564C , CC2564MODA , CC2564MODN

 

  1.   Trademarks
  2. Introduction
  3. A2DP (AUD) Demo Guide
    1. 2.1 Demo Overview
    2. 2.2 Demo Application
    3. 2.3 Application Commands
  4. A3DP Sink Demo Guide
    1. 3.1 Demo Overview
    2. 3.2 Demo Application
    3. 3.3 Sink Reference Board Demo Application
    4. 3.4 Multiple Source Demo
    5. 3.5 Application Commands
  5. A3DP Source Demo Guide
    1. 4.1 Demo Overview
    2. 4.2 Demo Application
    3. 4.3 Application Commands
  6. HFP Demo Guide
    1. 5.1 Demo Overview
    2. 5.2 Demo Application
    3. 5.3 Application Commands
  7. HFP Audio Gateway Demo Guide
    1. 6.1 Demo Overview
    2. 6.2 Demo Application
    3. 6.3 Application Commands
  8. HID Demo Guide
    1. 7.1 Demo Overview
    2. 7.2 Demo Application
    3. 7.3 Application Commands
  9. HSP Demo Guide
    1. 8.1 Demo Overview
    2. 8.2 Demo Application
    3. 8.3 Application Command
  10. Map Demo Guide
    1. 9.1 Demo Overview
    2. 9.2 Demo Application
    3. 9.3 Application Command
  11. 10PBAP Demo Guide
    1. 10.1 Demo Overview
    2. 10.2 Demo Application
    3. 10.3 Application Commands
  12. 11SPP Demo Guide
    1. 11.1 Demo Overview
    2. 11.2 Demo Application
    3. 11.3 Application Commands
  13. 12SPPLE Demo Guide
    1. 12.1 Demo Overview
    2. 12.2 Demo Application
    3. 12.3 Demonstrating SPP LE on an iOS Device with the LightBlue App
    4. 12.4 Demonstrating SPP LE on an iOS Device with the SPPLE Transfer App - LEGACY
    5. 12.5 SPP Demo
    6. 12.6 Application Commands
  14. 13SPPDMMulti Demo Guide
    1. 13.1 Demo Overview
    2. 13.2 Demo Application
    3. 13.3 Application Commands
  15. 14ANP Demo Guide
    1. 14.1 Demo Overview
    2. 14.2 Demo Application
    3. 14.3 Application Commands
  16. 15HFP Demo Guide
    1. 15.1 Demo Overview
    2. 15.2 Demo Application
    3. 15.3 Application Commands
  17. 16HTP Demo Guide
    1. 16.1 Demo Overview
    2. 16.2 Demo Application
    3. 16.3 Application Commands
  18. 17PASP Demo Guide
    1. 17.1 Demo Overview
    2. 17.2 Demo Application
    3. 17.3 Application Commands
  19. 18HOGP Demo Guide
    1. 18.1 Demo Overview
    2. 18.2 Demo Application
    3. 18.3 Application Commands
  20. 19PXP Demo Guide
    1. 19.1 Demo Overview
    2. 19.2 Demo Application
    3. 19.3 Applications Commands
  21. 20FMP Demo Guide
    1. 20.1 Demo Overview
    2. 20.2 Demo Application
    3. 20.3 Application Commands
  22. 21CSCP Demo Guide
    1. 21.1 Demo Overview
    2. 21.2 Demo Application
    3. 21.3 Application Commands
  23. 22Revision History

Application Command

Generic Access Profile Commands
Note: Reference the appendix for all Generic Access Profile Commands
Message Access Profile Commands
OpenServer

Description

The following function is responsible for creating a local MAP Server. This function returns zero if successful and a negative value if an error occurred.

Parameters

This command requires two parameters, the Port Number and the Received Messages Path.

Command Call Examples

Open 1 C:\Temp Attempts to Open a MAP Port Server at Port Number #1, with C:\Temp as the received messages path.

Possible Return Values

(0) MAP_Open_Message_Access_Server() Successful

(-4) FUNCTION_ERROR

(-6) INVALID_PARAMETERS_ERROR

(-8) INVALID_STACK_ID_ERROR

(-1000) BTMAP_ERROR_INVALID_PARAMETER

(-1001) BTMAP_ERROR_NOT_INITIALIZED

(-1002) BTMAP_ERROR_INVALID_BLUETOOTH_STACK_ID

(-1003) BTMAP_ERROR_DLL_INITIALIZATION_ERROR br> (-1004) BTMAP_ERROR_INSUFFICIENT_RESOURCES

(-1005) BTMAP_ERROR_REQUEST_ALREADY_OUTSTANDING

(-1006) BTMAP_ERROR_ACTION_NOT_ALLOWED

(-1007) BTMAP_ERROR_INSUFFICIENT_PACKET_LENGTH

API Call

MAP_Open_Message_Access_Server(BluetoothStackID, TempParam->Params[0].intParam, MAP_Event_Callback_Server, 0);

API Prototype

int BTPSAPI MAP_Open_Message_Access_Server(unsigned int BluetoothStackID, unsigned int MessageAccessServiceServerPort, MAP_Event_Callback_t EventCallback, unsigned long CallbackParameter)

Description of API

The following function is responsible for opening a local MAP Server. The first parameter is the Bluetooth Stack ID on which to open the Server. The second parameter is the Port on which to open this Server, and *MUST* be between MAP_PORT_NUMBER_MINIMUM and MAP_PORT_NUMBER_MAXIMUM. The third parameter is the Callback function to call when an event occurs on this Server Port. The final parameter is a user-defined callback parameter that will be passed to the callback function with each event. This function returns a positive, non zero value if successful or a negative return error code if an error occurs. A successful return code will be a MAP Profile ID that can be used to reference the Opened MAP Profile Server Port in ALL other MAP Server functions in this module. Once an MAP Profile Server is opened, it can only be Un-Registered via a call to the MAP_Close_Server() function (passing the return value from this function).


CloseServer

Description

The following function is responsible for deleting a local MAP Server that was created via a successful call to the OpenServer() function. This function returns zero if successful and a negative value if an error occurred.

Parameters

It is not necessary to include parameters when using this command. A parameter will have no effect on the outcome of the Server closing

Possible Return Values

(0) MAP_Close_Server() Success

(-4) FUNCTION_ERROR

(-6) INVALID_PARAMETERS_ERROR

(-8) INVALID_STACK_ID_ERROR

(-1000) BTMAP_ERROR_INVALID_PARAMETER

(-1001) BTMAP_ERROR_NOT_INITIALIZED

(-1002) BTMAP_ERROR_INVALID_BLUETOOTH_STACK_ID

(-1003) BTMAP_ERROR_DLL_INITIALIZATION_ERROR br> (-1004) BTMAP_ERROR_INSUFFICIENT_RESOURCES

(-1005) BTMAP_ERROR_REQUEST_ALREADY_OUTSTANDING

(-1006) BTMAP_ERROR_ACTION_NOT_ALLOWED

(-1007) BTMAP_ERROR_INSUFFICIENT_PACKET_LENGTH

API Call

MAP_Close_Server(BluetoothStackID, MAPID);

API Prototype

int BTPSAPI MAP_Close_Server(unsigned int BluetoothStackID, unsigned int MAPID)

Description of API

The following function is responsible for closing a currently open/registered Message Access Profile Server. This function is capable of closing servers opened via a call to MAP_Open_Message_Access_Server() and MAP_Open_Message_Notification_Server(). The first parameter to this function is the Bluetooth Stack ID of the Bluetooth Protocol Stack Instance that is associated with the Message Access Profile Server being closed. The second parameter to this function is the MAP ID of the Profile Server to be closed. This function returns zero if successful, or a negative return value if there was an error.

Note: This function only closes/un-registers servers it does NOT delete any SDP Service Record Handles that are registered for the specified Server.

Open

Description

The following function is responsible for initiating a connection with a Remote MAP Server. This function returns zero if successful and a negative value if an error occurred.

Parameters

The command takes two parameters to work. The first is the Inquiry Index which can be found using the DisplayInquiryList command after an Inquiry has been completed. The second is the RFCOMM Server Port which will be used to open a Remote PBAP Port.

Command Call Examples

"Open 12 4" Attempts to Open a Remote Message Access Port Server with the Remote Bluetooth Device whose address is found at the twelfth Inquiry Index using RFCOMM Server Port #4." "Open 1 1" Attempts to Open a Remote Message Access Port Server with the Remote Bluetooth Device whose address is found at the first Inquiry Index using RFCOMM Server Port #1." "Open 19 3" Attempts to Open a Remote Message Access Port Server with the Remote Bluetooth Device whose address is found at the nineteenth Inquiry Index using RFCOMM Server Port #3. "

Possible Return Values

(0)MAP_Open_Remote_Message_Access_Server_Port: Function Successful

(-4) FUNCTION_ERROR

(-6) INVALID_PARAMETERS_ERROR

(-8) INVALID_STACK_ID_ERROR

(-1000) BTMAP_ERROR_INVALID_PARAMETER

(-1001) BTMAP_ERROR_NOT_INITIALIZED

(-1002) BTMAP_ERROR_INVALID_BLUETOOTH_STACK_ID

(-1003) BTMAP_ERROR_DLL_INITIALIZATION_ERROR br> (-1004) BTMAP_ERROR_INSUFFICIENT_RESOURCES

(-1005) BTMAP_ERROR_REQUEST_ALREADY_OUTSTANDING

(-1006) BTMAP_ERROR_ACTION_NOT_ALLOWED

(-1007) BTMAP_ERROR_INSUFFICIENT_PACKET_LENGTH

API Call

MAP_Open_Remote_Message_Access_Server_Port(BluetoothStackID, InquiryResultList[(TempParam->Params[0].intParam-1)], TempParam->Params[1].intParam, MAP_Event_Callback_Client, 0);

API Prototype

int BTPSAPI MAP_Open_Remote_Message_Access_Server_Port(unsigned int BluetoothStackID, BD_ADDR_t BD_ADDR, unsigned int ServerPort, MAP_Event_Callback_t EventCallback, unsigned long CallbackParameter)

Description of API

The following function is responsible for opening a connection to a remote Message Access Server. The first parameter is the Bluetooth Stack ID of the local Bluetooth stack. The second parameter is the remote Bluetooth Device Address of the Bluetooth MAP Profile Server with which to connect. The third parameter specifies the remote Server port with which to connect. The final two parameters specify the MAP Profile Event Callback Function and the Callback Parameter to associate with this MAP Profile Client. The ServerPort parameter *MUST* be between MAP_PORT_NUMBER_MINIMUM and MAP_PORT_NUMBER_MAXIMUM. This function returns a positive, non zero, value if successful or a negative return error code if an error occurs. A successful return code will be a MAP ID that can be used to reference the remote opened MAP Profile Server in ALL other MAP Profile Client functions in this module. Once a remote Server is opened, it can only be closed via a call to the MAP_Close_Connection() function (passing the return value from this function).


Close

Description

The following function is responsible for terminating a connection with a remote MAP Client or Server. This function returns zero if successful and a negative value if an error occurred.

Parameters

It is not necessary to include parameters when using this command. A parameter will have no effect on the outcome of the Server closing.

Possible Return Values

(0) MAP_Close_Connection: Function Successful

(-4) FUNCTION_ERROR

(-6) INVALID_PARAMETERS_ERROR

(-8) INVALID_STACK_ID_ERROR

(-1000) BTMAP_ERROR_INVALID_PARAMETER

(-1001) BTMAP_ERROR_NOT_INITIALIZED

(-1002) BTMAP_ERROR_INVALID_BLUETOOTH_STACK_ID

(-1003) BTMAP_ERROR_DLL_INITIALIZATION_ERROR br> (-1004) BTMAP_ERROR_INSUFFICIENT_RESOURCES

(-1005) BTMAP_ERROR_REQUEST_ALREADY_OUTSTANDING

(-1006) BTMAP_ERROR_ACTION_NOT_ALLOWED

(-1007) BTMAP_ERROR_INSUFFICIENT_PACKET_LENGTH

API Call

MAP_Close_Connection(BluetoothStackID, MAPID);

API Prototype

int BTPSAPI MAP_Close_Connection(unsigned int BluetoothStackID, unsigned int MAPID)

Description of API

The following function is responsible for closing a currently ongoing MAP Profile connection. The first parameter is the Bluetooth Stack ID of the Bluetooth Protocol Stack Instance that is associated with the MAP Profile connection being closed. The second parameter to this function is the MAP ID of the MAP Profile connection to be closed. This function returns zero if successful, or a negative return value if there was an error.

Note: If this function is called with a Server MAP ID (a value returned from a call to MAP_Open_Server_Port()) any clients currently connected to this Server will be terminated, but the Server will remained open and registered. If this function is called using a Client MAP ID (a value returned from a call to MAP_Open_Remote_Server_Port()), the Client connection will be terminated/closed entirely.

OpenNotification

Description

The following function is responsible for creating a local MAP Notification Server. This function returns zero if successful and a negative value if an error occurred.

Parameters

The command only requires one parameter. This parameter is the Port Number.

Command Call Examples

"Open 1" Attempts to Open a MAP Notification Server at Port Number #1".

Possible Return Values

(0) MAP_Open_Message_Notification_Server() Successful

(-4) FUNCTION_ERROR

(-6) INVALID_PARAMETERS_ERROR

(-8) INVALID_STACK_ID_ERROR

(-1000) BTMAP_ERROR_INVALID_PARAMETER

(-1001) BTMAP_ERROR_NOT_INITIALIZED

(-1002) BTMAP_ERROR_INVALID_BLUETOOTH_STACK_ID

(-1003) BTMAP_ERROR_DLL_INITIALIZATION_ERROR br> (-1004) BTMAP_ERROR_INSUFFICIENT_RESOURCES

(-1005) BTMAP_ERROR_REQUEST_ALREADY_OUTSTANDING

(-1006) BTMAP_ERROR_ACTION_NOT_ALLOWED

(-1007) BTMAP_ERROR_INSUFFICIENT_PACKET_LENGTH

API Call

MAP_Open_Message_Notification_Server(BluetoothStackID, TempParam->Params[0].intParam, MAPID, MAP_Event_Callback_Client, 0);

API Prototype

int BTPSAPI MAP_Open_Message_Notification_Server(unsigned int BluetoothStackID, unsigned int MessageNotificationServiceServerPort, unsigned int MAS_MAPID, MAP_Event_Callback_t EventCallback, unsigned long CallbackParameter)

Description of API

The following function is responsible for opening a local MAP Server. The first parameter is the Bluetooth Stack ID on which to open the Server. The second parameter is the Port on which to open this Server, and *MUST* be between MAP_PORT_NUMBER_MINIMUM and MAP_PORT_NUMBER_MAXIMUM. The third parameter is the MAPID for the Message Access Client that the Server is being associated with. The fourth paramerer is a Callback function to call when an event occurs on this Server Port. The final parameter is a user-defined callback parameter that will be passed to the callback function with each event. This function returns a positive, non zero value if successful or a negative return error code if an error occurs. A successful return code will be a MAP Profile ID that can be used to reference the Opened MAP Profile Server Port in ALL other MAP Server functions in this module. Once an MAP Profile Server is opened, it can only be Un-Registered via a call to the MAP_Close_Server() function (passing the return value from this function)


CloseNotification

Description

The following function is responsible for deleting a local MAP Notification Server that was created via a successful call to the OpenNotificationServer() function. This function returns zero if successful and a negative value if an error occurred.

Parameters

It is not necessary to include parameters when using this command. A parameter will have no effect on the outcome of the Server closing.

Possible Return Values

(0) MAP_Close_Server() Success

(-4) FUNCTION_ERROR

(-6) INVALID_PARAMETERS_ERROR

(-8) INVALID_STACK_ID_ERROR

(-1000) BTMAP_ERROR_INVALID_PARAMETER

(-1001) BTMAP_ERROR_NOT_INITIALIZED

(-1002) BTMAP_ERROR_INVALID_BLUETOOTH_STACK_ID

(-1003) BTMAP_ERROR_DLL_INITIALIZATION_ERROR br> (-1004) BTMAP_ERROR_INSUFFICIENT_RESOURCES

(-1005) BTMAP_ERROR_REQUEST_ALREADY_OUTSTANDING

(-1006) BTMAP_ERROR_ACTION_NOT_ALLOWED

(-1007) BTMAP_ERROR_INSUFFICIENT_PACKET_LENGTH

API Call

MAP_Close_Server(BluetoothStackID, MAPNID);

API Prototype

int BTPSAPI MAP_Close_Server(unsigned int BluetoothStackID, unsigned int MAPID)

Description of API

The following function is responsible for closing a currently open/registered Message Access Profile Server. This function is capable of closing servers opened via a call to MAP_Open_Message_Access_Server() and MAP_Open_Message_Notification_Server(). The first parameter to this function is the Bluetooth Stack ID of the Bluetooth Protocol Stack Instance that is associated with the Message Access Profile Server being closed. The second parameter to this function is the MAP ID of the Profile Server to be closed. This function returns zero if successful, or a negative return value if there was an error.

Note: This function only closes/un-registers servers it does NOT delete any SDP Service Record Handles that are registered for the specified Server.

RequestNotification

Description

The following function is responsible for issuing a MAP Request Notification Request to the remote MAP Server. This function returns zero if successful and a negative value if an error occurred.

Parameters

The command only requires one parameter, which is the connection index, 0 = Disconnect, 1 = Connect.

Command Call Examples

RequestNotification 1 makes a MAP Request Notification connection to the remote MAP Server. RequestNotification 0 makes a MAP Request Notification disconnection to the remote MAP Server.

Possible Return Values

(0) MAP_Set_Notification_Registration_Request: Function Successful

(-4) FUNCTION_ERROR

(-6) INVALID_PARAMETERS_ERROR

(-8) INVALID_STACK_ID_ERROR

(-1000) BTMAP_ERROR_INVALID_PARAMETER

(-1001) BTMAP_ERROR_NOT_INITIALIZED

(-1002) BTMAP_ERROR_INVALID_BLUETOOTH_STACK_ID

(-1003) BTMAP_ERROR_DLL_INITIALIZATION_ERROR br> (-1004) BTMAP_ERROR_INSUFFICIENT_RESOURCES

(-1005) BTMAP_ERROR_REQUEST_ALREADY_OUTSTANDING

(-1006) BTMAP_ERROR_ACTION_NOT_ALLOWED

(-1007) BTMAP_ERROR_INSUFFICIENT_PACKET_LENGTH

API Call

MAP_Set_Notification_Registration_Request(BluetoothStackID, MAPID, (Boolean_t)((TempParam->Params[0].intParam)?TRUE:FALSE));

API Prototype

int BTPSAPI MAP_Set_Notification_Registration_Request(unsigned int BluetoothStackID, unsigned int MAPID, Boolean_t Enabled)

Description of API

The following function is responsible for providing a mechanism to Enable or Disable Notification messages from the remote Message Access Server. The first parameter to this function is the Bluetooth Stack ID. The second parameter to this function is the MAP ID of the Service Client making this call. The third parameter specifies if the Notifications should be Enabled or Disabled. This function returns zero if successful, or a negative return value if there was an error.


SetFolder

Description

The following function is responsible for issuing a MAP Set Folder Request to a remote MAP Server. This function returns zero if successful and a negative value if an error occurred.

Parameters

This functions requires one parameter (path option parameter 0-Root, 1-Down, 2-Up). If down is selected as the path option then we require an additional paramters which is the path.

Command Call Examples

SetFolder 1 telecom uses down as the path option and telecom as the folder.

Possible Return Values

(0) MAP_Set_Folder_Request() Successful

(-4) FUNCTION_ERROR

(-6) INVALID_PARAMETERS_ERROR

(-8) INVALID_STACK_ID_ERROR

(-1000) BTMAP_ERROR_INVALID_PARAMETER

(-1001) BTMAP_ERROR_NOT_INITIALIZED

(-1002) BTMAP_ERROR_INVALID_BLUETOOTH_STACK_ID

(-1003) BTMAP_ERROR_DLL_INITIALIZATION_ERROR br> (-1004) BTMAP_ERROR_INSUFFICIENT_RESOURCES

(-1005) BTMAP_ERROR_REQUEST_ALREADY_OUTSTANDING

(-1006) BTMAP_ERROR_ACTION_NOT_ALLOWED

(-1007) BTMAP_ERROR_INSUFFICIENT_PACKET_LENGTH

API Call

MAP_Set_Folder_Request(BluetoothStackID, MAPID, (MAP_Set_Folder_Option_t)TempParam->Params[0].intParam, TempBuffer);

API Prototype

int BTPSAPI MAP_Set_Folder_Request(unsigned int BluetoothStackID, unsigned int MAPID, MAP_Set_Folder_Option_t PathOption, Word_t *FolderName)

Description of API

The following function generates a MAP Set Folder Request to the specified remote MAP Server.The BluetoothStackID parameter the ID of the Bluetooth Stack that is associated with this MAP Client. The MAPID parameter specifies the MAP ID for the local MAP Client. The PathOption parameter contains an enumerated value that indicates the type of path change to request. The FolderName parameter contains the folder name to include with this SetFolder request. This value can be NULL if no name is required for the selected PathOption. See the MAP specification for more information. This function returns zero if successful or a negative return error code if there was an error.

Note: A successful return code does not mean that the remote MAP Profile Server successfully processed the command. The caller needs to check the confirmation result to determine if the remote MAP Profile Server successfully executed the Request. There can only be one outstanding MAP Profile Request active at any one time. Because of this, another MAP Profile Request cannot be issued until either the current request is Aborted (by calling the MAP_Abort_Request() function) or the current Request is completed (this is signified by receiving a Confirmation Event in the MAP Profile Event Callback that was registered when the MAP Profile Port was opened).

GetFolderListing

Description

The following function is responsible for issuing a MAP Get Folder Listing Request to a remote MAP Server. This function returns zero if successful and a negative value if an error occurred.

Parameters

The command requires 2 parameters, the Max List Count, the List Start Offset.

Command Call Examples

GetFolderListing 65535 0 has 65535 as the Max List Count, 0 as the List Start Offset.

Possible Return Values

(0) MAP_Get_Folder_Listing_Request() Successful

(-4) FUNCTION_ERROR

(-6) INVALID_PARAMETERS_ERROR

(-8) INVALID_STACK_ID_ERROR

(-1000) BTMAP_ERROR_INVALID_PARAMETER

(-1001) BTMAP_ERROR_NOT_INITIALIZED

(-1002) BTMAP_ERROR_INVALID_BLUETOOTH_STACK_ID

(-1003) BTMAP_ERROR_DLL_INITIALIZATION_ERROR br> (-1004) BTMAP_ERROR_INSUFFICIENT_RESOURCES

(-1005) BTMAP_ERROR_REQUEST_ALREADY_OUTSTANDING

(-1006) BTMAP_ERROR_ACTION_NOT_ALLOWED

(-1007) BTMAP_ERROR_INSUFFICIENT_PACKET_LENGTH

API Call

MAP_Get_Folder_Listing_Request(BluetoothStackID, MAPID, (Word_t)TempParam->Params[0].intParam, (Word_t)TempParam->Params[1].intParam)

API Prototype

int BTPSAPI MAP_Get_Folder_Listing_Request(unsigned int BluetoothStackID, unsigned int MAPID, Word_t MaxListCount, Word_t ListStartOffset)

Description of API

The following function generates a MAP Get Folder Listing Request to the specified remote MAP Server. The BluetoothStackID parameter the ID of the Bluetooth Stack that is associated with this MAP Client. The MAPID parameter specifies the MAP ID for the local MAP Client (returned from a successful call to the MAP_Connect_Remote_Server_Port() function). The MaxListCount parameter is an unsigned integer that specifies the maximum number of list entries the Client can handle. A MaxListCount of ZERO (0) indicates that this is a request for the number accessible folders in the current folder. The ListStartOffset parameter specifies the index requested by the Client in this Folder Listing. This function returns zero if successful or a negative return error code if there was an error.

Note: A successful return code does not mean that the remote MAP Profile Server successfully processed the command. The caller needs to check the confirmation result to determine if the remote MAP Profile Server successfully executed the Request. There can only be one outstanding MAP Profile Request active at any one time. Because of this, another MAP Profile Request cannot be issued until either the current request is Aborted (by calling the MAP_Abort_Request() function) or the current Request is completed (this is signified by receiving a Confirmation Event in the MAP Profile Event Callback that was registered when the MAP Profile Port was opened).

GetMessage

Description

The following function is responsible for issuing a MAP Get Message Request to a remote MAP Server. This function returns zero if successful and a negative value if an error occurred.

Parameters

The command requires 3 parameters Message Handle, Char Set Index(0 = Native, 1 = UTF8), Fractional Type Index(0 = Unfragmented, 1 = First, 4 = Last).

Command Call Examples

GetMessage 20000100004 0 0 has 20000100004 as Message Handle, 0 as Native Char Set, 0 as Fractional Type Index.

Possible Return Values

(0) MAP_Get_Message_Request() Successful

(-4) FUNCTION_ERROR

(-6) INVALID_PARAMETERS_ERROR

(-8) INVALID_STACK_ID_ERROR

(-1000) BTMAP_ERROR_INVALID_PARAMETER

(-1001) BTMAP_ERROR_NOT_INITIALIZED

(-1002) BTMAP_ERROR_INVALID_BLUETOOTH_STACK_ID

(-1003) BTMAP_ERROR_DLL_INITIALIZATION_ERROR br> (-1004) BTMAP_ERROR_INSUFFICIENT_RESOURCES

(-1005) BTMAP_ERROR_REQUEST_ALREADY_OUTSTANDING

(-1006) BTMAP_ERROR_ACTION_NOT_ALLOWED

(-1007) BTMAP_ERROR_INSUFFICIENT_PACKET_LENGTH

API Call

MAP_Get_Message_Request(BluetoothStackID, MAPID, TempParam->Params[0].strParam, FALSE, CharSet, (MAP_Fractional_Type_t)TempParam->Params[1].intParam);

API Prototype

int BTPSAPI MAP_Get_Message_Request(unsigned int BluetoothStackID, unsigned int MAPID, char *MessageHandle, Boolean_t Attachment, MAP_CharSet_t CharSet, MAP_Fractional_Type_t FractionalType)

Description of API

The following function generates a MAP Get Message Request to the specified remote MAP Server. The BluetoothStackID parameter the ID of the Bluetooth Stack that is associated with this MAP Client. The MAPID parameter specifies the MAP ID for the local MAP Client. The MessageHandle parameter is a pointer to a 16 byte Null terminated Unicode Text string that identifies the message. The Attachment parameter is used to indicate if any existing attachments to the specified message are to be included in the response. The CharSet and Fractional Type parameters specify that format of the response message. This function returns zero if successful or a negative return error code if there was an error.

Note: Specifying the FractionalType as ftUnfragmented causes no FractionalType Header to be added to the OBEX Header List. This is the value that should be specified for a message that is non-fragmented.
GetMessageListing

Description

The following function is responsible for issuing a MAP Get Message Listing Request to a remote MAP Server. This function returns zero if successful and a negative value if an error occurred.

Parameters

The command requires 2 parameters, the Max List Count and the List Start Offset

Command Call Examples

GetMessageListing 65535 0 has 65535 as the Max List Count, 0 as the List Start Offset.

Possible Return Values

API Call

MAP_Get_Message_Listing_Request(BluetoothStackID, MAPID, Folder?TempBuffer:NULL, (Word_t)TempParam->Params[0].intParam, (Word_t)TempParam->Params[1].intParam, NULL);

API Prototype

int BTPSAPI MAP_Get_Message_Listing_Request(unsigned int BluetoothStackID, unsigned int MAPID, Word_t *FolderName, Word_t MaxListCount, Word_t ListStartOffset, MAP_Message_Listing_Info_t *ListingInfo)

Description of API

The following function generates a MAP Get Message Listing Request to the specified remote MAP Server. The BluetoothStackID parameter the ID of the Bluetooth Stack that is associated with this MAP Client. The MAPID parameter specifies the MAP ID for the local MAP Client (returned from a successful call to the MAP_Connect_Remote_Server_Port() function). The FolderName specifies the Folder from which the Message Listing is to be retrieved. If the parameter is NULL, the listing is made from the current directory. The MaxListCount parameter is an unsigned integer that specifies the maximum number of list entries the Client can handle. A MaxListCount of ZERO (0) indicates that this is a request for the number of messages in the specified folder. The ListStartOffset parameter specifies the index requested by the Client in this Listing. The ListInfo structure is used to specify a number of filters and options that should be applied to the request. This function returns zero if successful or a negative return error code if there was an error.

Note: A successful return code does not mean that the remote MAP Profile Server successfully processed the command. The caller needs to check the confirmation result to determine if the remote MAP Profile Server successfully executed the Request.
SetMessageStatus

Description

The following function is responsible for issuing a MAP Set Message Status Request to the remote MAP Server. This function returns zero if successful and a negative value if an error occurred.

Parameters

The command requires 3 parameters Message Handle, Status Indicator Index(0 = Native, 1 = UTF8), Status Value Index(0 = Unfragmented, 1 = First, 4 = Last).

Command Call Examples

SetMessageStatus 20000100004 0 0 has 20000100004 as Message Handle, 0 as Status Indicator, 0 as Status Value.

Possible Return Values

(0) MAP_Set_Message_Status_Request() Successful

(-4) FUNCTION_ERROR

(-6) INVALID_PARAMETERS_ERROR

(-8) INVALID_STACK_ID_ERROR

(-1000) BTMAP_ERROR_INVALID_PARAMETER

(-1001) BTMAP_ERROR_NOT_INITIALIZED

(-1002) BTMAP_ERROR_INVALID_BLUETOOTH_STACK_ID

(-1003) BTMAP_ERROR_DLL_INITIALIZATION_ERROR br> (-1004) BTMAP_ERROR_INSUFFICIENT_RESOURCES

(-1005) BTMAP_ERROR_REQUEST_ALREADY_OUTSTANDING

(-1006) BTMAP_ERROR_ACTION_NOT_ALLOWED

(-1007) BTMAP_ERROR_INSUFFICIENT_PACKET_LENGTH

API Call

MAP_Set_Message_Status_Request(BluetoothStackID, MAPID, TempParam->Params[0].strParam, (MAP_Status_Indicator_t)TempParam->Params[1].intParam, TempParam->Params[2].intParam)

API Prototype

int BTPSAPI MAP_Set_Message_Status_Request(unsigned int BluetoothStackID, unsigned int MAPID, char *MessageHandle, MAP_Status_Indicator_t StatusIndicator, Boolean_t StatusValue)

Description of API

The following function generates a MAP Set Message Status Request to the specified remote MAP Server. The BluetoothStackID parameter the ID of the Bluetooth Stack that is associated with this MAP Client. The MAPID parameter specifies the MAP ID for the local MAP Client. The MessageHandle parameter is a pointer to a 16 byte Null terminated Unicode Text string that identifies the message. The StatusIndicator identifies the Status indicator to set. The StatusValue indicates the new state of the indicator. This function returns zero if successful or a negative return error code if there was an error.


PushMessage

Description

The following function is responsible for issuing a MAP Push Message Request to a remote MAP Server. This function returns zero if successful and a negative value if an error occurred.

Parameters

This command requires 3 parameters, Transparent Index (0 = False, 1 = True), Retry Index (0 = False, 1 = True) and Message File Name.

Command Call Examples

PushMessage 0 0 20000100004 has as , 0 for Transparent as , 0 for Retry and 20000100004 as Message Handle.

Possible Return Values

(0) MAP_Push_Message_Request() Successful

(-4) FUNCTION_ERROR

(-6) INVALID_PARAMETERS_ERROR

(-8) INVALID_STACK_ID_ERROR

(-1000) BTMAP_ERROR_INVALID_PARAMETER

(-1001) BTMAP_ERROR_NOT_INITIALIZED

(-1002) BTMAP_ERROR_INVALID_BLUETOOTH_STACK_ID

(-1003) BTMAP_ERROR_DLL_INITIALIZATION_ERROR br> (-1004) BTMAP_ERROR_INSUFFICIENT_RESOURCES

(-1005) BTMAP_ERROR_REQUEST_ALREADY_OUTSTANDING

(-1006) BTMAP_ERROR_ACTION_NOT_ALLOWED

(-1007) BTMAP_ERROR_INSUFFICIENT_PACKET_LENGTH

API Call

MAP_Push_Message_Request(BluetoothStackID, MAPID, NULL, TempParam->Params[0].intParam, TempParam->Params[1].intParam, csUTF8, CurrentBufferSize, (Byte_t *)CurrentBuffer, &CurrentBufferSent, TRUE);

API Prototype

int BTPSAPI MAP_Push_Message_Request(unsigned int BluetoothStackID, unsigned int MAPID, Word_t *FolderName, Boolean_t Transparent, Boolean_t Retry, MAP_CharSet_t CharSet, unsigned int DataLength, Byte_t *DataBuffer, unsigned int *AmountSent, Boolean_t Final)

Description of API

The following function generates a MAP Push Message Request to the specified remote MAP Server. The BluetoothStackID parameter the ID of the Bluetooth Stack that is associated with this MAP Client. The MAPID parameter specifies the MAP ID for the local MAP Client. The FolderName parameter specifies the destination location for the message. If this parameter is NULL, the current directory is used. The Transparent parameter is used to indicate that no copy of the message should be placed in the Sent Folder. Retry parameter is used to indicate if any attempts to retry the send if the previous attempt fails. The CharSet parameters specify that format of the message. The DataLength parameter defines the number of bytes that are included in the object segment (DataBuffer). The DataBuffer parameter is a pointer to a byte buffer containing the Message Listing Object segment. The AmountSent parameter is a pointer to variable which will be written with the actual amount of data that was able to be included in the packet. The final parameter to this function is a Boolean Flag indicating if this is the last segment of the object. This function returns zero if successful or a negative return error code if there was an error.

Note: The MessageObject is a "x-bt/message" character stream that is formatted as defined in the Message Access Profile Specification. Including a DataBuffer pointer and setting DataLength > 0 will cause a Body or End-of-Body header to be added to the packet, either on the first or subsequent packets. If the stack cannot include all the requested object (DataLength) in the current packet, a Body header will be used and AmountSent will reflect that not all of the data was sent. If all data is included, an End-of-Body header will be used. If AmountSent returns an amount smaller than the specified DataLength, not all the data was able to be sent. This function should be called again with an adjusted DataLength and DataBuffer pointer to account for the data that was successfully sent.
UpdateInbox

Description

The following function is responsible for issuing a MAP UpdateInbox Request to the remote MAP Server. This function returns zero if successful and a negative value if an error occurred.

Parameters

It is not necessary to include parameters when using this command. A parameter will have no effect on the outcome of the Server closing.

Possible Return Values

(0) MAP_Update_Inbox_Request: Function Successful

(-4) FUNCTION_ERROR

(-6) INVALID_PARAMETERS_ERROR

(-8) INVALID_STACK_ID_ERROR

(-1000) BTMAP_ERROR_INVALID_PARAMETER

(-1001) BTMAP_ERROR_NOT_INITIALIZED

(-1002) BTMAP_ERROR_INVALID_BLUETOOTH_STACK_ID

(-1003) BTMAP_ERROR_DLL_INITIALIZATION_ERROR br> (-1004) BTMAP_ERROR_INSUFFICIENT_RESOURCES

(-1005) BTMAP_ERROR_REQUEST_ALREADY_OUTSTANDING

(-1006) BTMAP_ERROR_ACTION_NOT_ALLOWED

(-1007) BTMAP_ERROR_INSUFFICIENT_PACKET_LENGTH

API Call

MAP_Update_Inbox_Request(BluetoothStackID, MAPID)

API Prototype

int BTPSAPI MAP_Update_Inbox_Request(unsigned int BluetoothStackID, unsigned int MAPID)

Description of API

The following function generates a MAP Update Inbox Request to the specified remote MAP Server. The BluetoothStackID parameter the ID of the Bluetooth Stack that is associated with this MAP Client. The MAPID parameter specifies the MAP ID for the local MAP Client. This function returns zero if successful or a negative return error code if there was an error.


Abort

Description

The following function is responsible for issuing an Abort with a remote MAP Server by issuing an OBEX Abort Command. This function returns zero if successful and a negative value if an error occurred.

Parameters

It is not necessary to include parameters when using this command. A parameter will have no effect on the outcome of the Server closing.

Possible Return Values

(0) MAP_Abort_Request: Function Successful

(-4) FUNCTION_ERROR

(-6) INVALID_PARAMETERS_ERROR

(-8) INVALID_STACK_ID_ERROR

(-1000) BTMAP_ERROR_INVALID_PARAMETER

(-1001) BTMAP_ERROR_NOT_INITIALIZED

(-1002) BTMAP_ERROR_INVALID_BLUETOOTH_STACK_ID

(-1003) BTMAP_ERROR_DLL_INITIALIZATION_ERROR br> (-1004) BTMAP_ERROR_INSUFFICIENT_RESOURCES

(-1005) BTMAP_ERROR_REQUEST_ALREADY_OUTSTANDING

(-1006) BTMAP_ERROR_ACTION_NOT_ALLOWED

(-1007) BTMAP_ERROR_INSUFFICIENT_PACKET_LENGTH

API Call

MAP_Abort_Request(BluetoothStackID, MAPID);

API Prototype

int BTPSAPI MAP_Abort_Request(unsigned int BluetoothStackID, unsigned int MAPID)

Description of API

The following function is responsible for sending an Abort Request to the remote Server. The BluetoothStackID parameter the ID of the Bluetooth Stack that is associated with this MAP Client. The MAPID parameter specifies the MAP ID for the local MAP Client. This function returns zero if successful, or a negative return value if there was an error.

Note: Upon the reception of the Abort Confirmation Event it may be assumed that the currently on going transaction has been successfully aborted and new requests may be submitted.