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>NANDSetStatusAsync</title> 9</head> 10 11<body> 12 13<h1>NANDSetStatusAsync</h1> 14 15<h2>Syntax</h2> 16<dl><dd><pre class="construction">#include <revolution/nand.h> 17 18typedef void (*NANDCallback)( s32 result, NANDCommandBlock *block ); 19 20s32 NANDSetStatusAsync( const char *path, const NANDStatus *stat, NANDCallback cb, NANDCommandBlock *block ); 21</pre></dd></dl> 22 23<h2>Arguments</h2> 24<p> 25<TABLE class="arguments" border="1" > 26 <tr> 27<TH>path</TH> 28<TD>Specifies the path of the target file or directory.</TD> 29 </tr> 30 <tr> 31<TH>stat</TH> 32<TD>Pointer to a <CODE>NANDStatus</CODE> structure.</TD> 33 </tr> 34 <tr> 35<TH>cb</TH> 36<TD>Callback function to call when this function completes processing.</TD> 37 </tr> 38 <tr> 39<TH>block</TH> 40<TD>Command block structure to be passed to the callback function.</TD> 41 </tr> 42</TABLE> 43</p> 44 45<h2>Return Values</h2> 46<p> 47The result codes that may be returned by <code>NANDSetStatusAsync</code> are listed below. Returns <CODE>NAND_RESULT_OK</CODE> when the request begins normally. 48<p> 49<code> 50NAND_RESULT_OK<br> 51NAND_RESULT_ACCESS<br> 52NAND_RESULT_ALLOC_FAILED<br> 53NAND_RESULT_BUSY<br> 54NAND_RESULT_INVALID<br> 55NAND_RESULT_FATAL_ERROR<br> 56</code> 57</p> 58<p> 59The result codes that may be passed to the callback function are listed below. 60</p> 61<p> 62<code> 63NAND_RESULT_OK<br> 64NAND_RESULT_ACCESS<br> 65NAND_RESULT_CORRUPT<br> 66NAND_RESULT_INVALID<br> 67NAND_RESULT_NOEXISTS<br> 68<S>NAND_RESULT_NOTEMPTY</S><br> 69NAND_RESULT_UNKNOWN<br> 70NAND_RESULT_FATAL_ERROR<br> 71</code> 72</p> 73</p> 74 75<H2>Description</H2> 76<p> 77Sets the status of the specified file or directory asynchronously. This operation cannot be performed if the file or directory has an owner ID that is different from the owner ID of the application.<S>If this operation is performed on a file, the file size must be zero.</S></S> Permission can be specified with the <CODE>permission</CODE> member variable of the <CODE>NANDStatus</CODE> structure. <font color="#ff0000">However, at the very least the <CODE>NAND_PERM_OWNER_READ</CODE> permission must be granted.</font>If the <CODE>NAND_PERM_OWNER_READ</CODE> permission is not granted, the function will return <CODE>NAND_RESULT_INVALID</CODE>. <code>NAND_RESULT_BUSY</code> is returned and this function call is denied when the queue for accepting requests inside the library is full. 78</p> 79 80<p> 81If this function is used on the home directory, the permissions will be initialized by the system when the application restarts. In order to avoid problems caused by the initialization of permissions, do not use this function on the home directory. 82</p> 83 84<h2>See Also</h2> 85<p class="reference"> 86<a href="./NANDStatus.html">NANDStatus</a>, 87<a href="./NANDGetStatus.html">NANDGetStatus</a>, 88<a href="./NANDGetStatusAsync.html">NANDGetStatusAsync</a>, 89<a href="./NANDSetStatus.html">NANDSetStatus</a> 90</p> 91 92<H2>Revision History</H2> 93<p> 942008/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>2007/12/10 Added a mention of the fact that the permissions for the home directory will be initialized by the system upon restarting.<br>2006/11/13 Added an explanation about the need to grant <CODE>NAND_PERM_OWNER_READ</CODE> permission.<br>2006/11/13 Deleted the section about restrictions on file size.<br>2006/06/16 Initial version.<BR> 95</p> 96 97<hr><p>CONFIDENTIAL</p></body> 98</html>