gpGetBuddyIndex
This function checks a remote profile to see if it is a buddy. If it is a buddy, the buddy’s index is returned. If it is not a buddy, the index will be set to -1.
- GPResult gpGetBuddyIndex(
- GPConnection * connection,
- GPProfile profile,
- int * index );
Routine | Required Header | Distribution |
---|---|---|
gpGetBuddyIndex | <gp.h> | SDKZIP |
Return Value
This function returns GP_NO_ERROR upon success. Otherwise a valid GPResult is returned.
Parameters
- connection
- [in] A GP connection interface.
- profile
- [in] The profile ID of the buddy.
- index
- [out] The internal array index of the buddy.
Remarks
This function is used to check if a remote profile is a buddy and to get its buddy index if it is a buddy. This buddy index can then be used in a call to gpGetBuddyStatus.
The buddy index may become invalid after a buddy is added to or deleted from the buddy list. If the profile is not a buddy, GP_NO_ERROR will be returned (as long as no other errors happen), and index will be set to -1.
Section Reference: Gamespy Presence SDK