#include <dwc.h>
void DWC_CreateExchangeToken( const DWCUserData* userdata, DWCFriendData* token );
This function 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 which receives this token registers it in the friend roster as friend information.
Note: Friend information exchanged between titles with different game codes specified with DWC_CreateUserData will not result in a friend relationship even if the same communication group is specified with the DWC_InitFriendsMatch function.
If exchanging friend information using DS Wireless Communication between titles with different game codes specified (or if there is a possibility of this situation), it is recommended that the data be added to the friend roster after verifying on the application side that the same game codes were specified with the DWC_CreateUserData function.
When registering friend information in the friend roster, first check all the friend information on the roster using the DWC_IsEqualFriendData function to verify that the information does is not already registered to avoid duplicate data registration, then search for a location in the roster that does not contain valid data using DWC_IsValidFriendData and directly copy the obtained friend information to the friend roster at that location.
When you want to delete friend information from the friend roster, call the DWC_DeleteBuddyFriendData function. When offline, friend information is simply cleared with 0. The next time the DWC_UpdateServersAsync function is called, the friend-related information on the GameSpy server is deleted. When online, friend information is cleared with 0 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 or not the list can be edited.
To establish a friend relationship by editing the friend roster while online, use the DWC_UpdateServersAsync function.
userdata |
Pointer to the DWCUserData structure where user data is stored. |
token |
Pointer to the buffer that stores the friend information to send over DS wireless communication. |
None.
DWC_CreateFriendKeyToken , DWC_IsEqualFriendData, DWC_IsValidFriendData, DWC_DeleteBuddyFriendData, DWC_CanChangeFriendList, DWC_UpdateServersAsync, DWC_CreateUserData, DWC_InitFriendsMatch
2007/01/25 Added caution about cases in which friend relationships are not established.
2005/12/16 Revisions.
2005/10/26 Revisions.
2005/10/20 Initial version.
CONFIDENTIAL