ids_register_notifier()

Register a callback function to be called when the named entry changes.

Synopsis:

#include <ids.h>
 
IDS_API ids_result_t ids_register_notifier(ids_provider_t *provider, int type, int flags, const char *name, notify_cb_t on_change_cb, void *cb_data)

Since:

BlackBerry 10.2.0

Arguments:

provider

A pointer to the identity provider to send this request to.

type

The type of data referred to by the name parameter.

flags

Special flags for the operation. Each identity provider may have a unique set of flags that it supports. See the identity provider's documentation for details on valid flags and their behavior.

name

The name of the entry to receive notifications for.

on_change_cb

The function that is invoked when a change is detected.

cb_data

This parameter can be set to NULL if callback data is not required. This pointer for callback data is passed in to the calling application's on_change callback without being modified. The application can determine whether it passes it in to the API or leaves it NULL, and also determine how to use it in the callback functions.

Library:

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

Description:

Error Handling:

The value of errno when IDS_FAILURE is returned can be one of the following: EFAULT: The library has not been initialized.E2BIG: The message is too big to send to the identity provider.ECOMM: Unable to communicate with the identity provider.EINVAL: An invalid parameter was passed to the function.ENOMEM: There is not enough memory to complete the operation.

Returns:

IDS_SUCCESS when the request is issued successfully, or IDS_FAILURE with the errno value set otherwise.