TWL DWC Library Constants

Constants

Definitions


#include <dwc.h>

#define   DWC_COMMONSTR_MAX_KEY_VALUE_LEN         4096
#define   DWC_FRIEND_STATUS_STRING_LEN            (256)
#define   DWC_MAX_PLAYER_NAME                     26
#define   DWC_INVALID_AID                         (0xff)
#define   DWC_MAX_CONNECTIONS                     32
#define   DWC_QR2_GAME_KEY_START                  100
#define   DWC_QR2_RESERVED_KEYS                   (100-50)
#define   DWC_QR2_GAME_RESERVED_KEYS              (DWC_MAX_REGISTERED_KEYS-DWC_QR2_RESERVED_KEYS-DWC_QR2_RESERVED_KEYS)
#define   DWC_CONNECTION_USERDATA_LEN             4
#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_RNK_DATA_MAX                        764
#define   DWC_RNK_CATEGORY_MAX                    1000
#define   DWC_RNK_GET_MAX                         30
#define   DWC_RNK_FRIENDS_MAX                     64
#define   DWC_SVL_HOST_LENGTH                     64
#define   DWC_SVL_TOKEN_LENGTH                    300
#define   DWC_SVL_STATUSDATA_LENGTH               1
#define   DWC_TRANSPORT_MTU_SIZE                  1500
#define   DWC_TRANSPORT_RELIABLE_ALL_HEADER_SIZE  35
#define   DWC_TRANSPORT_UNRELIABLE_ALL_HEADER_SIZE 38
#define   DWC_TRANSPORT_SEND_RELIABLE_MAX         (DWC_TRANSPORT_MTU_SIZE-DWC_TRANSPORT_RELIABLE_ALL_HEADER_SIZE)
#define   DWC_TRANSPORT_SEND_UNRELIABLE_MAX       (DWC_TRANSPORT_MTU_SIZE-DWC_TRANSPORT_UNRELIABLE_ALL_HEADER_SIZE)
#define   DWC_TRANSPORT_SEND_MAX                  DWC_TRANSPORT_SEND_RELIABLE_MAX

				

Description

DWC_COMMONSTR_MAX_KEY_VALUE_LEN Maximum string length shared by the general-purpose strings key and value.
DWC_FRIEND_STATUS_STRING_LEN The length (including null terminator) of the status string that can be specified when using the DWC_GetOwnStatusString, DWC_SetOwnStatusString, or DWC_GetFriendStatusSC function.
DWC_MAX_PLAYER_NAME Maximum length of player names (in-game screen names) (25 double-byte characters + "\0\0").
DWC_INVALID_AID Value indicating an invalid AID.
DWC_MAX_CONNECTIONS Maximum number of simultaneous connections.
DWC_QR2_GAME_KEY_START Start value of game-defined keys.
DWC_QR2_RESERVED_KEYS Number of keys reserved by DWC.
DWC_QR2_GAME_RESERVED_KEYS Maximum number of keys that the game can use (default is 154).
DWC_CONNECTION_USERDATA_LEN Length of the buffer used for matchmaking connection conditions.
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_RNK_DATA_MAX Maximum size of user-defined data.
DWC_RNK_CATEGORY_MAX Maximum value that can be specified as a category.
DWC_RNK_GET_MAX Upper limit on the maximum number of rankings that can be retrieved.
DWC_RNK_FRIENDS_MAX Maximum number of friends.
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.
DWC_TRANSPORT_MTU_SIZE Maximum IP packet size that can be sent during reliable and unreliable transfers.
DWC_TRANSPORT_RELIABLE_ALL_HEADER_SIZE Header size that can be attached to a reliable transfer.
DWC_TRANSPORT_UNRELIABLE_ALL_HEADER_SIZE Header size that can be attached to an unreliable transfer.
DWC_TRANSPORT_SEND_RELIABLE_MAX Maximum data size that can be sent by a single reliable transfer.
DWC_TRANSPORT_SEND_UNRELIABLE_MAX Maximum data size that can be sent by a single unreliable transfer.
DWC_TRANSPORT_SEND_MAX Maximum data size that can be sent by a single reliable transfer. (This is left for compatibility. Use DWC_TRANSPORT_SEND_RELIABLE_MAX).

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

Persistent Server Login States

enum  {
    DWC_PERS_STATE_INIT                     =  0,
    DWC_PERS_STATE_LOGIN,
    DWC_PERS_STATE_CONNECTED,
    DWC_PERS_STATE_NUM,
};
DWC_PERS_STATE_INIT Initial state.
DWC_PERS_STATE_LOGIN Logging in.
DWC_PERS_STATE_CONNECTED Connected.
DWC_PERS_STATE_NUM

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

Friend's Communication Status (Use the Redefined GPEnum Status + Alpha)

enum  {
    DWC_STATUS_OFFLINE                      =  0,
    DWC_STATUS_ONLINE,
    DWC_STATUS_PLAYING,
    DWC_STATUS_MATCH_ANYBODY,
    DWC_STATUS_MATCH_FRIEND,
    DWC_STATUS_MATCH_SC_CL,
    DWC_STATUS_MATCH_SC_SV,
    DWC_STATUS_NUM,
};
DWC_STATUS_OFFLINE Offline
DWC_STATUS_ONLINE Online (logged on to the GP server)
DWC_STATUS_PLAYING Playing the game
DWC_STATUS_MATCH_ANYBODY Currently performing friend-unspecified peer matchmaking
DWC_STATUS_MATCH_FRIEND Currently performing friend-specified peer matchmaking
DWC_STATUS_MATCH_SC_CL Client that is in server-client matchmaking
DWC_STATUS_MATCH_SC_SV Server that is in server-client matchmaking
DWC_STATUS_NUM

Friend Management Status

enum DWCFriendState {
    DWC_FRIEND_STATE_INIT                   =  0,
    DWC_FRIEND_STATE_PERS_LOGIN,
    DWC_FRIEND_STATE_LOGON,
    DWC_FRIEND_STATE_NUM,
};
DWC_FRIEND_STATE_INIT Initial state.
DWC_FRIEND_STATE_PERS_LOGIN Currently logging on to the Persistent server and synchronizing friend roster
DWC_FRIEND_STATE_LOGON Currently logged on to the Persistent server
DWC_FRIEND_STATE_NUM

Local Friend Roster and GP Friend Roster Synchronization States

enum  {
    DWC_BUDDY_UPDATE_STATE_WAIT             =  0,
    DWC_BUDDY_UPDATE_STATE_CHECK,
    DWC_BUDDY_UPDATE_STATE_PSEARCH,
    DWC_BUDDY_UPDATE_STATE_COMPLETE,
    DWC_BUDDY_UPDATE_STATE_NUM,
};
DWC_BUDDY_UPDATE_STATE_WAIT Waiting for download of friend roster to complete
DWC_BUDDY_UPDATE_STATE_CHECK Currently checking friend roster
DWC_BUDDY_UPDATE_STATE_PSEARCH Currently searching for profile
DWC_BUDDY_UPDATE_STATE_COMPLETE Friend roster synchronization complete
DWC_BUDDY_UPDATE_STATE_NUM

Login Progress Status Enumerators

enum DWCLoginState {
    DWC_LOGIN_STATE_INIT                    =  0,
    DWC_LOGIN_STATE_REMOTE_AUTH,
    DWC_LOGIN_STATE_CONNECTING,
    DWC_LOGIN_STATE_GPGETINFO,
    DWC_LOGIN_STATE_GPSETINFO,
    DWC_LOGIN_STATE_CONNECTED,
    DWC_LOGIN_STATE_NUM,
};
DWC_LOGIN_STATE_INIT Initial state.
DWC_LOGIN_STATE_REMOTE_AUTH Currently performing remote authentication
DWC_LOGIN_STATE_CONNECTING Currently connecting to GP server
DWC_LOGIN_STATE_GPGETINFO Getting lastname after logging in to the GP server
DWC_LOGIN_STATE_GPSETINFO Setting lastname after logging in to the GP server for the first time
DWC_LOGIN_STATE_CONNECTED Connection completed
DWC_LOGIN_STATE_NUM

DWC Network Status Enumerators

enum DWCState {
    DWC_STATE_INIT                          =  0,
    DWC_STATE_AVAILABLE_CHECK,
    DWC_STATE_LOGIN,
    DWC_STATE_ONLINE,
    DWC_STATE_MATCHING,
    DWC_STATE_CONNECTED,
    DWC_STATE_NUM,
};
DWC_STATE_INIT Initial state.
DWC_STATE_AVAILABLE_CHECK Checking game availability state
DWC_STATE_LOGIN Logging in
DWC_STATE_ONLINE Login completed and online
DWC_STATE_MATCHING Currently matchmaking
DWC_STATE_CONNECTED Matching has completed, and a mesh network has been created
DWC_STATE_NUM

Matchmaking State Enumerator

enum DWCMatchState {
    DWC_MATCH_STATE_INIT                      =  0,
    DWC_MATCH_STATE_CL_WAITING,
    DWC_MATCH_STATE_CL_SEARCH_HOST,
    DWC_MATCH_STATE_CL_WAIT_RESV,
    DWC_MATCH_STATE_CL_SEARCH_EVAL_HOST,
    DWC_MATCH_STATE_CL_NN,
    DWC_MATCH_STATE_CL_GT2,
    DWC_MATCH_STATE_CL_CANCEL_SYN,
    DWC_MATCH_STATE_CL_SYN,
    DWC_MATCH_STATE_CL_SVDOWN_1,
    DWC_MATCH_STATE_CL_SVDOWN_2,
    DWC_MATCH_STATE_CL_SVDOWN_3,
    DWC_MATCH_STATE_CL_SEARCH_GROUPID_HOST,
    DWC_MATCH_STATE_SV_WAITING,
    DWC_MATCH_STATE_SV_OWN_NN,
    DWC_MATCH_STATE_SV_OWN_GT2,
    DWC_MATCH_STATE_SV_WAIT_CL_LINK,
    DWC_MATCH_STATE_SV_CANCEL_SYN,
    DWC_MATCH_STATE_SV_CANCEL_SYN_WAIT,
    DWC_MATCH_STATE_SV_SYN,
    DWC_MATCH_STATE_SV_SYN_WAIT,
    DWC_MATCH_STATE_WAIT_CLOSE,
    DWC_MATCH_STATE_SEARCH_OWN,
    DWC_MATCH_STATE_SV_SYN_CLOSE_WAIT,
    DWC_MATCH_STATE_NUM,
};
DWC_MATCH_STATE_INIT Initial state.
DWC_MATCH_STATE_CL_WAITING Waiting.
DWC_MATCH_STATE_CL_SEARCH_HOST Searching for available host (only with friend-unspecified matchmaking)
DWC_MATCH_STATE_CL_WAIT_RESV Waiting for response from server about reservation
DWC_MATCH_STATE_CL_SEARCH_EVAL_HOST Searching for a peer host to evaluate
DWC_MATCH_STATE_CL_NN Currently running NAT negotiation
DWC_MATCH_STATE_CL_GT2 Currently establishing GT2 connection
DWC_MATCH_STATE_CL_CANCEL_SYN Currently adjusting matchmaking cancellation synchronization between server and client
DWC_MATCH_STATE_CL_SYN Currently adjusting matchmaking completion synchronization
DWC_MATCH_STATE_CL_SVDOWN_1 Currently detecting server down
DWC_MATCH_STATE_CL_SVDOWN_2 Currently detecting server down, 2
DWC_MATCH_STATE_CL_SVDOWN_3 Currently detecting server down, 3
DWC_MATCH_STATE_CL_SEARCH_GROUPID_HOST Search for a host based on the group ID
DWC_MATCH_STATE_SV_WAITING Waiting.
DWC_MATCH_STATE_SV_OWN_NN Currently running NAT negotiation with client
DWC_MATCH_STATE_SV_OWN_GT2 Currently establishing GT2 negotiation with client
DWC_MATCH_STATE_SV_WAIT_CL_LINK Waiting for connection between clients to complete
DWC_MATCH_STATE_SV_CANCEL_SYN Waiting for SYN-ACK related to matchmaking cancellation synchronization adjustment between server and client
DWC_MATCH_STATE_SV_CANCEL_SYN_WAIT Currently waiting for matchmaking cancellation synchronization adjustment between server and client to complete
DWC_MATCH_STATE_SV_SYN Waiting for SYN-ACK related to matchmaking termination synchronization adjustment
DWC_MATCH_STATE_SV_SYN_WAIT Waiting for matchmaking termination synchronization adjustment to complete
DWC_MATCH_STATE_WAIT_CLOSE Waiting for connection to close
DWC_MATCH_STATE_SEARCH_OWN Searching for the local host's information (previously named DWC_MATCH_STATE_CL_SEARCH_OWN)
DWC_MATCH_STATE_SV_SYN_CLOSE_WAIT The wait time after the CLOSE command is sent
DWC_MATCH_STATE_NUM

Matchmaking Type Enumerators

enum  {
    DWC_MATCH_TYPE_ANYBODY    =  0,
    DWC_MATCH_TYPE_FRIEND,
    DWC_MATCH_TYPE_SC_SV,
    DWC_MATCH_TYPE_SC_CL,
    DWC_MATCH_TYPE_NUM,
};
DWC_MATCH_TYPE_ANYBODY Peer matchmaking with friend unspecified
DWC_MATCH_TYPE_FRIEND Peer matchmaking with friend specified
DWC_MATCH_TYPE_SC_SV Server side of server-client matchmaking
DWC_MATCH_TYPE_SC_CL Client side of server-client matchmaking
DWC_MATCH_TYPE_NUM

Suspend Callback Enumerators

enum DWCSuspendResult {
    DWC_SUSPEND_SUCCESS    =  0,
    DWC_SUSPEND_TIMEOUT,
    DWC_SUSPEND_NUM,
};
DWC_SUSPEND_SUCCESS Function completed successfully
DWC_SUSPEND_TIMEOUT Timed out (not used at this time)
DWC_SUSPEND_NUM

Connection Topology Enumerators

enum DWCTopologyType {
    DWC_TOPOLOGY_TYPE_HYBRID      =  0,
    DWC_TOPOLOGY_TYPE_STAR,
    DWC_TOPOLOGY_TYPE_FULLMESH,
    DWC_TOPOLOGY_TYPE_NUM,
};
DWC_TOPOLOGY_TYPE_HYBRID Hybrid type
DWC_TOPOLOGY_TYPE_STAR Star type
DWC_TOPOLOGY_TYPE_FULLMESH Full-mesh type
DWC_TOPOLOGY_TYPE_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

Constants Indicating Ascending and Descending Order of the Ranking List to Be Retrieved

enum  {
    DWC_RNK_ORDER_ASC    = 	0,
    DWC_RNK_ORDER_DES    = 	1,
};
DWC_RNK_ORDER_ASC Ascending order
DWC_RNK_ORDER_DES Descending order

Error Codes

enum DWCRnkError {
    DWC_RNK_SUCCESS                            =  0,
    DWC_RNK_IN_ERROR,
    DWC_RNK_ERROR_INVALID_PARAMETER,
    DWC_RNK_ERROR_INIT_ALREADYINITIALIZED,
    DWC_RNK_ERROR_INIT_INVALID_INITDATASIZE,
    DWC_RNK_ERROR_INIT_INVALID_INITDATA,
    DWC_RNK_ERROR_INIT_INVALID_USERDATA,
    DWC_RNK_ERROR_PUT_NOTREADY,
    DWC_RNK_ERROR_PUT_INVALID_KEY,
    DWC_RNK_ERROR_PUT_NOMEMORY,
    DWC_RNK_ERROR_GET_NOTREADY,
    DWC_RNK_ERROR_GET_INVALID_KEY,
    DWC_RNK_ERROR_GET_NOMEMORY,
    DWC_RNK_ERROR_CANCEL_NOTASK,
    DWC_RNK_PROCESS_NOTASK,
    DWC_RNK_PROCESS_TIMEOUT,
    DWC_RNK_ERROR_INVALID_MODE,
    DWC_RNK_ERROR_NOTCOMPLETED,
    DWC_RNK_ERROR_EMPTY_RESPONSE,
};
DWC_RNK_SUCCESS Succeeded
DWC_RNK_IN_ERROR An error is being generated
DWC_RNK_ERROR_INVALID_PARAMETER Invalid parameter
DWC_RNK_ERROR_INIT_ALREADYINITIALIZED Initialized
DWC_RNK_ERROR_INIT_INVALID_INITDATASIZE Invalid initialization data size
DWC_RNK_ERROR_INIT_INVALID_INITDATA Invalid initialization data
DWC_RNK_ERROR_INIT_INVALID_USERDATA Invalid user information
DWC_RNK_ERROR_PUT_NOTREADY Not initialized
DWC_RNK_ERROR_PUT_INVALID_KEY Invalid encryption key
DWC_RNK_ERROR_PUT_NOMEMORY Insufficient memory
DWC_RNK_ERROR_GET_NOTREADY Not initialized
DWC_RNK_ERROR_GET_INVALID_KEY Invalid encryption key
DWC_RNK_ERROR_GET_NOMEMORY Insufficient memory
DWC_RNK_ERROR_CANCEL_NOTASK No asynchronous process is running
DWC_RNK_PROCESS_NOTASK No asynchronous process is running
DWC_RNK_PROCESS_TIMEOUT Timeout
DWC_RNK_ERROR_INVALID_MODE Invalid mode
DWC_RNK_ERROR_NOTCOMPLETED Communications not completed
DWC_RNK_ERROR_EMPTY_RESPONSE Empty response

Module Status

enum DWCRnkState {
    DWC_RNK_STATE_NOTREADY       =  0,
    DWC_RNK_STATE_INITIALIZED,
    DWC_RNK_STATE_PUT_ASYNC,
    DWC_RNK_STATE_GET_ASYNC,
    DWC_RNK_STATE_COMPLETED,
    DWC_RNK_STATE_TIMEOUT,
    DWC_RNK_STATE_ERROR,
};
DWC_RNK_STATE_NOTREADY Uninitialized
DWC_RNK_STATE_INITIALIZED Initialized
DWC_RNK_STATE_PUT_ASYNC Currently executing asynchronous PUT process
DWC_RNK_STATE_GET_ASYNC Currently executing asynchronous GET process
DWC_RNK_STATE_COMPLETED Done
DWC_RNK_STATE_TIMEOUT Timeout
DWC_RNK_STATE_ERROR An error is being generated

Region Codes

enum DWCRnkRegion {
    DWC_RNK_REGION_JP     =  0x01,
    DWC_RNK_REGION_US     =  0x02,
    DWC_RNK_REGION_EU     =  0x04,
    DWC_RNK_REGION_KR     =  0x08,
    DWC_RNK_REGION_CH     =  0x10,
    DWC_RNK_REGION_CN     =  0x10,
    DWC_RNK_REGION_ALL    =  0xff,
};
DWC_RNK_REGION_JP Japan
DWC_RNK_REGION_US North America
DWC_RNK_REGION_EU Europe
DWC_RNK_REGION_KR Korea
DWC_RNK_REGION_CH China (old definition)
DWC_RNK_REGION_CN China
DWC_RNK_REGION_ALL World

Revision History

5.2 PR1
Revised the definition name for China. The old definition has also been retained.
5.1 PR2
Added China (DWC_RNK_REGION_CH).

DWC_RnkGetScoreAsync Retrieval Modes

enum DWCRnkGetMode {
    DWC_RNK_GET_MODE_ORDER,
    DWC_RNK_GET_MODE_TOPLIST,
    DWC_RNK_GET_MODE_NEAR,
    DWC_RNK_GET_MODE_FRIENDS,
    DWC_RNK_GET_MODE_NEAR_HI,
    DWC_RNK_GET_MODE_NEAR_LOW,
};
DWC_RNK_GET_MODE_ORDER Ranking
DWC_RNK_GET_MODE_TOPLIST High scores
DWC_RNK_GET_MODE_NEAR Nearby scores
DWC_RNK_GET_MODE_FRIENDS Rankings of specified friends
DWC_RNK_GET_MODE_NEAR_HI Nearby scores (higher than the local host's own ranking)
DWC_RNK_GET_MODE_NEAR_LOW Nearby scores (lower than the local host's own ranking)

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

typedef DWCAccUserData DWCUserData The player data for each player, including login ID.

Make sure that the members of this structure are not accessed directly.

typedef DWCAccFriendData DWCFriendData This union stores friend data.

Make sure that the members of this union are not accessed directly.


CONFIDENTIAL