int bone_login(BONEHANDLE bhnd, const char *username, const char *password)

Description
Logs into the Bone server.

Callback
BONE_CALLBACK_LOGIN

Notes
The function parameters are the BONEHANDLE, Bone username, and password.  Note that if bone_login fails the BONEHANDLE is destroyed.

Example

bone_setcallback(BONE_CALLBACK_LOGIN, callback_login);

BONEHANDLE bnd;
bnd = bone_create();
if (!bnd)
{
    printf("Unable to create BONEHANDLE.\n");
    exit(1);
}
else
{
    if (bone_login(bnd,"boneuser","bonepass"))
        printf("Unable to call bone_login (reason %d).\n",bone_getlasterror());
}
 
 

void callback_login(BONEHANDLE bnd, int errorcode)
{
    if (errorcode)
    {
        printf("Unable to login to Bone (reason: %d).",errorcode);
        exit(1);
    }
}