#include <dwc.h>
void DWC_CreateFriendKeyToken(DWCFriendData *token,
u64 friend_key);token |
Pointer to the buffer where the friend information to be added to the friend roster is stored |
friend_key |
Friend registration key. |
None.
Uses the friend registration key to create friend information to add to the friend roster. Create friend registration keys to send to other hosts using the DWC_CreateFriendKey function.
When using this function to create friend information, be absolutely sure to check the validity of the friend registration key in advance using the DWC_CheckFriendKey function.
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 same information is not already registered. This avoids duplicate data registration. Next, use the DWC_IsValidFriendData function 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 relationship 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.
Note: Starting with NITRO-DWC 3.0, a different method is employed to generate the value used to check the validity of friend registration keys. Because of this change, the friend registration keys created with older versions of NITRO-DWC are no longer compatible. If for some special reason you need to handle these legacy friend registration keys, use the DWC_CreateFriendKeyLegacy and DWC_CheckFriendKeyLegacy functions.
DWC_CreateExchangeToken
DWC_CheckFriendKey
DWC_CreateFriendKey
DWC_IsEqualFriendData
DWC_IsValidFriendData
DWC_DeleteBuddyFriendData
DWC_CanChangeFriendList
DWC_UpdateServersAsync
For the changelog prior to 5.1 PR2, click here.
CONFIDENTIAL