notification_message_set_request_id()

Set the request_id of message to allow OK/ERROR responses.

Synopsis:

#include <bps/notification.h>
 
BPS_API int notification_message_set_request_id(notification_message_t *message,
                                                const char *request_id)

Since:

BlackBerry 10.0.0

Arguments:

message

The notification_message_t structure whose request_id you want to set.

request_id

The request ID you want to identify the message by.

Library:

libbps (For the qcc command, use the -l bps option to link against this library)

Description:

The notification_message_set_request_id() function sets the request ID of a notification_message_t structure. You may add a request_id to receive notification response events from the notification server. A NOTIFICATION_ERROR or NOTIFICATION_OK response is delivered for every message sent using the notification_alert() or notification_notify() function. The request_id of the response will match the original message. For this reason we recommend that you make them unique, but it isn't strictly required.

The request_id member is valid for the notification_alert(), notification_notify(), notification_cancel(), and notification_delete() functions.

A request_id isn't required to receive NOTIFICATION_CHOICE responses.

Returns:

BPS_SUCCESS upon success, BPS_FAILURE with errno set otherwise.

Last modified: 2014-09-30



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus