nn::friends::CTR Namespace

Description

The namespace of the CTR friends library.

(This namespace can also be written without the ::CTR portion.)

Enumerated Types

PlatformCode Enumerated type representing platform types.
AttributeFlag Enumerated type representing friend relationships using attribute flags.
NotificationType Enumerated type representing notification types.
NotificationMask Enumerated type representing notification bitmasks.
JoinAvailability Enumerated type representing status of accepting participation.
MatchmakeSystemType Enumerated type indicating the conditions under which joining in is allowed.

typedef Definitions

PrincipalId Represents a principal ID.
LocalFriendCode Represents a local friend code.
FriendKey Structure for comprehensively handling users' principal IDs and local friend codes.
Profile Structure storing a user's profile information.
MiiData Structure storing Mii data.
GameMode Structure storing information about the game the local host is currently playing. This information is required for friends to join in.
MyPresence Structure storing the local user's presence information.
FriendPresence Structure storing friend presence information.
EventNotification Structure storing notifications of changes in the local host's online state and friends' online states.
ApproachContext This structure contains the current user's friend presence account information, in order to allow other users to register the user as a friend.

Constants

S INVALID_PRINCIPAL_ID const PrincipalId Invalid principal ID.
S INVALID_LOCAL_FRIEND_CODE const LocalFriendCode Invalid local friend code.
S SCREEN_NAME_SIZE const u32 The number of elements in the buffer for the screen name. Includes the terminating character.
S MODE_DESCRIPTION_SIZE const u32 The number of elements in the buffer for the game mode description string. Includes the terminating character.
S MII_SIZE const u32 The size of the Mii character binary data.
S FRIEND_LIST_SIZE const u32 The size of the friend list. This is the maximum number of users that can be registered to the friend list.

Functions

Initialize Initializes the friend presence library and makes the presence features available for use.
Finalize Finalizes the friend presence library.
IsInitialized Checks whether the friend presence library is initialized.
HasLoggedIn Checks the login status of the local application.
Login Requests a login to the server.
Logout Retracts a login request to a server.
GetMyPrincipalId Gets the local host's principal ID.
IsMyPreferenceValid Returns a value indicating whether the user has already configured how much personal information is disclosed.
GetMyPreference Gets values that indicate how much personal information is disclosed.
GetMyProfile Gets the local host's profile information.
GetMyPresence Gets the local host's presence information.
GetMyScreenName Obtains the user's own screen name.
GetMyMii Gets Personal Mii data.
GetFriendKeyList Gets a list of the friend keys registered in the friend list.
GetFriendPresence Gets a list of friend presence information.
GetFriendScreenName Gets a list of friend screen names.
GetFriendMii Gets a list of friends' Mii data.
GetFriendProfile Gets a list of friends' profile information.
GetFriendAttributeFlags Gets a list of friend relationships.
UnscrambleLocalFriendCode Decodes a friend's encoded local friend code.
UpdateGameModeDescription Updates the game mode description string.
UpdateGameMode Updates the game mode.
AttachToEventNotification Specifies an event that notifies of changes in the local host's login state and friends' login states.
SetNotificationMask Specifies the type of notification received.
GetEventNotification Gets the history of notifications of changes in the local user's online state and/or friends' online states.
GetLastResponseResult Gets the result of the completed asynchronous operation.
ResultToErrorCode Gets an error code from a friend presence library function result.
IsFromFriendList Determines whether the application was started by pressing the "Join game being played" on the friend list.
GetMyApproachContext Gets the local account information as a pack, required to be registered as other user's friend.
AddFriendWithApproach Adds a user that includes an approach context to the friend list.
GetApproachContextScreenName Gets the user's display name included in the approach context.
GetApproachContextMii Gets the user's Mii character included in the approach context.

Revision History

2011/12/16
Added ApproachContext structure.
Added GetMyApproachContext function.
Added AddFriendWithApproach function.
Added GetApproachContextScreenName function.
Added GetApproachContextMii function.
2011/09/07
Added the IsMyPreferenceValid function.
2011/08/30
Added the UpdateGameMode function.
Added the IsFromFriendList function.
2011/03/14
Corrected typos.
2010/08/16
Initial version.

CONFIDENTIAL