cwbUN_GetAdminCacheState

Purpose

This API indicates whether the next invocation of the cwbUN_GetAdminValue API will be long running. The cwbUN_GetAdminValue API caches data on the PC. If the cache is not current, cwbUN_GetAdminValue may present a sign-on prompt, or perform other processing, in order to update its cache.

Syntax

CWBAPI unsigned int WINAPI cwbUN_GetAdminCacheState(
    const char * szSystemName,
    cwbUN_State& adminState);

Parameters

const char * szSystemName
The name of the iSeries™ system on which to perform the check.
cwbUN_State& adminState
Indicates if the next invocation of the cwbUN_GetAdminValue API will be long running or if it will use its internal cache to return without accessing the host iSeries server.

One of three values will be returned:

cwbUN_logon
There is no current user for the specified iSeries server. The cwbUN_GetAdminValue API may present a sign-on prompt.
cwbUN_refresh
cwbUN_GetAdminValue will access the iSeries server to update its internal cache.
cwbUN_cache
cwbUN_GetAdminValue has a current cache and should not be long running.

Return Codes

The following list shows common return values:

CWB_OK
The API was successful.

Usage

This API can be used by users of cwbUN_GetAdminValue to determine if the next invocation of cwbUN_GetAdminValue will be long running.