Miles Sound System SDK 7.2a

RAD_IOP_ASYNC_OPEN_DATA

The structure RAD_IOP_ASYNC_OPEN_DATA is a structure used with the RAD_IOPQueueAsyncOpenFile function.

struct RAD_IOP_ASYNC_OPEN_DATA
{
  CHAR_PTR name;
  RAD_IOP_OPENCALLBACK callback;
  U32 group;
  RAD_IOP_STATUS_VALUES status;
  S32 file_handle;
  U32 size;
};

In Members

name
Specifies the file name to open. This should be preceded with "cdrom0:", "host0:", or "hdd0:". For CD or DVD files, the filename should also end with a ";1".
callback
Specifies a callback that should be made upon completion. If you don't want to be called back, then set this field to zero.
group
Optional. Specifies the group identifier of this open. The group id allows you to cancel I/Os for an entire group of requests, if necessary.

Out Members

status
Contains the current status of the async open.
file_handle
Returns the open file handle, if status returns RAD_IOP_STATUS_DONE.
size
Returns the size of the open file.

Discussion

This structure is both the input and the output of the RAD_IOPQueueAsyncOpenFile function. You fill out the in parameters, and the RAD_IOP returns the out parameters.

If you don't have a callback set, then you can spin on the status field and wait for it to go greater than or equal to RAD_IOP_STATUS_COMPLETE. You then query the status for RAD_IOP_STATUS_DONE to determine if the open succeeded.


Group: The RAD_IOP API for the Sony PS2
Related Functions: RAD_IOPQueueAsyncOpenFile, RAD_IOP_OPENCALLBACK
Related Basic Types: CHAR_PTR, RAD_IOP_STATUS_VALUES, S32, U32

For technical support, e-mail Miles3@radgametools.com
© Copyright 1991-2007 RAD Game Tools, Inc. All Rights Reserved.