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 http-equiv="Content-Style-Type" content="text/css">
7<LINK rel="stylesheet" type="text/css" href="../CSS/revolution.css">
8<title>NANDGetAvailableAreaAsync</title>
9</head>
10
11<body>
12
13<h1>NANDGetAvailableAreaAsync</h1>
14
15<h2>Syntax</h2>
16<dl><dd><pre class="construction">
17#include &lt;revolution/nand.h&gt;
18
19typedef void (*NANDCallback)( s32 result, NANDCommandBlock *block );
20
21s32 NANDGetAvailableAreaAsync( u32 *fsBlock, u32 *inode, NANDCallback cb, NANDCommandBlock *block );
22</pre></dd></dl>
23
24<h2>Arguments</h2>
25<p>
26<TABLE class="arguments" border="1" >
27  <tr>
28<TH>fsBlock</TH>
29<TD>Pointer to a u32 type variable. Stores the usable FS block count (0 =&lt; *<SPAN class="argument">fsBlock</SPAN> =&lt; 1024).</TD>
30  </tr>
31  <tr>
32<TH>inode</TH>
33<TD>Pointer to a u32 type variable. Stores the usable i-node count (0 =&lt; *<SPAN class="argument">inode</SPAN> =&lt; 32).</TD>
34  </tr>
35  <tr>
36<TH>cb</TH>
37<TD>Callback function to call when this function completes processing.</TD>
38  </tr>
39  <tr>
40<TH>block</TH>
41<TD>Command block structure to be passed to the callback function.</TD>
42  </tr>
43</TABLE>
44</p>
45
46<h2>Return Values</h2>
47<p>
48The result codes that may be returned by <code>NANDGetAvailableAreaAsync</code> are listed below. Returns <CODE>NAND_RESULT_OK</CODE> when the request begins normally.
49<p>
50<code>
51NAND_RESULT_OK<br>
52NAND_RESULT_ACCESS<br>
53NAND_RESULT_ALLOC_FAILED<br>
54NAND_RESULT_BUSY<br>
55NAND_RESULT_INVALID<br>
56NAND_RESULT_FATAL_ERROR<br>
57</code>
58</p>
59<p>
60The result codes that may be passed to the callback function are listed below.
61</p>
62<p>
63<code>
64NAND_RESULT_OK<br>
65NAND_RESULT_INVALID<br>
66NAND_RESULT_UNKNOWN<br>
67NAND_RESULT_FATAL_ERROR<br>
68</code>
69</p>
70</p>
71
72<h2>Description</h2>
73<p>
74Asynchronously gets the upper limit of the FS block count and the i-node count of the file/directory that can be created by the application program (under the home directory). The upper limit in the home directory is set to 16MB and 32 i-nodes, respectively. The range of values that can be obtained through this function will be as shown in the above table. Even if the application has not created anything in the home directory, the value obtained through this function will be small if most of the user area is used by other applications.
75</p>
76<p>
77This function essentially provide the same features as <a href="./NANDCheckAsync.html"><CODE>NANDCheckAsync</CODE></a>. Use this function when creating new files and directories if you want to inform the player about the availability in Wii console NAND memory.
78</p>
79
80<h2>See Also</h2>
81<p class="reference">
82<a href="./NANDGetAvailableArea.html">NANDGetAvailableArea</a>,
83<a href="./NANDCheck.html">NANDCheck</a>,
84<a href="./NANDCheckAsync.html">NANDCheckAsync</a>,
85<a href="./NANDFreeBlocks.html">NANDFreeBlocks</a>,
86<a href="./NANDFreeBlocksAsync.html">NANDFreeBlocksAsync</a>
87</p>
88
89<h2>Revision History</h2>
90<p>
912008/08/01 Revised the result codes that are passed to the callback function.<br>2008/05/13 Described the result codes passed to the callback function.<br>2006/11/30 Deleted text about being an alternative to <CODE>NANDCheck[Async]</CODE>.<br>2006/10/25 Initial version. <br>
92</p>
93
94<hr><p>CONFIDENTIAL</p></body>
95</html>
96