Aw citizen previous
Minimum requirements | ||
---|---|---|
Added in version 2.1 | ||
SDK | build 13 |
int aw_citizen_previous (void)
Description
Returns attributes of the previous citizen in the citizen database.
Callback
AW_CALLBACK_CITIZEN_ATTRIBUTES
Notes
The citizen with the next lowest citizen number after the current value of AW_CITIZEN_NUMBER is returned. To lookup the last citizen in the universe, set AW_CITIZEN_NUMBER to 0 before calling this method.
Arguments
None
Argument attributes
Return values
- RC_SUCCESS (1) (2)
- RC_NOT_INITIALIZED (1)
- RC_NO_INSTANCE (1)
- RC_NO_CONNECTION (1)
- The connection to the universe is down.
- RC_NOT_AVAILABLE (1)
- The calling instance must be owned by the root account (citizen #1 - universe administrator).
- RC_UNAUTHORIZED (2)
- The calling instance must be owned by the root account (citizen #1 - universe administrator).
- RC_NO_SUCH_CITIZEN (2)
(1) Possible return values when a callback is installed.
(2) Returned by the universe server.
Returned attributes
- AW_CITIZEN_NUMBER
- AW_CITIZEN_NAME
- AW_CITIZEN_PASSWORD
- AW_CITIZEN_EMAIL
- AW_CITIZEN_ENABLED
- AW_CITIZEN_BETA
- AW_CITIZEN_TRIAL
- AW_CITIZEN_CAV_ENABLED
- AW_CITIZEN_PAV_ENABLED
- AW_CITIZEN_BOT_LIMIT
- AW_CITIZEN_COMMENT
- AW_CITIZEN_EXPIRATION_TIME
- AW_CITIZEN_IMMIGRATION_TIME
- AW_CITIZEN_LAST_LOGIN
- AW_CITIZEN_PRIVILEGE_PASSWORD
- AW_CITIZEN_PRIVACY
- AW_CITIZEN_TOTAL_TIME
- AW_CITIZEN_URL
The attributes AW_CITIZEN_COMMENT, AW_CITIZEN_ENABLED, AW_CITIZEN_TOTAL_TIME, and AW_CITIZEN_URL are new in version 3.1 and require at least build 18 of the SDK and version 3.1 of the uniserver.
The attributes AW_CITIZEN_PRIVACY, AW_CITIZEN_TRIAL and AW_CITIZEN_CAV_ENABLED are new in version 4.1 and require at least build 55 of the SDK and version 4.1 of the uniserver build 82.
Usage
Print the names of the universe's ten most recent citizens.
int i; aw_int_set (AW_CITIZEN_NUMBER, 0); for (i = 0; i < 10; i++) { if (aw_citizen_previous () != RC_SUCCESS) break; printf ("%s\n", aw_string (AW_CITIZEN_NAME)); }