nn::friends::CTR::GetFriendPresence Function

Syntax

Result GetFriendPresence(
     FriendPresence * pFriendPresenceList,
     const FriendKey * pFriendKeyList,
     size_t size = 1
);

Arguments

Name Description
out pFriendPresenceList Specifies a pointer to a buffer storing obtained friend presence information.
in pFriendKeyList Specifies a pointer to a list of friend keys.
in size Specifies the number of buffer elements in the friend key list.

Return Values

Returns the result of the operation.

Value Description
Result::IsSuccess Process succeeded.
ResultInvalidPointer Invalid pointer passed as argument.
ResultTooLarge The value passed as the argument is too large.
ResultNotInitialized The friend presence library is not initialized.
Other Another result may be returned, depending on the internal state of the daemon and other factors.

Description

Gets a list of friend presence information.

Cannot acquire the invitation flag and game mode of a friend who has a different matchmaking game ID specified.

Returns an empty presence in this buffer if there is no friend corresponding to the key passed in the arguments. In this case the function still returns success.

The function retrieves an empty presence when a non-existent friend is specified. This is represented by a nn::friends::CTR::FriendPresence structure that has isValid set to false. If the friend is offline, or has made the online status private, then the obtained presence will have isValid set to true, but isOnline will be false, and the gameMode structure will be filled with zeros.

Revision History

2011/10/26
Added note about values of obtained presence flags.
2011/03/11
Noted that the function will still return success even if an empty presence is returned.
Revised a part of text in Description.
Added specific examples of return values.
2010/08/16
Initial version.

CONFIDENTIAL