#include <dwc.h>
void DWC_CreateExchangeToken(const DWCUserData *userdata,
DWCFriendData *token);userdata |
Pointer to the DWCUserData structure where the user data is stored. |
token |
Pointer to the buffer that stores the friend information to send over DS Wireless Communication. |
None.
Uses one's own user data as specified in userdata to create the friend information that is exchanged during DS Wireless Communication. The token created with this function is sent with DS Wireless Communication. The side that receives this token registers it in the friend roster as friend information.
Note: There is no friend relationship established when friend information is exchanged between titles having different gamecode values specified by the DWC_CreateUserData function. This is true even if the same gameName and other arguments have been specified for these titles by the DWC_InitFriendsMatch function.
If you are using DS Wireless Communications to exchange friend information between titles with different gamecode specifications (or if there is a possibility that this will occur), we recommend that the application verify that they have the same gamecode (as specified by the DWC_CreateUserData function) and then make the addition to the friend roster.
When registering friend information in the friend roster, first check all of the friend information on the roster using the DWC_IsEqualFriendData function to verify that the information is not already registered. This avoids duplicate data registration. Next, use DWC_IsValidFriendData to search for a location in the roster that does not contain valid data. Copy the obtained friend information directly to the friend roster at that location.
When you want to delete friend information from the friend roster, call the DWC_DeleteBuddyFriendData function. When the local host is offline, this simply zero-clears the friend information. The next time the DWC_UpdateServersAsync function is called, the friend relationship on the GameSpy server will also be deleted. When online, friend information is zero-cleared, and the friend-related information on the GameSpy server is deleted immediately.
The friend roster may sometimes automatically change while online, based on a request from a GameSpy server. To edit the friend roster while online, use the DWC_CanChangeFriendList function to check whether the roster can be edited.
To establish a friend relationship by editing the friend roster while online, call the DWC_UpdateServersAsync function.
DWC_CreateFriendKeyToken
DWC_IsEqualFriendData
DWC_IsValidFriendData
DWC_DeleteBuddyFriendData
DWC_CanChangeFriendList
DWC_UpdateServersAsync
DWC_CreateUserData
DWC_InitFriendsMatch
For the change log prior to 5.1 PR2, click here.
CONFIDENTIAL