DWC_GetFriendStatusSC

Syntax

#include <dwc.h>

u8 DWC_GetFriendStatusSC( const DWCFriendData* friendData,
                          u8*   maxEntry,
                          u8*   numEntry,
                          char* statusString );

Description

This function gets the communication status of the friend specified with friendData. The GameSpy server sends a notification each time the friend's communication status changes. This is saved in the internal cache of the DWC library. Therefore, this function references that status and does not perform any communications.

A player's communication status is made up of the status flag returned as this function's return value and the status character string passed via the statusString argument. The player status is managed on the GameSpy server. In addition, server DS-specific information is included during server-client matchmaking. The status flag and the server DS-specific information are automatically set by the DWC library, but the application can set the status character string by using the DWC_SetOwnStatusString function.

Use the DWC_GetFriendStatus function if there is no need to obtain any specific information during server-client matchmaking. Also, for applications where binary data (rather than character strings such as statusString) is set with the DWC_SetOwnStatusData function, get the binary data using the DWC_GetFriendStatusData or DWC_GetFriendStatusDataSC function.

This function takes several hundred microseconds. Be aware of this fact when you need to check status several times during a short interval.

Arguments

friendData The pointer to the type DWCFriendData friend information.
maxEntry When the partner is the server DS during server-client matchmaking, this pointer stores the maximum number of connectable devices. Otherwise, 0.
numEntry When the partner is the server DS during server-client matchmaking, this pointer stores the current number of connected devices that were obtained. Otherwise, 0.
statusString Pointer to the location where the friend status character string is stored.
If NULL is passed, the string is not copied.
The maximum length of the character string is 255 characters + the NULL terminator.

Return Values

DWC_STATUS_OFFLINE Offline (indicates that the DWC is offline or that friendship with the partner has not yet been established).
DWC_STATUS_ONLINE Online (logged in to a Wi-Fi Connection server).
DWC_STATUS_PLAYING In-game (after matchmaking has completed).
DWC_STATUS_MATCH_ANYBODY In connect-to-anybody peer matchmaking.
DWC_STATUS_MATCH_FRIEND In connect-to-friends peer matchmaking.
DWC_STATUS_MATCH_SC_CL Client DS undergoing server-client matchmaking.
DWC_STATUS_MATCH_SC_SV Server DS undergoing server-client matchmaking.

See Also

DWC_GetFriendStatus
DWC_GetFriendStatusData
DWC_GetFriendStatusDataSC
DWC_SetOwnStatusString
DWC_SetOwnStatusData

Revision History

2005/12/16 Added a description about the networking states and introduced other similar functions.
2005/11/07 Initial version.


CONFIDENTIAL