1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html> 3 4<head> 5<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 6<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 6.5.0.0 for Windows"> 7<META http-equiv="Content-Style-Type" content="text/css"> 8<LINK rel="stylesheet" type="text/css" href="../CSS/revolution.css"> 9<title>DVDCancelAll</title> 10</head> 11 12<body> 13 14<h1>DVDCancelAll<br> DVDCancelAllAsync</h1> 15 16 17<h2>C Specification</h2> 18 19<dl> 20<dd><pre><code>#include <revolution/dvd.h></code></pre> 21 </dd> 22<dd><pre><code>typedef void (*DVDCBCallback)(s32 result, <a href="DVDCommandBlock.html">DVDCommandBlock</a>* block);</code></pre></dd> 23<dd><pre><code>s32 DVDCancelAll(void);</code><br><code>BOOL DVDCancelAllAsync(DVDCBCallback callback);</code></pre></dd> 24</dl> 25<H2>Arguments</H2> 26<TABLE border="1" cellpadding="3" cellspacing="0.1"> 27 <TBODY> 28 <TR> 29<TD width="120" bgcolor="#ffffe8"><EM><STRONG><CODE>callback</CODE></STRONG></EM></TD> 30<TD width="520">Callback function that indicates completion. If a callback is unnecessary, specify <CODE>NULL</CODE>. </TD> 31 </TR> 32 </TBODY> 33</TABLE> 34<H2>Return Values</H2> 35<P><CODE>DVDCancelAll</CODE>: <CODE>0</CODE> if cancel succeeds and <CODE>-1</CODE> if cancel fails. </P> 36<P><CODE>DVDCancelAllAsync</CODE>: <CODE>TRUE</CODE> if cancel succeeds and <CODE>FALSE</CODE> if cancel fails.</P> 37<h2>Description</h2> 38 39<P>The <code>DVDCancelAllAsync</code> function cancels all DVD commands in the DVD queue and the executing command. When the command is completed, the <STRONG><EM><CODE>callback</CODE></EM></STRONG> function is called unless <CODE>NULL</CODE> is specified for <STRONG><EM><CODE>callback</CODE></EM></STRONG>. In the callback function, 0 is passed as <STRONG><em><code>result</code></em></STRONG>, and the command block of the command that executes when the <code>DVDCancelAllAsync</code> function is called is passed as <STRONG><em><code>block</code></em></STRONG>. (If no DVD command is processed when the function is called, NULL is passed as <em><code>block</code></em>.)</P> 40<P><code>DVD_RESULT_CANCELED</code> will be passed to all canceled functions. In other words, canceled synchronous functions return <code>DVD_RESULT_CANCELED</code>. If a callback is specified for canceled asynchronous functions, <code>DVD_RESULT_CANCELED</code> will be passed as <STRONG><em><code>result</code></em></STRONG> to the callback function. The order in which callback functions are called doesn’t match the order in which requests are processed. Because the executing request can take time, its callback could be called last.</P> 41<P>If an issued cancel is successful, the <code>DVDCancelAllAsync</code> function returns <CODE>TRUE</CODE>. Otherwise, <CODE>FALSE</CODE> is returned. <CODE>FALSE</CODE> can be returned if the DVD library is currently processing a cancel. In this case, a cancel is not performed.</P> 42<P>The <code>DVDCancelAll</code> function is the synchronous version of the <code>DVDCancelAllAsync</code> function. This function doesn't return until cancel completes. This function returns 0 if cancel succeeds and -1 otherwise. The conditions for a cancel to fail are the same as the conditions for the <code>DVDCancelAllAsync</code> function.</P> 43<P>You can issue the <code>DVDCancelAll(Async)</code> function if no DVD commands are processing.</P> 44 45<p>The <CODE>DVDCancelAll</CODE> function may put the current thread to sleep. Refer to <a href="../os/Interrupt/intro.html">Interrupts and Callback Functions</a>.</p> 46 47<h2>See Also</h2> 48<p><a href="DVDCancel.html"><code>DVDCancel(Async)</code></a><BR> <a href="../os/Interrupt/intro.html">Interrupts and Callback Functions</a></p> 49<H2>Revision History</H2> 50<P>2007/09/25 Added explanation on thread behavior.<BR> 2006/03/01 Initial version.</P> 51<hr><p>CONFIDENTIAL</p></body> 52</html> 53