1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html> 3 4<head> 5<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 6<META http-equiv="Content-Style-Type" content="text/css"> 7<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.0.0 for Windows"> 8<title>DWC_UpdateServersAsync</title> 9<LINK rel="stylesheet" href="../css/nitro.css" type="text/css"> 10</head> 11 12<body> 13<a name="dwc__main_8h_185472e3beb4ea521c7614ea13c9b0671"></a> 14<h1 align="left">DWC_UpdateServersAsync</h1> 15<h2>Syntax</h2> 16 17<dl> 18 <dd> 19<CODE>#include <dwc.h></CODE><BR> 20 <BR> 21 <PRE><CODE>BOOL <a href=DWC_UpdateServersAsync.html#dwc__main_8h_185472e3beb4ea521c7614ea13c9b0671>DWC_UpdateServersAsync</a>(const char *playerName, 22 <a href=DWCUpdateServersCallback.html#dwc__friend_8h_1d450c6973f85ed869c830337f9b3c02f>DWCUpdateServersCallback</a> updateCallback, 23 void *updateParam, 24 <a href=DWCFriendStatusCallback.html#dwc__friend_8h_14998d3e498bc6e708d41116161731fd4>DWCFriendStatusCallback</a> statusCallback, 25 void *statusParam, 26 <a href=DWCDeleteFriendListCallback.html#dwc__friend_8h_1bbcdbaabb44c850c3bbd54632b72c8a9>DWCDeleteFriendListCallback</a> deleteCallback, 27 void *deleteParam);</CODE></PRE></dd> 28</dl> 29 30<h2>Arguments</h2> 31 32<TABLE border="1" width="100%"> 33 <TBODY> 34 35 <TR> 36<TD width="13%"><EM><STRONG>playerName</STRONG></EM></TD> 37<TD width="87%">Specify NULL. Retained for compatibility with past versions.</TD> 38 </TR> 39 40 <TR> 41<TD width="13%"><EM><STRONG>updateCallback</STRONG></EM></TD> 42<TD width="87%">Pointer to the friend roster synchronization process completion callback function.</TD> 43 </TR> 44 45 <TR> 46<TD width="13%"><EM><STRONG>updateParam</STRONG></EM></TD> 47<TD width="87%">Parameter for the friend roster synchronization process completion callback.</TD> 48 </TR> 49 50 <TR> 51<TD width="13%"><EM><STRONG>statusCallback</STRONG></EM></TD> 52<TD width="87%">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.</TD> 53 </TR> 54 55 <TR> 56<TD width="13%"><EM><STRONG>statusParam</STRONG></EM></TD> 57<TD width="87%">Parameter for the callback that notifies the user about changes to friend status.</TD> 58 </TR> 59 60 <TR> 61<TD width="13%"><EM><STRONG>deleteCallback</STRONG></EM></TD> 62<TD width="87%">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.</TD> 63 </TR> 64 65 <TR> 66<TD width="13%"><EM><STRONG>deleteParam</STRONG></EM></TD> 67<TD width="87%">Parameter for friend roster deletion callback.</TD> 68 </TR> 69 70 </TBODY> 71</TABLE> 72 73<h2>Return Values</h2> 74 75<TABLE border="1" width="100%"> 76 <TBODY> 77 78 <TR> 79<TD width="13%"><EM><STRONG>TRUE</STRONG></EM></TD> 80<TD width="87%">Start friend roster synchronization. The results are indicated via the callback function.</TD> 81 </TR> 82 83 <TR> 84<TD width="13%"><EM><STRONG>FALSE</STRONG></EM></TD> 85<TD width="87%">Not a good state for calling this function.</TD> 86 </TR> 87 88 </TBODY> 89</TABLE> 90 91<H2>Description</H2> 92<p>Synchronizes the GameSpy server and local friend rosters. In order to perform this synchronization, everything up through the login performed by the <A href="DWC_LoginAsync.html"><CODE>DWC_LoginAsync</CODE></a> function must first be completed.</p><p>Set the friend roster in advance by using the <a href="DWC_InitFriendsMatch.html"><CODE>DWC_InitFriendsMatch</CODE></a> function.</p><p>The primary synchronization for the friend roster includes sending friend relationship requests to friends on the local friend roster but not on the GameSpy server friend roster. It also includes deleting 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. It is then delivered immediately after the partner next logs in using the <A href="DWC_LoginAsync.html"><CODE>DWC_LoginAsync</CODE></a> 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 system 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.</p><p>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.</p><p>When the <CODE>isChanged</CODE> argument of the friend roster synchronization 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, the configured friend relationship establishment callback is called with the <A href="DWC_SetBuddyFriendCallback.html"><CODE>DWC_SetBuddyFriendCallback</CODE></a> function.</p><p>Also, if multiple friend information entries about the same friend are found in the roster during friend roster synchronization, all but one of those entries 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. Whenever they are deleted, the callback is called.</p> 93 94<H2>Revision History</H2> 95<DL> 96 97</DL> 98<hr><p>CONFIDENTIAL</p></body> 99</html> 100