credential_query_result_get_first()

Retrieve the first credential from query result.

Synopsis:

#include <sys/credential/credential_store.h>
 
int credential_query_result_get_first(const credential_query_result_t *result,
                                      credential_t **cred)

Since:

BlackBerry 10.3.1

Arguments:

result

The credential query result.

cred

On return, a pointer to the first credential in iteration. If query did not produce any results, then this pointer will be set to 0. The memory for the returned credential is owned by the underlying query result. If you need a private copy of the credential, call credential_close() to create a copy.

Library:

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

Description:

This is a convenience function that returns the first credential from a query result. The returned credential is owned by the query result and will be released when the query result is released.

Returns:

0 if operation was successful, error code otherwise.