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 &lt;revolution/dvd.h&gt;</code></pre>
21  </dd>
22<dt><code>&nbsp;&nbsp;&nbsp; typedef void (*DVDCBCallback)(s32 result, <a     href="DVDCommandBlock.html">DVDCommandBlock</a>* block);</code></dt>
23  <dd>&nbsp;</dd>
24<dd><code>s32 DVDCancelAll(void);</code><br> <code>BOOL DVDCancelAllAsync(DVDCBCallback callback);</code></dd>
25</dl>
26<H2>Arguments</H2>
27<TABLE border="1" cellpadding="3" cellspacing="0.1">
28  <TBODY>
29    <TR>
30<TD width="120" bgcolor="#ffffe8"><EM><STRONG><CODE>callback</CODE></STRONG></EM></TD>
31<TD width="520">Callback function that indicates completion. If a callback is unnecessary, specify <CODE>NULL</CODE>. </TD>
32    </TR>
33  </TBODY>
34</TABLE>
35<H2>Return Values</H2>
36<P><CODE>DVDCancelAll</CODE>: <CODE>0</CODE> if cancel succeeds and -1 if cancel fails. </P>
37<P><CODE>DVDCancelAllAsync</CODE>: Returns TRUE if cancellation is successful; otherwise, returns FALSE. </P>
38<h2>Description</h2>
39
40<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>
41<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 callback functions are called in doesn&rsquo;t match the order that requests are processed in. Because the executing request can take time, its callback could be called last.</P>
42<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>
43<P>The <code>DVDCancelAll</code> function is the synchronous version of the <code>DVDCancelAllAsync</code> function. The <code>DVDCancelAll</code> 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 <code>DVDCancelAllAsync</code> function.</P>
44<P>You can issue the <code>DVDCancelAll(Async)</code> function if no DVD commands are processing.</P>
45<h2>See Also</h2>
46<p><a href="DVDCancel.html"><code>DVDCancel(Async)</code></a></p>
47<H2>Revision History</H2>
48<P>03/01/2006 Initial version.</P>
49</body>
50</html>
51