Lists all the worlds installed in a world server.
AW_CALLBACK_ADMIN_WORLD_LIST
This method is new in Active Worlds 3.1 and requires at least SDK build 18 and world server build 28.
This is an administration mode method and can only be used by instances created with aw_server_admin.
aw_server_world_list returns a list of all world configurations currently installed in a world server. The individual world configurations are returned via the event AW_EVENT_ADMIN_WORLD_INFO. The attribute AW_SERVER_ID must be set to 0 before the first call to aw_server_world_list.
A single call to aw_server_world_list may not be enough to return all the world configurations in a server. Applications should check the value of AW_SERVER_MORE to determine if more calls to aw_server_world_list are needed. Subsequent calls use the value of AW_SERVER_ID to determine where to continue from.
void handle_world_info (void)
{
printf ("%s\n", aw_string (AW_SERVER_NAME));
}
void list_worlds (void)
{
int rc;
/* list the names of all worlds in this server */
aw_callback_set (AW_CALLBACK_ADMIN_WORLD_LIST, NULL);
aw_event_set (AW_EVENT_ADMIN_WORLD_INFO, handle_world_info);
aw_int_set (AW_SERVER_ID, 0);
do
if (rc = aw_server_world_list ()) {
printf ("Unable to query world list (reason %d)\n", rc);
break;
}
while (aw_bool (AW_SERVER_MORE));
}
aw_server_admin
aw_server_world_add
aw_server_world_change
aw_server_world_delete
aw_server_world_set
aw_server_world_start
aw_server_world_stop