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>C Specification</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 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. 64<BR> <code>NWC24_ERR_LIB_NOT_OPENED</code>: the library is not open. (It must be open to perform checks.)<BR> <code>NWC24_ERR_DISABLED</code>: disabled in the console settings and unavailable.<BR> <code>NWC24_ERR_PROTECTED</code>: user-to-user communication is restricted through the use of Parental Controls.<BR> <code>NWC24_ERR_NETWORK</code>: problem related to network connections has occurred.<BR> <code>NWC24_ERR_SERVER</code>: problem related to server connections has occurred. (Only occurs when <code>NWC24_USE_MESSAGES</code> is selected.)<BR> <code>NWC24_ERR_FULL</code>: outbox is full. (Only occurs when <code>NWC24_USE_MESSAGES</code> is selected.)<BR> <code>NWC24_ERR_FATAL</code>: fatal error, other than those above, has occurred and prevents further operation.<BR></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>X</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 simply get only the status of Parental Controls settings, use <CODE>SCCheckPCMessageRestriction</CODE>, included in the Revolution SDK.) 124</P> 125 126<H2>See Also</H2> 127<P> 128<A href="NWC24GetErrorCode.html"><CODE>NWC24GetErrorCode</CODE></A><BR> <BR> <A href="../ErrorHandling/intro.html">NWC24 Error Handling Sequence</A><BR><A HREF="../ErrorHandling/ERR_NWC24CheckMsg.html"><CODE>NWC24Check</CODE>(Message) Error Handling Sequence</A><BR> <A HREF="../ErrorHandling/ERR_NWC24CheckDl.html"><CODE>NWC24Check</CODE> (Download) Error Handling Sequence</A><BR> 129</P> 130 131<H2>Revision History</H2> 132<P> 1332007/11/13 Revised text specific to the order of internal determinations. 134<BR> 2007/9/10 In addition to adding information on Parental Controls to the guidelines, made changes such that <CODE>NWC24_ERR_PROTECTED</CODE> may be returned in all instances. <BR> 2007/08/23 Added links to the error handling sequences. <BR> 2007/07/30 Updated a table of return values and made other revisions. <BR> 2007/7/13 Added text describing <CODE>NWC24_USE_SETTINGS</CODE>, made other revisions. <BR> 2007/04/05 Made partial revisions to descriptions of conditions. <BR> 2006/12/05 Initial version.</P> 135 136<hr><p>CONFIDENTIAL</p></body> 137</HTML>