ids_set_data()

Issue a request to set data.

Synopsis:

#include <ids.h>
 
IDS_API ids_result_t ids_set_data(ids_provider_t *provider, int type, int flags, const ids_data_t *data, success_cb_t success_cb, failure_cb_t failure_cb, void *cb_data, ids_request_id_t *request_id)

Since:

BlackBerry 10.2.0

Arguments:

provider

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

type

The type of properties contained in the data parameter. Each identity provider may have a unique set of types that it is able to handle. See the identity provider's documentation for details on valid types.

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 for this operation.

data

The data entry to set.

success_cb

The function that is invoked upon successful operation of this function.

failure_cb

The function that is invoked when this function fails. This callback contains an errorCode parameter to specify the failure condition.

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 success or failure 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.

request_id

An updated pointer to the request ID that can be used to match the response to the request.

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.

Requests that do not complete successfully result in the failure callback being called with one of the following result codes: IDS_DEFAULT_ERROR: An internal error occurred while attempting to process the request.IDS_NOT_READY: The identity provider is not ready to process the request.IDS_NOT_ENOUGH_RESOURCES: There are not enough resources available to process the request.IDS_ACCOUNT_LOCALLY_LOCKED_OUT: The account is currently locked; access is unavailable while the account is locked.IDS_USER_COULD_NOT_BE_AUTHENTICATED: The user could not be authenticated.IDS_NULL_OR_UNKNOWN_PARAMETERS: Null or invalid parameter.IDS_DOES_NOT_EXIST: An entry with the given name does not exist.IDS_NOT_ALLOWED: The application is not allowed to perform this operation.IDS_ERROR_WHILE_CONTACTING_SERVICE: The identity provider was unable to communicate with its service to perform the operation.USER_RESOURCE_NAME_TOO_LONG: The name is longer than the maximum length allowed by the identity provider.IDS_QUOTA_EXCEEDED: The data quota set by the identity provider has been exceeded.

Returns:

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