Aw cav request

From ActiveWiki
Revision as of 11:14, 2 November 2008 by Macavity (talk | contribs) (Cleanup)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


Minimum requirements
Added in version 4.2
SDKbuild 70


int aw_cav_request (int citizen, int session)

Description

Queries the custom universe avatar definition of a user.

Callback

AW_CALLBACK_CAV

Notes

It is possible for the custom avatar definition to have an uncompressed size of up to 40940 bytes. It can be 0 bytes long which would cause this method to succeed and return an empty AW_CAV_DEFINITION. The maximum compressed size is 4094 bytes.

Arguments

citizen
Citizen number, set to 0 for tourists and bots.
session
Session number, must be specified.

Argument attributes

None

Return values

RC_SUCCESS (1) (2)
RC_NO_CONNECTION (1)
The connection to the universe is down.
RC_UNAUTHORIZED (2)
No session number specified, or one that does not exist.
RC_NO_SUCH_SESSION (2)
(TODO: Only returned for requests made by root account?)
RC_NO_SUCH_CAV (2)
User has not defined a custom universe avatar.

(1) Possible return values when a callback is installed.

(2) Returned by the universe server.

Returned attributes

AW_CAV_CITIZEN
AW_CAV_SESSION
AW_CAV_DEFINITION

Usage

Query custom universe avatar definition of the current instance.

int rc;

rc = aw_cav_request (0, aw_session ());
if (rc != RC_SUCCESS)
  printf ("Unable to query custom universe avatar (reason %d)\n", rc);

See also