DWC_GetMatchingOption

C Specification

#include <dwc.h>

int DWC_GetMatchingOption( DWCMatchOptType opttype,
                           void* optval,
                           int*  optlen );

Description

This function gets the configurations for the matchmaking options features. Be sure to designate in optval the pointer used to store the data necessary for each of the options specified in opttype.

In order to configure the matchmaking options, the DWC_InitFriendsMatch function must be called and the FriendsMatch Library must be started. If the FriendsMatch Library is running, the matchmaking options can be configured with the DWC_SetMatchingOption function. The configured matchmaking options remain valid until the DWC_ShutdownFriendsMatch function is called to shut down the FriendsMatch Library.

The options are as follows:


opttype The optval type. Description
DWC_MATCH_OPTION_MIN_COMPLETE The DWCMatchOptMinComplete structure. For peer matchmaking, allows matchmaking for fewer than the number of people specified with the functions DWC_ConnectToAnybodyAsync and DWC_ConnectToFriendsAsync, even when matchmaking does not complete after a fixed amount of time. The DWC_GetMOMinCompState function can be used to determine whether matchmaking is still within the specified amount of time.
DWC_MATCH_OPTION_SC_CONNECT_BLOCK BOOL On the server DS in server-client matchmaking, does not accept any other connections once a single client DS has successfully connected.
To start accepting connections again, call the DWC_ClearMOSCConnectBlock function. Use the DWC_GetMOSCConnectBlockState function to determine whether or not connections are blocked.
The DWC_ERROR_MO_SC_CONNECT_BLOCK error is generated for the client DS that is blocking connection requests.
optval indicates whether options are enabled (TRUE) or disabled (FALSE).

Arguments

opttype The type of matchmaking option. This is defined with DWC_MATCH_OPTION_*.
optval The pointer to where the matchmaking option configuration values are stored. Pass a pointer to the type corresponding to opttype. Nothing is returned if the matchmaking options specified in opttype are not configured.
optlen The pointer to where the size of the value expressed in optval is stored. A zero is returned if the matchmaking options specified in opttype are not configured.

Return Values

DWC_SET_MATCH_OPT_RESULT_SUCCESS The matchmaking options were successfully obtained.
DWC_SET_MATCH_OPT_RESULT_E_BAD_STATE The FriendsMatch Library is not running.
DWC_SET_MATCH_OPT_RESULT_E_INVALID Invalid options have been specified in opttype.
DWC_SET_MATCH_OPT_RESULT_E_PARAM NULL was specified in optval.

See Also

DWC_SetMatchingOption, DWC_GetMOMinCompState, DWC_GetMOSCConnectBlockState, DWC_ClearMOSCConnectBlock, DWC_InitFriendsMatch, DWC_ShutdownFriendsMatch, DWC_ConnectToAnybodyAsync, DWC_ConnectToFriendsAsync, DWCMatchOptMinComplete

Revision History

02/21/2006 Added a description of optval
01/31/2006 Included a link to the FriendsMatch Library
12/16/2005 Initial version