1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<HTML> 3<HEAD> 4<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 5<META http-equiv="Content-Style-Type" content="text/css"> 6<TITLE>NWC24Check</TITLE> 7<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css"> 8</HEAD> 9<BODY> 10<H1>NWC24Check</H1> 11 12<H2>Syntax</H2> 13<DL> 14 <DD><PRE><CODE>#include <revolution/nwc24.h></CODE></PRE> 15 <DD><PRE><CODE><A HREF="../Types/NWC24Err.html">NWC24Err</A> NWC24Check( u32 <EM>usageType</EM> );</CODE></PRE> 16</DL> 17 18<H2>Description</H2> 19<P> 20Checks the operational status of the WiiConnect24 system. If there are problems with the system, an error corresponding to the problem is returned.<BR> 21</P> 22<P> 23This function must be called once each time operations such as the following are performed using <CODE>NWC24</CODE> features to confirm that the system is available. 24<UL> 25<LI>When creating a message to send to another Wii or external e-mail address.</LI> 26<LI>When enabling the settings for the feature that sends messages automatically in the application.</LI> 27<LI>When making reservations for a download task.</LI> 28<LI>When accessing content that is assumed to be the most recent version, obtained by a download task.</LI> 29</UL> 30</P> 31 32<H2>Arguments</H2> 33<TABLE border="1" cellpadding="3" cellspacing="0.1"> 34 <TR> 35<TD width="120" bgcolor="#ffffe8"><code><em><strong>usageType</strong></em></code></TD> 36 <TD width="520"> 37Indicates the purpose of use.<BR> 38 <TABLE width="500" border="1" cellspacing="0.1"> 39 <tr> 40<TD width="150" bgcolor="#C0C0C0">Name</TD> 41<TD width="350" bgcolor="#C0C0C0">Description</TD> 42 </tr> 43 <tr> 44<TD width="150"><code>NWC24_USE_MESSAGES</code></TD> 45<TD width="350">When using message or Wii Friend Roster features.</TD> 46 </tr> 47 <tr> 48<TD width="150"><code>NWC24_USE_DOWNLOADS</code></TD> 49<TD width="350">When using download task features.</TD> 50 </tr> 51 <tr> 52<TD width="150"><code>NWC24_USE_SETTINGS</code></TD> 53<TD width="350">If the only task required is to check the Wii settings.</TD> 54 </tr> 55 </TABLE> 56(<B>Note:</B> When using both the message and download features, be sure to specify for each and call twice.)<BR> 57 </TD> 58 </TR> 59</TABLE> 60 61<h2>Return Values</h2> 62<P> 63<code>NWC24_OK</code>: Operating normally.<BR> <code>NWC24_ERR_LIB_NOT_OPENED</code>: Library is not open (must be open to perform the check).<BR> <code>NWC24_ERR_DISABLED</code>: Not usable because it is disabled in the Wii settings.<BR> <code>NWC24_ERR_PROTECTED</code>: User-to-user communications are restricted by Parental Controls.<BR> <code>NWC24_ERR_NETWORK</code>: Problem with network connection or settings.<BR> <code>NWC24_ERR_SERVER</code>: Problem with server connection (returned only if <code>NWC24_USE_MESSAGES</code> has been selected).<BR> <code>NWC24_ERR_FULL</code>: The outbox is full (returned only if <code>NWC24_USE_MESSAGES</code> has been selected).<BR> <code>NWC24_ERR_FATAL</code>: Not functioning because of a fatal error other than the above.<BR> 64</P> 65<P> 66The combinations of return values that can be generated for each value of the <code><em><strong>usageType</strong></em></code> argument are as follows (excluding <code>NWC24_ERR_LIB_NOT_OPENED</code>). <BR> 67<TABLE width="600" border="1" cellspacing="0.1"> 68 <tr> 69 <TD width="150" bgcolor="#C0C0C0">Return Values</TD> 70 <TD width="150" bgcolor="#C0C0C0"><code>NWC24_USE_MESSAGES</code></TD> 71 <TD width="150" bgcolor="#C0C0C0"><code>NWC24_USE_DOWNLOADS</code></TD> 72 <TD width="150" bgcolor="#C0C0C0"><code>NWC24_USE_SETTINGS</code></TD> 73 </tr> 74 <tr> 75 <TD width="150"><code>NWC24_OK</code></TD> 76 <TD width="150" align="center"><STRONG>X</STRONG></TD> 77 <TD width="150" align="center"><STRONG>X</STRONG></TD> 78 <TD width="150" align="center"><STRONG>X</STRONG></TD> 79 </tr> 80 <tr> 81 <TD width="150"><code>NWC24_ERR_DISABLED</code></TD> 82 <TD width="150" align="center"><STRONG>X</STRONG></TD> 83 <TD width="150" align="center"><STRONG>X</STRONG></TD> 84 <TD width="150" align="center"><STRONG>X</STRONG></TD> 85 </tr> 86 <tr> 87 <TD width="150"><code>NWC24_ERR_PROTECTED</code></TD> 88 <TD width="150" align="center"><STRONG>X</STRONG></TD> 89 <TD width="150" align="center"><STRONG> </STRONG></TD> 90 <TD width="150" align="center"><STRONG>X</STRONG></TD> 91 </tr> 92 <tr> 93 <TD width="150"><code>NWC24_ERR_NETWORK</code></TD> 94 <TD width="150" align="center"><STRONG>X</STRONG></TD> 95 <TD width="150" align="center"><STRONG>X</STRONG></TD> 96 <TD width="150" align="center"><STRONG>X</STRONG></TD> 97 </tr> 98 <tr> 99 <TD width="150"><code>NWC24_ERR_SERVER</code></TD> 100 <TD width="150" align="center"><STRONG>X</STRONG></TD> 101 <TD width="150"> </TD> 102 <TD width="150"> </TD> 103 </tr> 104 <tr> 105 <TD width="150"><code>NWC24_ERR_FULL</code></TD> 106 <TD width="150" align="center"><STRONG>X</STRONG></TD> 107 <TD width="150"> </TD> 108 <TD width="150"> </TD> 109 </tr> 110 <tr> 111 <TD width="150"><code>NWC24_ERR_FATAL</code></TD> 112 <TD width="150" align="center"><STRONG>X</STRONG></TD> 113 <TD width="150" align="center"><STRONG>X</STRONG></TD> 114 <TD width="150"> </TD> 115 </tr> 116</TABLE> 117</P> 118 119<P> 120If a value other than <code>NWC24_OK</code> or <code>NWC24_ERR_LIB_NOT_OPENED</code> is returned, you must perform appropriate error handling. Refer to the <CODE>NWC24Check</CODE> Error Handling Sequence for <A href="../ErrorHandling/ERR_NWC24CheckMsg.html">Messages</A> and <A href="../ErrorHandling/ERR_NWC24CheckDl.html">Downloads</A>. Also, by calling <A href="NWC24GetErrorCode.html"><CODE>NWC24GetErrorCode()</CODE></A> immediately afterwards, you can obtain the 6-digit error code required to display an error message. 121</P> 122<P> 123Internally, the order of determinations is: Is WiiConnect24 enabled in the console settings? What level of Parental Controls are set? Network connection issues? Other fatal errors? Is the outbox full? The first detected error is returned. For example, because <CODE>NWC24_ERR_DISABLED</CODE> is always returned when WiiConnect24 is disabled, it's not possible to get the status of Parental Controls settings in that situation. (To get just the status of Parental Controls settings, use the <CODE>SCCheckPCMessageRestriction</CODE> function, included in the Revolution SDK.)</P> 124<P> 125For the <code>NWC24_ERR_NETWORK</code> and <code>NWC24_ERR_SERVER</code> errors, because an error is reflected at the point where the WiiConnect24 scheduler activates just before, there are cases where the status of the latest network connection cannot be reflected. When <code>NWC24_USE_SETTINGS</code> is specified for the <code><strong><EM>usageType</EM></strong></code>, the <code>NWC24_ERR_NETWORK</code> error is returned only when the network setting does not exist. 126</P> 127 128<H2>See Also</H2> 129<P> 130<A href="NWC24GetErrorCode.html"><CODE>NWC24GetErrorCode</CODE></A><BR> 131<A href="../ErrorHandling/intro.html">NWC24 Error Handling Sequence</A><BR> 132<A HREF="../ErrorHandling/ERR_NWC24CheckMsg.html"><CODE>NWC24Check</CODE>(Message) Error Handling Sequence</A><BR> 133<A HREF="../ErrorHandling/ERR_NWC24CheckDl.html"><CODE>NWC24Check</CODE> (Download) Error Handling Sequence</A><BR> 134</P> 135 136<H2>Revision History</H2> 137<P> 1382008/09/02 Added supplementary description of the <code>NWC24_ERR_NETWORK</code> and <code>NWC24_ERR_SERVER</code> errors. <BR> 2008/03/06 Following modifications to Parental Controls items in the guidelines, <code>NWC24_ERR_PROTECTED</code> is no longer returned when <code>NWC24_USE_DOWNLOADS</code> is specified. <BR>2007/11/13 Described the order of internal decisions. <CODE>2007/09/10 Following the addition of Parental Controls items to the guidelines, </CODE>NWC24_ERR_PROTECTED<CODE> will sometimes be returned in all situations. </CODE>2007/08/23 Added a reference to the error processing sequence. <CODE>2007/07/30 Added a table of return values and made other revisions. <CODE>2007/07/13 Described <code>NWC24_USE_SETTINGS</code> and made other revisions. <CODE>2007/04/05 Revised some descriptions of conditions. <CODE>2006/12/05 Initial version. 139</P> 140 141<hr><p>CONFIDENTIAL</p></body> 142</HTML>