credential_net_identity_get_username()

Retrieve the username portion from identity name.

Synopsis:

#include <sys/credential/credential_net.h>
 
int credential_net_identity_get_username(const char *identity_name,
                                         char **username)

Since:

BlackBerry 10.3.1

Arguments:

identity_name

Identity name.

username

On return, a pointer to a string containing the username portion of the identity_name. The string is UTF-8 encoded and null-terminated. You must call credential_util_free() to release this string when you are finished using it.

Library:

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

Description:

Retrieve and return the user name from the network identity in a newly allocated buffer.

Returns:

0 if operation was successful, error code otherwise.