#include <revolution/nwc24.h>
NWC24Err NWC24Check( u32 usageType );
Checks the operational status of the WiiConnect24 system. If there are problems with the system, an error corresponding to the problem is returned.
This function must be called once each time operations such as the following are performed using NWC24 features to confirm that the system is available.
usageType |
Indicates the purpose of use.
|
NWC24_OK: operating normally.
NWC24_ERR_LIB_NOT_OPENED: the library is not open. (It must be open to perform checks.)
NWC24_ERR_DISABLED: disabled in the console settings and unavailable.
NWC24_ERR_PROTECTED: user-to-user communication is restricted through the use of Parental Controls.
NWC24_ERR_NETWORK: problem related to network connections has occurred.
NWC24_ERR_SERVER: problem related to server connections has occurred. (Only occurs when NWC24_USE_MESSAGES is selected.)
NWC24_ERR_FULL: outbox is full. (Only occurs when NWC24_USE_MESSAGES is selected.)
NWC24_ERR_FATAL: fatal error, other than those above, has occurred and prevents further operation.
The combinations of return values that can be generated for each value of the usageType argument are as follows (excluding NWC24_ERR_LIB_NOT_OPENED).
| Return Values | NWC24_USE_MESSAGES |
NWC24_USE_DOWNLOADS |
NWC24_USE_SETTINGS |
NWC24_OK |
X | X | X |
NWC24_ERR_DISABLED |
X | X | X |
NWC24_ERR_PROTECTED |
X | X | X |
NWC24_ERR_NETWORK |
X | X | X |
NWC24_ERR_SERVER |
X | ||
NWC24_ERR_FULL |
X | ||
NWC24_ERR_FATAL |
X | X |
If a value other than NWC24_OK or NWC24_ERR_LIB_NOT_OPENED is returned, you must perform appropriate error handling. Refer to the NWC24Check Error Handling Sequence for Messages and Downloads. Also, by calling NWC24GetErrorCode() immediately afterwards, you can obtain the 6-digit error code required to display an error message.
Internally, 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 NWC24_ERR_DISABLED 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 SCCheckPCMessageRestriction, included in the Revolution SDK.)
NWC24GetErrorCode
NWC24 Error Handling SequenceNWC24Check(Message) Error Handling Sequence
NWC24Check (Download) Error Handling Sequence
2007/11/13 Revised text specific to the order of internal determinations.
2007/9/10 In addition to adding information on Parental Controls to the guidelines, made changes such that NWC24_ERR_PROTECTED may be returned in all instances.
2007/08/23 Added links to the error handling sequences.
2007/07/30 Updated a table of return values and made other revisions.
2007/7/13 Added text describing NWC24_USE_SETTINGS, made other revisions.
2007/04/05 Made partial revisions to descriptions of conditions.
2006/12/05 Initial version.
CONFIDENTIAL