#include <dwc.h>
BOOL DWC_UpdateServersAsync(
const char* reserved,
DWCUpdateServersCallback updateCallback,
void* updateParam,
DWCFriendStatusCallback statusCallback,
void* statusParam,
DWCDeleteFriendListCallback deleteCallback,
void* deleteParam);
Synchronizes the GameSpy server and local friend rosters. In order to perform this synchronization process, the DWC_LoginAsync function must first be used to complete everything up to the login.
Set the friend roster in advance by using the DWC_InitFriendsMatch
function. For information about cautions to take when editing friend rosters, see the DWC_CreateExchangeToken
function description.
The primary synchronization processes for the friend roster is to send friend relationship requests to friends on the local friend roster but not on the GameSpy server friend roster and to delete friend information on the GameSpy server friend roster that is not on the local friend roster. Even if the partner who is sent the friend relationship request is offline, the request is saved on the GameSpy server and is delivered after the partner logs in using the DWC_LoginAsync function. The friend relationship is established only when the partner also has this information on his local friend roster. However, this only registers the partner as a friend on the DS of the person sending the request. Partners that receive friend relationship requests automatically follow the same process to register the requesting party as a friend.
Bear in mind that the friend roster synchronization process completion callback is called only after all the local and GameSpy server friend rosters are checked, the necessary friend relationship requests are sent, and the unnecessary friend information is deleted. Even though a callback has been returned, it does not mean that all friend relationships have been established.
When the isChanged
argument of the friend roster synchronization process completion callback is TRUE, this indicates that some of the friend information in the local friend roster has been updated and the local friend roster must be saved. If friend relationships are established outside of the friend roster synchronization process, the configured friend relationship establishment callback is called with the DWC_SetBuddyFriendCallback function.
Also, if multiple friend information entries about the same friend are found in the roster during the friend roster synchronization process, all except one of them will be deleted. Indices inside the friend rosters in deleted friendship information and indices that are determined to be identical information are considered to be arguments, and each time they are deleted a callback is called.
reserved |
Specify NULL. Retained for compatibility with past versions. |
updateCallback |
Pointer to the friend roster synchronization process completion callback function. |
updateParam |
Parameter for the friend roster synchronization process completion callback. |
statusCallback |
Pointer to the callback function that notifies the user about changes to friend status. Even if the friend roster synchronization process has completed, this callback function is called each time there are changes to a friend's communication status. |
statusParam |
Parameter for the callback that notifies the user about changes to friend status. |
deleteCallback |
Pointer to the callback function that deletes information from the friend roster. Even if the friend roster synchronization process has completed, there is the possibility that this callback function may be called when a friend relationship is established. |
deleteParam |
Parameter for friend roster deletion callback. |
TRUE |
Start the friend roster synchronization process. The results are indicated via the callback function. |
FALSE |
Not a good state for calling this function. |
DWC_InitFriendsMatch, DWC_CreateExchangeToken, DWC_SetBuddyFriendCallback, DWCUpdateServersCallback, DWCFriendStatusCallback, DWCDeleteFriendListCallback
2005/12/16 Added a detailed description of the friend roster synchronization process
2005/11/01 Revisions
2005/07/22 Initial version