#include <revolution/dvd.h>
typedef void (*DVDCBCallback)(s32 result, DVDCommandBlock* block);s32 DVDCancelAll(void);BOOL DVDCancelAllAsync(DVDCBCallback callback);callback |
Callback function that indicates completion. If a callback is unnecessary, specify NULL. |
DVDCancelAll: 0 if cancel succeeds and -1 if cancel fails.
DVDCancelAllAsync: Returns TRUE if cancellation is successful; otherwise, returns FALSE.
The DVDCancelAllAsync function cancels all DVD commands in the DVD queue and the executing command. When the command is completed, the callback function is called unless NULL is specified for callback. In the callback function, 0 is passed as result and the command block of the command that executes when the DVDCancelAllAsync function is called is passed as block. (If no DVD command is processed when the function is called, NULL is passed as block).)
DVD_RESULT_CANCELED will be passed to all canceled functions. In other words, canceled synchronous functions return DVD_RESULT_CANCELED. If a callback is specified for canceled asynchronous functions, DVD_RESULT_CANCELED will be passed as result to the callback function. The order callback functions are called in doesn’t match the order that requests are processed in. Because the executing request can take time, its callback could be called last.
If an issued cancel is successful, the DVDCancelAllAsync function returns TRUE. Otherwise, FALSE is returned. FALSE can be returned if the DVD library is currently processing a cancel. In this case, a cancel is not performed.
The DVDCancelAll function is the synchronous version of the DVDCancelAllAsync function. The DVDCancelAll function doesn't return until a cancel completes. This function returns 0 if cancel succeeds and -1 if otherwise. The conditions for a cancel to fail are the same as the conditions for the DVDCancelAllAsync function.
You can issue the DVDCancelAll(Async) function if no DVD commands are processing.
03/01/2006 Initial version.