qResult LoginAndRequestAuthenticationToken( ProtocolCallContext * pContext, qUnsignedInt32 gameServerId, const qChar * pAccessKey, const qChar8 * pKeyHash, qChar8 * pAuthToken, TimeInterval uiTimeout = 30000, PrincipalID principalId = INVALID_PRINCIPALID );
Name | Description | |
---|---|---|
in | pContext | The call context. Do not use this call context to set or cancel a timeout. |
in | gameServerId | Game server ID. |
in | pAccessKey | Access key for the game server. |
in | pKeyHash | Key hash value. |
out | pAuthToken | Authentication token receive buffer. The buffer size must be at least IndependentServer::AUTH_TOKEN_SIZE . |
in | uiTimeout | Timeout (in milliseconds). The default value is 30 seconds. |
in | principalId | Specify either INVALID_PRINCIPALID (the default) or the principal ID of the local system. |
Value | Description |
---|---|
QSUCCESS(Core,Success) |
Successfully started the login process. |
QERROR(Core,Timeout) |
A timeout occurred. |
QERROR(Core,InvalidArgument) |
Invalid argument. |
QERROR(Core,OperationAborted) |
Either the system is currently logging in, logging out, or terminating, or the system is currently online. |
QERROR(FPD,NotInitialized) |
The friend library is not initialized. |
QERROR(FPD,NotConnected) |
Not logged in to NFS. |
QERROR(FPD,InvalidPrincipalID) |
The principalId passed in the argument is neither INVALID_PRINCIPALID nor the principal ID of the system. |
Performs login processing and requests the authentication token of an independent server.
This function combines the processes of the Login
and IndependentServer::RequestAuthenticationToken
functions. For more information about each function, see the respective API Reference Manuals.
Use the CallContext::GetOutcome
function to determine whether the asynchronous process succeeded or failed. If it failed, use the GetLastLoginErrorCode
function to get the network error code.
QRESULT_SUCCESS
and QRESULT_ERROR
return values to QSUCCESS
and QERROR
.
CONFIDENTIAL