TWL DWC Library Constants

Constants

Definitions


#include <dwc.h>

#define   DWC_ND_FILENAME_LEN                     32
#define   DWC_ND_FILEATTR_LEN                     10
#define   DWC_ND_FILEEXPLSIN_LEN                  50
#define   DWC_ND_THREAD_PRIORITY                  17
#define   DWC_ND_LENGTH_GAMECODE                  4
#define   DWC_ND_LENGTH_PASSWORD                  16
#define   DWC_SVL_HOST_LENGTH                     64
#define   DWC_SVL_TOKEN_LENGTH                    300
#define   DWC_SVL_STATUSDATA_LENGTH               1

				

Description

DWC_ND_FILENAME_LEN Maximum string length for the filename specified when getting a file.
DWC_ND_FILEATTR_LEN Maximum string length for the attribute(s) specified before getting a file.
DWC_ND_FILEEXPLSIN_LEN Maximum string length of UTF16LE-format descriptive text specified for the file.
DWC_ND_THREAD_PRIORITY Thread priority used internally by the Download library.
DWC_ND_LENGTH_GAMECODE Byte length of DL game code (gamecd).
DWC_ND_LENGTH_PASSWORD Byte length of the secret key (passwd).
DWC_SVL_HOST_LENGTH Maximum number of characters in the host name.
DWC_SVL_TOKEN_LENGTH Maximum number of characters in the token.
DWC_SVL_STATUSDATA_LENGTH Status size.

Enumerated Types

Internet Connection Status

enum DWCInetResult {
    DWC_CONNECTINET_STATE_NOT_INITIALIZED    =  0,
    DWC_CONNECTINET_STATE_IDLE,
    DWC_CONNECTINET_STATE_OPERATING,
    DWC_CONNECTINET_STATE_OPERATED,
    DWC_CONNECTINET_STATE_CONNECTED,
    DWC_CONNECTINET_STATE_DISCONNECTING,
    DWC_CONNECTINET_STATE_DISCONNECTED,
    DWC_CONNECTINET_STATE_ERROR,
    DWC_CONNECTINET_STATE_FATAL_ERROR,
    DWC_CONNECTINET_STATE_LAST,
};
DWC_CONNECTINET_STATE_NOT_INITIALIZED Not initialized
DWC_CONNECTINET_STATE_IDLE The connection has not started.
DWC_CONNECTINET_STATE_OPERATING Currently processing.
DWC_CONNECTINET_STATE_OPERATED Processing completed.
DWC_CONNECTINET_STATE_CONNECTED Connected to the Internet.
DWC_CONNECTINET_STATE_DISCONNECTING Disconnecting from the Internet.
DWC_CONNECTINET_STATE_DISCONNECTED Disconnected from the Internet.
DWC_CONNECTINET_STATE_ERROR An error occurred.
DWC_CONNECTINET_STATE_FATAL_ERROR A fatal error occurred.
DWC_CONNECTINET_STATE_LAST

Authentication Server Type

enum DWCInetAuthType {
    DWC_CONNECTINET_AUTH_TEST,
    DWC_CONNECTINET_AUTH_DEVELOP,
    DWC_CONNECTINET_AUTH_RELEASE,
    DWC_CONNECTINET_AUTH_LAST,
};
DWC_CONNECTINET_AUTH_TEST Authentication Server for Development
DWC_CONNECTINET_AUTH_DEVELOP Authentication Server for Library Development (do not use)
DWC_CONNECTINET_AUTH_RELEASE Authentication Server for Production
DWC_CONNECTINET_AUTH_LAST

Revision History

5.2 PR1
Fixed the descriptions of DWC_CONNECTINET_AUTH_DEVELOP and DWC_CONNECTINET_AUTH_RELEASE because they had errors.

Area Code Indicating the Local Area for Nintendo Wi-Fi Station or NintendoZone

enum DWCApInfoArea {
    DWC_APINFO_AREA_JPN        =  0,
    DWC_APINFO_AREA_USA,
    DWC_APINFO_AREA_EUR,
    DWC_APINFO_AREA_AUS,
    DWC_APINFO_AREA_KOR,
    DWC_APINFO_AREA_UNKNOWN    =  0xff,
};
DWC_APINFO_AREA_JPN Japan
DWC_APINFO_AREA_USA North America
DWC_APINFO_AREA_EUR Europe
DWC_APINFO_AREA_AUS Australia
DWC_APINFO_AREA_KOR Korea
DWC_APINFO_AREA_UNKNOWN Unknown (not a Nintendo Wi-Fi Station or NintendoZone)

AP Type

enum DWCApInfoType {
    DWC_APINFO_TYPE_USER0           =  0,
    DWC_APINFO_TYPE_USER1,
    DWC_APINFO_TYPE_USER2,
    DWC_APINFO_TYPE_USB,
    DWC_APINFO_TYPE_SHOP,
    DWC_APINFO_TYPE_FREESPOT,
    DWC_APINFO_TYPE_WAYPORT,
    DWC_APINFO_TYPE_OTHER,
    DWC_APINFO_TYPE_NINTENDOWFC     =  DWC_APINFO_TYPE_OTHER,
    DWC_APINFO_TYPE_NINTENDOZONE,
    DWC_APINFO_TYPE_USER3           =  0x0a,
    DWC_APINFO_TYPE_USER4,
    DWC_APINFO_TYPE_USER5,
    DWC_APINFO_TYPE_UNKNOWN         =  99,
};
DWC_APINFO_TYPE_USER0 The access point for connection target 1.
DWC_APINFO_TYPE_USER1 The access point for connection target 2.
DWC_APINFO_TYPE_USER2 The access point for connection target 3.
DWC_APINFO_TYPE_USB Nintendo Wi-Fi USB Connector.
DWC_APINFO_TYPE_SHOP Nintendo Wi-Fi Station.
DWC_APINFO_TYPE_FREESPOT A FREESPOT hotspot.
DWC_APINFO_TYPE_WAYPORT Wayport (North American hotspot).
Note: Currently cannot be used.
DWC_APINFO_TYPE_OTHER (Old definition)
DWC_APINFO_TYPE_NINTENDOWFC (Reserved)
DWC_APINFO_TYPE_NINTENDOZONE NintendoZone
DWC_APINFO_TYPE_USER3 Access point for connection target 4.
Note: Not defined in NITRO ROMs.
DWC_APINFO_TYPE_USER4 Access point for connection target 5.
Note: Not defined in NITRO ROMs.
DWC_APINFO_TYPE_USER5 Access point for connection target 6.
Note: Not defined in NITRO ROMs.
DWC_APINFO_TYPE_UNKNOWN Unknown

Revision History

5.1
Added that Wayports (North American hotspots) cannot currently be used.

Wireless Security Type

enum DWCApInfoSecurity {
    DWC_APINFO_WSEC_NONE             =  0x00,
    DWC_APINFO_WSEC_WEPMODE_40,
    DWC_APINFO_WSEC_WEPMODE_104,
    DWC_APINFO_WSEC_WEPMODE_128,
    DWC_APINFO_WSEC_WPA_PSK_TKIP,
    DWC_APINFO_WSEC_WPA2_PSK_TKIP,
    DWC_APINFO_WSEC_WPA_PSK_AES,
    DWC_APINFO_WSEC_WPA2_PSK_AES,
};
DWC_APINFO_WSEC_NONE No encryption.
DWC_APINFO_WSEC_WEPMODE_40 RC4 (40-bit) encryption mode.
DWC_APINFO_WSEC_WEPMODE_104 RC4 (104-bit) encryption mode.
DWC_APINFO_WSEC_WEPMODE_128 RC4 (128-bit) encryption mode.
DWC_APINFO_WSEC_WPA_PSK_TKIP WPA-PSK (TKIP) encryption.
Note: Not defined in NITRO ROMs.
DWC_APINFO_WSEC_WPA2_PSK_TKIP WPA2-PSK (TKIP) encryption.
Note: Not defined in NITRO ROMs.
DWC_APINFO_WSEC_WPA_PSK_AES WPA-PSK (AES) encryption.
Note: Not defined in NITRO ROMs.
DWC_APINFO_WSEC_WPA2_PSK_AES WPA2-PSK (AES) encryption.
Note: Not defined in NITRO ROMs.

Communication Process Result of Internet Connection Test

enum DWCTestInetResult {
    DWC_TESTINET_NOT_INITIALIZED    =  0,
    DWC_TESTINET_OPERATING,
    DWC_TESTINET_CONNECTED,
    DWC_TESTINET_DISCONNECTED,
};
DWC_TESTINET_NOT_INITIALIZED The DWC_TestInetAsync function has not been called
DWC_TESTINET_OPERATING Currently executing communication process
DWC_TESTINET_CONNECTED Connected to Internet
DWC_TESTINET_DISCONNECTED Not connected to Internet

Proxy Authentication Format

enum DWCProxyAuthType {
    DWC_PROXY_AUTHTYPE_NONE     =  0x00,
    DWC_PROXY_AUTHTYPE_BASIC,
};
DWC_PROXY_AUTHTYPE_NONE No authentication
DWC_PROXY_AUTHTYPE_BASIC Basic authentication

Error Enumerators

enum DWCError {
    DWC_ERROR_NONE                   =  0,
    DWC_ERROR_DS_MEMORY_ANY,
    DWC_ERROR_AUTH_ANY,
    DWC_ERROR_AUTH_OUT_OF_SERVICE,
    DWC_ERROR_AUTH_STOP_SERVICE,
    DWC_ERROR_AC_ANY,
    DWC_ERROR_NETWORK,
    DWC_ERROR_GHTTP_ANY,
    DWC_ERROR_DISCONNECTED,
    DWC_ERROR_FATAL,
    DWC_ERROR_FRIENDS_SHORTAGE,
    DWC_ERROR_NOT_FRIEND_SERVER,
    DWC_ERROR_SERVER_FULL,
    DWC_ERROR_ND_ANY,
    DWC_ERROR_ND_HTTP,
    DWC_ERROR_SVL_ANY,
    DWC_ERROR_SVL_HTTP,
    DWC_ERROR_PROF_ANY,
    DWC_ERROR_PROF_HTTP,
    DWC_ERROR_GDB_ANY,
    DWC_ERROR_SCL_ANY,
    DWC_ERROR_SC_CONNECT_BLOCK,
    DWC_ERROR_NETWORK_LIGHT,
    DWC_ERROR_NUM,
};
DWC_ERROR_NONE No error.
DWC_ERROR_DS_MEMORY_ANY Error related to system save data.
DWC_ERROR_AUTH_ANY Authentication-related error.
DWC_ERROR_AUTH_OUT_OF_SERVICE Service terminated.
DWC_ERROR_AUTH_STOP_SERVICE Service stopped temporarily.
DWC_ERROR_AC_ANY Error related to automatic connection.
DWC_ERROR_NETWORK Other network error.
DWC_ERROR_GHTTP_ANY HTTP communications (GameSpy HTTP) error.
DWC_ERROR_DISCONNECTED Disconnected.
DWC_ERROR_FATAL Fatal error.
DWC_ERROR_FRIENDS_SHORTAGE Tried to begin friend-specified matchmaking without enough valid friends for the specified number.
DWC_ERROR_NOT_FRIEND_SERVER With server-client matchmaking, either the server-specified friends are not mutual friends, or the server is down.
DWC_ERROR_SERVER_FULL The server-client matchmaking server has exceeded the maximum number of participants.
DWC_ERROR_ND_ANY Download library error.
DWC_ERROR_ND_HTTP Download library HTTP error.
DWC_ERROR_SVL_ANY Service locator error.
DWC_ERROR_SVL_HTTP HTTP communications error occurred while service locator information was being obtained.
DWC_ERROR_PROF_ANY Error occurring during the illegal string check when the server response was abnormal.
DWC_ERROR_PROF_HTTP Illegal string check HTTP error.
DWC_ERROR_GDB_ANY GDB library error. Normally does not occur with DWC.
DWC_ERROR_SCL_ANY SC library error. Normally does not occur with DWC.
DWC_ERROR_SC_CONNECT_BLOCK The server denied client connection during server-client matchmaking.
DWC_ERROR_NETWORK_LIGHT Network error to be handled as a light error.
DWC_ERROR_NUM

Error Types Indicating the Procedure Required on Error Detection

enum DWCErrorType {
    DWC_ETYPE_NO_ERROR          =  0,
    DWC_ETYPE_LIGHT,
    DWC_ETYPE_SHOW_ERROR,
    DWC_ETYPE_SHUTDOWN_FM,
    DWC_ETYPE_SHUTDOWN_GHTTP,
    DWC_ETYPE_SHUTDOWN_ND,
    DWC_ETYPE_DISCONNECT,
    DWC_ETYPE_FATAL,
    DWC_ETYPE_NUM,
};
DWC_ETYPE_NO_ERROR No error.
DWC_ETYPE_LIGHT Only a game-specific display; error code display is not necessary.
To recover, call the DWC_ClearError function.
DWC_ETYPE_SHOW_ERROR Display the error code.
To recover, call the DWC_ClearError function.
DWC_ETYPE_SHUTDOWN_FM The FriendsMatch library must be shut down by calling the DWC_ShutdownFriendsMatch function. Display the error code.
DWC_ETYPE_SHUTDOWN_GHTTP Call the following library release functions as needed.
DWC_RnkShutdown function (General-Purpose Ranking library)
Display the error code.
DWC_ETYPE_SHUTDOWN_ND You must call the DWC_NdCleanupAsync function and terminate the Download library. Display the error code.
DWC_ETYPE_DISCONNECT Call the following library release functions as needed.
DWC_ShutdownFriendsMatch function (FriendsMatch library)
DWC_NdCleanupAsync function (Download library)
DWC_RnkShutdown function (General-Purpose Ranking library).
Communication must be terminated later using the DWC_CleanupInet or DWC_CleanupInetAsync function. Display the error code.
DWC_ETYPE_FATAL Because this is equivalent to a FatalError, when using NITRO, you must prompt the user to turn power OFF. When using TWL, you must prompt the user to reset (return to the launcher). Display the error code.
DWC_ETYPE_NUM

ingamesn Check Result Enumerator

enum DWCIngamesnCheckResult {
    DWC_INGAMESN_NOT_CHECKED    =  0,
    DWC_INGAMESN_VALID          =  1,
    DWC_INGAMESN_INVALID        =  2,
};
DWC_INGAMESN_NOT_CHECKED Unchecked
DWC_INGAMESN_VALID Valid
DWC_INGAMESN_INVALID Invalid

Enumeration Type That Displays the Status of the Nintendo Authentication Server Authentication Process.

enum DWCNasLoginState {
    DWC_NASLOGIN_STATE_DIRTY       =  0,
    DWC_NASLOGIN_STATE_IDLE,
    DWC_NASLOGIN_STATE_HTTP,
    DWC_NASLOGIN_STATE_SUCCESS,
    DWC_NASLOGIN_STATE_ERROR,
    DWC_NASLOGIN_STATE_CANCELED,
    DWC_NASLOGIN_STATE_MAX,
};
DWC_NASLOGIN_STATE_DIRTY Authentication process has not been initialized.
DWC_NASLOGIN_STATE_IDLE Authentication process has not started. Waiting state.
DWC_NASLOGIN_STATE_HTTP Currently communicating via HTTP for the authentication process.
DWC_NASLOGIN_STATE_SUCCESS Authentication process was successful.
DWC_NASLOGIN_STATE_ERROR Authentication process failed.
DWC_NASLOGIN_STATE_CANCELED Authentication process was cancelled.
DWC_NASLOGIN_STATE_MAX

Download Library States

enum DWCNdState {
    DWC_ND_STATE_NOTINITIALIZED,
    DWC_ND_STATE_READY,
    DWC_ND_STATE_BUSY,
    DWC_ND_STATE_COMPLETE,
    DWC_ND_STATE_ERROR,
    DWC_ND_STATE_MAX,
};
DWC_ND_STATE_NOTINITIALIZED Download library not initialized
DWC_ND_STATE_READY Initialization is complete, and other Download library functions can be called
DWC_ND_STATE_BUSY Currently running asynchronous processing
DWC_ND_STATE_COMPLETE Asynchronous processing has completed normally
DWC_ND_STATE_ERROR An error has occurred during asynchronous processing, and the process has ended
DWC_ND_STATE_MAX

Download Library Error Enumerators

enum DWCNdError {
    DWC_ND_ERROR_NONE,
    DWC_ND_ERROR_ALLOC,
    DWC_ND_ERROR_BUSY,
    DWC_ND_ERROR_HTTP,
    DWC_ND_ERROR_BUFFULL,
    DWC_ND_ERROR_PARAM,
    DWC_ND_ERROR_CANCELED,
    DWC_ND_ERROR_DLSERVER,
    DWC_ND_ERROR_FATAL,
    DWC_ND_ERROR_MAX,
};
DWC_ND_ERROR_NONE The executing process has completed
DWC_ND_ERROR_ALLOC Memory allocation failed
DWC_ND_ERROR_BUSY Function has been called from a state in which it cannot be called
DWC_ND_ERROR_HTTP An HTTP communications error occurred
DWC_ND_ERROR_BUFFULL (Internal error) Insufficient space in download buffer
DWC_ND_ERROR_PARAM Error due to an invalid parameter
DWC_ND_ERROR_CANCELED Process cancellation has finished
DWC_ND_ERROR_DLSERVER Server returned an error code
DWC_ND_ERROR_FATAL Undefined fatal error has occurred
DWC_ND_ERROR_MAX

Download Library Progress Enumerators

enum DWCNdCallbackReason {
    DWC_ND_CBREASON_INITIALIZE,
    DWC_ND_CBREASON_GETFILELISTNUM,
    DWC_ND_CBREASON_GETFILELIST,
    DWC_ND_CBREASON_GETFILE,
    DWC_ND_CBREASON_CLEANUP,
    DWC_ND_CBREASON_MAX,
};
DWC_ND_CBREASON_INITIALIZE Notification callback was called while the Download library was initializing
DWC_ND_CBREASON_GETFILELISTNUM Notification callback was called while the total number of downloadable files was being downloaded
DWC_ND_CBREASON_GETFILELIST Notification callback was called while the file information list was being downloaded
DWC_ND_CBREASON_GETFILE Notification callback was called while a file was being downloaded
DWC_ND_CBREASON_CLEANUP Called when cleanup was finished
DWC_ND_CBREASON_MAX

States During Illegal Name Check

enum DWCProfState {
    DWC_PROF_STATE_NOT_INITIALIZED    =  0,
    DWC_PROF_STATE_OPERATING,
    DWC_PROF_STATE_SUCCESS,
    DWC_PROF_STATE_FAIL,
};
DWC_PROF_STATE_NOT_INITIALIZED Uninitialized
DWC_PROF_STATE_OPERATING Currently performing HTTP communications
DWC_PROF_STATE_SUCCESS Name check succeeded
DWC_PROF_STATE_FAIL Name check failed.

Enum Types Indicating the Region of the Illegal String Check

enum DWCProfRegion {
    DWC_PROF_REGION_SELF    =  0x00,
    DWC_PROF_REGION_JP      =  0x01,
    DWC_PROF_REGION_US      =  0x02,
    DWC_PROF_REGION_EU      =  0x04,
    DWC_PROF_REGION_KR      =  0x08,
    DWC_PROF_REGION_CN      =  0x10,
    DWC_PROF_REGION_ALL     =  0x80,
};
DWC_PROF_REGION_SELF In accordance with the product code
DWC_PROF_REGION_JP Japan
DWC_PROF_REGION_US North America
DWC_PROF_REGION_EU Europe
DWC_PROF_REGION_KR Korea
DWC_PROF_REGION_CN China
DWC_PROF_REGION_ALL All regions

Flag for Outputting DWC Debug Information

enum DWCReportFlag {
    DWC_REPORTFLAG_NONE               =  0x00000000,
    DWC_REPORTFLAG_INFO               =  0x00000001,
    DWC_REPORTFLAG_ERROR              =  0x00000002,
    DWC_REPORTFLAG_DEBUG              =  0x00000004,
    DWC_REPORTFLAG_WARNING            =  0x00000008,
    DWC_REPORTFLAG_ACHECK             =  0x00000010,
    DWC_REPORTFLAG_LOGIN              =  0x00000020,
    DWC_REPORTFLAG_MATCH_NN           =  0x00000040,
    DWC_REPORTFLAG_MATCH_GT2          =  0x00000080,
    DWC_REPORTFLAG_TRANSPORT          =  0x00000100,
    DWC_REPORTFLAG_QR2_REQ            =  0x00000200,
    DWC_REPORTFLAG_SB_UPDATE          =  0x00000400,
    DWC_REPORTFLAG_SEND_INFO          =  0x00008000,
    DWC_REPORTFLAG_RECV_INFO          =  0x00010000,
    DWC_REPORTFLAG_UPDATE_SV          =  0x00020000,
    DWC_REPORTFLAG_CONNECTINET        =  0x00040000,
    DWC_REPORTFLAG_AUTH               =  0x01000000,
    DWC_REPORTFLAG_AC                 =  0x02000000,
    DWC_REPORTFLAG_BM                 =  0x04000000,
    DWC_REPORTFLAG_UTIL               =  0x08000000,
    DWC_REPORTFLAG_OPTION_CF          =  0x10000000,
    DWC_REPORTFLAG_OPTION_CONNTEST    =  0x20000000,
    DWC_REPORTFLAG_GAMESPY            =  0x80000000,
    DWC_REPORTFLAG_TEST               =  0x00100000,
    DWC_REPORTFLAG_ALL                =  0xffffffff,
};
DWC_REPORTFLAG_NONE No output
DWC_REPORTFLAG_INFO Information
DWC_REPORTFLAG_ERROR Errors
DWC_REPORTFLAG_DEBUG Debug information
DWC_REPORTFLAG_WARNING Warning
DWC_REPORTFLAG_ACHECK GameSpy server availability check
DWC_REPORTFLAG_LOGIN Login-related
DWC_REPORTFLAG_MATCH_NN Matchmaking-NN-related
DWC_REPORTFLAG_MATCH_GT2 Matchmaking-GT2-related
DWC_REPORTFLAG_TRANSPORT Send/receive-related
DWC_REPORTFLAG_QR2_REQ QR2-related
DWC_REPORTFLAG_SB_UPDATE SB-related
DWC_REPORTFLAG_SEND_INFO Send information
DWC_REPORTFLAG_RECV_INFO Receive information
DWC_REPORTFLAG_UPDATE_SV Server update-related
DWC_REPORTFLAG_CONNECTINET Internet connection-related
DWC_REPORTFLAG_AUTH Authentication-related
DWC_REPORTFLAG_AC Account-related
DWC_REPORTFLAG_BM Saving/loading Wi-Fi settings
DWC_REPORTFLAG_UTIL UTIL-related
DWC_REPORTFLAG_OPTION_CF Not used
DWC_REPORTFLAG_OPTION_CONNTEST Not used
DWC_REPORTFLAG_GAMESPY GameSpy-related
DWC_REPORTFLAG_TEST
DWC_REPORTFLAG_ALL All

Revision History

5.2
Added explanation of flags for debug information output.

Enumeration Type Indicating the State While Getting Service Locator Information

enum DWCSvlState {
    DWC_SVL_STATE_DIRTY       =  0,
    DWC_SVL_STATE_IDLE,
    DWC_SVL_STATE_HTTP,
    DWC_SVL_STATE_SUCCESS,
    DWC_SVL_STATE_ERROR,
    DWC_SVL_STATE_CANCELED,
    DWC_SVL_STATE_MAX,
};
DWC_SVL_STATE_DIRTY Uninitialized.
DWC_SVL_STATE_IDLE Process not currently running
DWC_SVL_STATE_HTTP Currently performing HTTP communications.
DWC_SVL_STATE_SUCCESS Token acquisition was successful
DWC_SVL_STATE_ERROR Token acquisition failed
DWC_SVL_STATE_CANCELED Token acquisition was cancelled
DWC_SVL_STATE_MAX

Type Definitions


CONFIDENTIAL