DWC_GetFriendStatus

C Specification

#include <dwc.h>

u8 DWC_GetFriendStatus( const DWCFriendData* friendData,
char* statusString );

Description

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

A player's communication status is made up of the status flag expressed in this function's return value and the status character string expressed in the statusString argument. The player status is managed on the GameSpy server. The status flag is automatically set by the DWC library, but the status character string can be configured by the application using the DWC_SetOwnStatusString function.

When you want to acquire specific information for server-client matchmaking, use the DWC_GetFriendStatusSC function. 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 sensitive of this fact when you need to check status several times in a short period.

Arguments

friendData The pointer to the type DWCFriendData friend information.
statusString The pointer to the location where the friend status character string is stored.
If NULL is passed, the string will not be copied.
The maximum length of the character string is 255 characters + the NULL (end-of-string) character.

Return Values

DWC_STATUS_OFFLINE Offline
(Indicates the DWC is offline or that the friendship with the partner is not 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_GetFriendStatusSC, DWC_GetFriendStatusData, DWC_GetFriendStatusDataSC, DWC_SetOwnStatusString, DWC_SetOwnStatusData

Revision History

02/21/2006 Error corrections
12/16/2005 Added a description about the networking states and introduced other similar functions.
11/07/2005 Revised version
07/22/2005 Initial version