DWCFriendStatusCallback

Syntax

#include <dwc.h>
typedef void(*) DWCFriendStatusCallback(int index,
             u8 status,
             const char *statusString,
             void *param);

Arguments

index Friend roster index of the friend whose status has changed.
status Friend status. DWC_STATUS_* enumerator.
statusString GameSpystatus string defined by the game. The maximum length of the string is 255 characters + the null terminator.
param Parameter for the callback specified by DWC_UpdateServersAsync or DWC_SetFriendStatusCallback.

Return Values

None.

Description

Called when a friend's communications status changes.

The player's communication status is a product of the status flag indicated by status and the status string indicated by the statusString argument. It is managed on the GameSpy server. The status flag is automatically set by the DWC library, but the status string can be configured by the application using the DWC_SetOwnStatusString or DWC_SetOwnStatusData function.

This callback function can be set using DWC_UpdateServersAsync or DWC_SetFriendStatusCallback.


The status argument can take any of the following values.

DWC_STATUS_OFFLINEOffline
(indicates that the local host is offline or that friendship with the other party has not been established).
DWC_STATUS_ONLINEOnline (logged in to a Wi-Fi Connection server).
DWC_STATUS_PLAYING- Currently playing a game as a client (does not depend on matchmaking type)
- Currently playing a game as a server, after at least one instance of server migration, when using friend-specified matchmaking or server-client matchmaking
Either of the above states indicate that the local host cannot proceed to connection with this other party. (The PLAYING state is not a state that accepts connection.)
DWC_STATUS_MATCH_ANYBODY- Currently searching for a connection partner during peer matchmaking with friend unspecified
- Currently playing a game as a server during peer matchmaking with friend unspecified
DWC_STATUS_MATCH_FRIEND- Currently searching for a connection partner during peer matchmaking with friend specified
- Currently playing a game as a server during peer matchmaking with friend specified
DWC_STATUS_MATCH_SC_CL- Currently connecting to a server as a client host during server-client matchmaking
- Currently connecting to a server as a group ID connection client host
DWC_STATUS_MATCH_SC_SV- Currently playing a game as a server host during server-client matchmaking

Revision History

5.1 PR2
Added information about functions that can set this callback.

For the changelog prior to 5.1 PR2, click here.


CONFIDENTIAL