libctru v2.5.0
|
Friend Services. More...
#include <3ds/mii.h>
Go to the source code of this file.
Data Structures | |
struct | FriendKey |
Friend key data. More... | |
struct | GameKey |
Game key data. More... | |
struct | Profile |
Base profile data. More... | |
struct | FriendProfile |
Friend profile data. More... | |
struct | Presence |
Base presence data. More... | |
struct | MyPresence |
Current user's presence data. More... | |
struct | FriendPresence |
Friend presence data. More... | |
struct | FriendMii |
Friend Mii data. More... | |
struct | FriendPlayingGame |
Friend playing game structure. More... | |
struct | FriendInfo |
Friend info structure. More... | |
struct | NotificationEvent |
Friend Notification Event structure. More... | |
struct | GameAuthenticationData |
Game Authentication Data structure. More... | |
struct | ServiceLocatorData |
Service Locator Data strcture. More... | |
struct | ApproachContext |
Encrypted inner Approach Context structure. More... | |
struct | EncryptedApproachContext |
Encrypted Approach Context structure. More... | |
struct | DecryptedApproachContext |
Decrypted Approach Context structure. More... | |
Typedefs | |
typedef u16 | FriendComment[FRIEND_COMMENT_LEN] |
typedef u16 | FriendGameModeDescription[FRIEND_GAME_MODE_DESCRIPTION_LEN] |
typedef u16 | ScrambledFriendCode[6] |
typedef char | NfsTypeStr[NFS_TYPESTR_LEN] |
Enumerations | |
enum | CharacterSet { CHARSET_JPN_USA_EUR = 0 , CHARSET_CHN , CHARSET_KOR , CHARSET_TWN } |
Enum for character set. More... | |
enum | NASCResult { NASC_SUCCESS = 001 , NASC_SERVER_UNDER_MAINTENANCE = 101 , NASC_DEVICE_BANNED = 102 , NASC_INVALID_PRODUCT_CODE = 107 , NASC_INVALID_REQUEST_PARAM = 109 , NASC_SERVER_NO_LONGER_AVAILABLE = 110 , NASC_INVALID_SVC = 112 , NASC_INVALID_FPD_VERSION = 119 , NASC_INVALID_TITLE_VERSION = 120 , NASC_INVALID_DEVICE_CERTIFICATE = 121 , NASC_INVALID_PID_HMAC = 122 , NASC_BANNED_ROM_ID = 123 , NASC_INVALID_GAME_ID = 125 , NASC_INVALID_KEY_HASH = 127 } |
Enum for NASC Result. | |
enum | NASCEnvironment { NASC_PRODUCTION = 0 , NASC_TESTING , NASC_DEVELOPMENT } |
Enum for NASC Server Environment. | |
enum | FriendNotificationTypes { USER_WENT_ONLINE = 1 , USER_WENT_OFFLINE , FRIEND_WENT_ONLINE , FRIEND_UPDATED_PRESENCE , FRIEND_UPDATED_MII , FRIEND_UPDATED_PROFILE , FRIEND_WENT_OFFLINE , FRIEND_REGISTERED_USER , FRIEND_SENT_JOINABLE_INVITATION , FRIEND_CHANGED_GAME_MODE_DESCRIPTION = 145 , FRIEND_CHANGED_FAVORITE_GAME = 146 , FRIEND_CHANGED_COMMENT = 147 , FRIEND_CHANGED_ANY_PRESENCE = 148 , FRIEND_SENT_ANY_INVITATION = 149 } |
Enum for notification event types. More... | |
enum | FriendNotificationMask { MASK_USER_WENT_ONLINE = BIT(USER_WENT_ONLINE - 1) , MASK_USER_WENT_OFFLINE = BIT(USER_WENT_OFFLINE - 1) , MASK_FRIEND_WENT_ONLINE = BIT(FRIEND_WENT_ONLINE - 1) , MASK_FRIEND_UPDATED_PRESENCE = BIT(FRIEND_UPDATED_PRESENCE - 1) , MASK_FRIEND_UPDATED_MII = BIT(FRIEND_UPDATED_MII - 1) , MASK_FRIEND_UPDATED_PROFILE = BIT(FRIEND_UPDATED_PROFILE - 1) , MASK_FRIEND_WENT_OFFLINE = BIT(FRIEND_WENT_OFFLINE - 1) , MASK_FRIEND_REGISTERED_USER = BIT(FRIEND_REGISTERED_USER - 1) , MASK_FRIEND_SENT_JOINABLE_INVITATION = BIT(FRIEND_SENT_JOINABLE_INVITATION - 1) } |
Enum for notification event mask. | |
enum | RelationshipType { RELATIONSHIP_INCOMPLETE = 0 , RELATIONSHIP_COMPLETE , RELATIONSHIP_NOT_FOUND , RELATIONSHIP_DELETED , RELATIONSHIP_LOCAL } |
Enum for friend relationship type. More... | |
enum | FriendAttributes { FRIEND_ATTRIBUTE_EVER_REGISTERED = BIT(0) , FRIEND_ATTRIBUTE_REGISTRATION_COMPLETE = BIT(1) } |
Enum for friend attributes according to relationship type. More... | |
enum | NatMappingType { NAT_MAPPING_UNKNOWN = 0 , NAT_MAPPING_ENDPOINT_INDEPENDENT , NAT_MAPPING_ENDPOINT_DEPENDENT } |
Enum for NAT mapping type. | |
enum | NatFilteringType { NAT_FILTERING_UNKNOWN = 0 , NAT_FILTERING_PORT_INDEPENDENT , NAT_FILTERING_PORT_DEPENDENT } |
Enum for NAT filtering type. | |
Functions | |
Result | frdInit (bool forceUser) |
Initializes friend services. | |
void | frdExit (void) |
Exits friend services. | |
Handle * | frdGetSessionHandle (void) |
Get the friend user/admin service handle. | |
Result | FRD_HasLoggedIn (bool *state) |
Gets the login status of the current user. | |
Result | FRD_IsOnline (bool *state) |
Gets the online status of the current user. | |
Result | FRD_Login (Handle event) |
Log in to Nintendo's friend server. | |
Result | FRD_Logout (void) |
Logs out of Nintendo's friend server. | |
Result | FRD_GetMyFriendKey (FriendKey *key) |
Gets the current user's friend key. | |
Result | FRD_GetMyPreference (bool *isPublicMode, bool *isShowGameName, bool *isShowPlayedGame) |
Gets the current user's privacy information. | |
Result | FRD_GetMyProfile (Profile *profile) |
Gets the current user's profile information. | |
Result | FRD_GetMyPresence (MyPresence *presence) |
Gets the current user's presence information. | |
Result | FRD_GetMyScreenName (MiiScreenName *name) |
Gets the current user's screen name. | |
Result | FRD_GetMyMii (FriendMii *mii) |
Gets the current user's Mii data. | |
Result | FRD_GetMyLocalAccountId (u8 *localAccountId) |
Gets the ID of the current local account. | |
Result | FRD_GetMyPlayingGame (GameKey *playingGame) |
Gets the current user's playing game. | |
Result | FRD_GetMyFavoriteGame (GameKey *favoriteGame) |
Gets the current user's favourite game. | |
Result | FRD_GetMyNcPrincipalId (u32 *ncPrincipalId) |
Gets the NcPrincipalId for the current user. | |
Result | FRD_GetMyComment (FriendComment *comment) |
Gets the current user's comment on their friend profile. | |
Result | FRD_GetMyPassword (char *password, u32 bufsize) |
Gets the current friend account's NEX password. | |
Result | FRD_GetFriendKeyList (FriendKey *friendKeyList, u32 *num, u32 offset, u32 size) |
Gets the current user's friend key list. | |
Result | FRD_GetFriendPresence (FriendPresence *friendPresences, const FriendKey *friendKeyList, u32 count) |
Gets friend presence data for the current user's friends. | |
Result | FRD_GetMiiScreenName (MiiScreenName *screenNames, u32 screenNamesLen, u8 *characterSets, u32 characterSetsLen, const FriendKey *friendKeyList, u32 count, bool maskNonAscii, bool profanityFlag) |
Gets screen names for the current user's friends. | |
Result | FRD_GetFriendMii (FriendMii *miiList, const FriendKey *friendKeyList, u32 count) |
Gets the current user's friends' Mii data. | |
Result | FRD_GetFriendProfile (Profile *profiles, const FriendKey *friendKeyList, u32 count) |
Get the current user's friends' profile data. | |
Result | FRD_GetFriendRelationship (u8 *relationships, const FriendKey *friendKeyList, u32 count) |
Get the relationship type for the current user's friends. | |
Result | FRD_GetFriendAttributeFlags (u32 *attributes, const FriendKey *friendKeyList, u32 count) |
Get attributes for the current user's friends. | |
Result | FRD_GetFriendPlayingGame (FriendPlayingGame *playingGames, const FriendKey *friendKeyList, u32 count) |
Get the current user's friends' playing game. | |
Result | FRD_GetFriendFavoriteGame (GameKey *favoriteGames, const FriendKey *friendKeyList, u32 count) |
Get the current user's friends' favourite games. | |
Result | FRD_GetFriendInfo (FriendInfo *infos, const FriendKey *friendKeyList, u32 count, bool maskNonAscii, bool profanityFlag) |
Get info about the current user's friends. | |
Result | FRD_IsInFriendList (u64 friendCode, bool *isFromList) |
Gets whether a friend code is included in the current user's friend list. | |
Result | FRD_UnscrambleLocalFriendCode (u64 *unscrambled, ScrambledFriendCode *scrambled, u32 count) |
Unscrambles a scrambled friend code. | |
Result | FRD_UpdateGameModeDescription (FriendGameModeDescription *desc) |
Updates the game mode description string. | |
Result | FRD_UpdateMyPresence (Presence *presence, FriendGameModeDescription *desc) |
Updates the current user's presence data and game mode description. | |
Result | FRD_SendInvitation (const FriendKey *friendKeyList, u32 count) |
Sends an invitation to the current user's friends. | |
Result | FRD_AttachToEventNotification (Handle event) |
Registers the event handle that will be signaled to inform the session of various status changes. | |
Result | FRD_SetNotificationMask (FriendNotificationMask mask) |
Sets the notification mask for the event notification system. | |
Result | FRD_GetEventNotification (NotificationEvent *event, u32 count, u32 *recievedNotifCount) |
Get Latest Event Notification. | |
Result | FRD_GetLastResponseResult () |
Get the result of the last internal operation. | |
Result | FRD_PrincipalIdToFriendCode (u32 principalId, u64 *friendCode) |
Returns the friend code using the given principal ID. | |
Result | FRD_FriendCodeToPrincipalId (u64 friendCode, u32 *principalId) |
Returns the principal ID using the given friend code. | |
Result | FRD_IsValidFriendCode (u64 friendCode, bool *isValid) |
Checks if the friend code is valid. | |
Result | FRD_ResultToErrorCode (u32 *errorCode, Result res) |
Get a support error code (XXX-YYYY) for the given result code. | |
Result | FRD_RequestGameAuthentication (u32 serverId, u16 *ingamesn, u32 ingamesnSize, u8 majorSdkVersion, u8 minorSdkVersion, Handle completionEvent) |
Requests game server authentication. | |
Result | FRD_GetGameAuthenticationData (GameAuthenticationData *data) |
Get game server authentication data requested using FRD_RequestGameAuthentication. | |
Result | FRD_RequestServiceLocator (u32 serverId, char *keyhash, char *svc, u8 majorSdkVersion, u8 minorSdkVersion, Handle completionEvent) |
Request service locator info for a given NEX server. | |
Result | FRD_GetServiceLocatorData (ServiceLocatorData *data) |
Get service locator data requested using FRD_RequestServiceLocator. | |
Result | FRD_DetectNatProperties (Handle completionEvent) |
Starts an internal task to determine the NAT properties of the current internet connection. | |
Result | FRD_GetNatProperties (u32 *natMappingType, u32 *natFilteringType) |
Returns NAT properties for the current internet connection. | |
Result | FRD_GetServerTimeDifference (u64 *diff) |
Returns the difference (in nanoseconds) between server time and device time. | |
Result | FRD_AllowHalfAwake (bool allow) |
Configures the current session to allow or disallow running the friends service in sleep mode (half-awake mode). | |
Result | FRD_GetServerTypes (u8 *nascEnvironment, u8 *nfsType, u8 *nfsNo) |
Gets the server environment configuration for the current user. | |
Result | FRD_GetFriendComment (FriendComment *comments, u32 commentsLen, const FriendKey *friendKeyList, u32 count) |
Gets the comment (personal) message of the current user's friends. | |
Result | FRD_SetClientSdkVersion (u32 sdkVer) |
Sets the Friend API to use a specific SDK version. | |
Result | FRD_GetMyApproachContext (EncryptedApproachContext *ctx) |
Gets the current user's encrypted approach context. | |
Result | FRD_AddFriendWithApproach (u8 *unkbuf, u32 unkbufSize, EncryptedApproachContext *ctx, Handle completionEvent) |
Adds a friend using their encrypted approach context. | |
Result | FRD_DecryptApproachContext (DecryptedApproachContext *decryptedContext, EncryptedApproachContext *encryptedContext, bool maskNonAscii, u8 characterSet) |
Decrypts an encrypted approach context. | |
Result | FRD_GetExtendedNatProperties (u32 *natMappingType, u32 *natFilteringType, u32 *natMappingPortIncrement) |
Gets extended NAT properties. | |
Result | FRDA_CreateLocalAccount (u8 localAccountId, u8 nascEnvironment, u8 nfsType, u8 nfsNo) |
Creates a new local friends account. | |
Result | FRDA_DeleteLocalAccount (u8 localAccountId) |
Deletes a local friends account. | |
Result | FRDA_LoadLocalAccount (u8 localAccountId) |
Loads a local friends account. | |
Result | FRDA_UnloadLocalAccount () |
Unloads the currently active local account. | |
Result | FRDA_Save () |
Saves all data of the friends module. | |
Result | FRDA_AddFriendOnline (Handle event, u32 principalId) |
Adds a friend online ("Internet" option). | |
Result | FRDA_AddFriendOffline (FriendKey *friendKey, FriendMii *mii, FriendProfile *friendProfile, MiiScreenName *screenName, bool profanityFlag, u8 characterSet) |
Adds a friend offline ("Local" option). | |
Result | FRDA_UpdateMiiScreenName (FriendKey *friendKey, MiiScreenName *screenName, u8 characterSet) |
Updates a friend's display name. | |
Result | FRDA_RemoveFriend (u32 principalId, u64 localFriendCode) |
Remove a friend. | |
Result | FRDA_UpdatePlayingGame (GameKey *playingGame) |
Updates the game being played by the current user. | |
Result | FRDA_UpdatePreference (bool isPublicMode, bool isShowGameMode, bool isShowPlayedMode) |
Updates the current user's friend list preferences. | |
Result | FRDA_UpdateMii (FriendMii *mii, MiiScreenName *screenName, bool profanityFlag, u8 characterSet) |
Updates the current user's Mii. | |
Result | FRDA_UpdateFavoriteGame (GameKey *favoriteGame) |
Updates the current user's favorite game. | |
Result | FRDA_SetNcPrincipalId (u32 ncPrincipalId) |
Sets the NcPrincipalId of the current user. | |
Result | FRDA_UpdateComment (FriendComment *comment) |
Updates the current user's comment (personal message). | |
Result | FRDA_IncrementMoveCount () |
Increments the move count in the current local account's save data. | |
Friend Services.
enum CharacterSet |
enum FriendAttributes |
Enum for friend attributes according to relationship type.
Enum for notification event types.
Enumerator | |
---|---|
USER_WENT_ONLINE | Self went online. |
USER_WENT_OFFLINE | Self went offline. |
FRIEND_WENT_ONLINE | Friend Went Online. |
FRIEND_UPDATED_PRESENCE | Friend Presence changed (with matching GameJoinID) |
FRIEND_UPDATED_MII | Friend Mii changed. |
FRIEND_UPDATED_PROFILE | Friend Profile changed. |
FRIEND_WENT_OFFLINE | Friend went offline. |
FRIEND_REGISTERED_USER | Friend registered self as friend. |
FRIEND_SENT_JOINABLE_INVITATION | Friend sent invitation (with matching GameJoinID) |
FRIEND_CHANGED_GAME_MODE_DESCRIPTION | Friend changed game mode description. |
FRIEND_CHANGED_FAVORITE_GAME | Friend changed favorite game. |
FRIEND_CHANGED_COMMENT | Friend changed comment. |
FRIEND_CHANGED_ANY_PRESENCE | Friend Presence changed (with nonmatching GameJoinID) |
FRIEND_SENT_ANY_INVITATION | Friend sent invitiation (with nonmatching GameJoinID) |
enum RelationshipType |
Enum for friend relationship type.
Result FRD_AddFriendWithApproach | ( | u8 * | unkbuf, |
u32 | unkbufSize, | ||
EncryptedApproachContext * | ctx, | ||
Handle | completionEvent | ||
) |
Adds a friend using their encrypted approach context.
unkbuf | Pointer to unknown (and unused) data. |
unkbufSize | Size of unknown (and unused) data. (max: 0x600) |
ctx | Pointer to encrypted approach context data. |
completionEvent | The event handle to signal when this action is completed. |
Result FRD_AllowHalfAwake | ( | bool | allow | ) |
Configures the current session to allow or disallow running the friends service in sleep mode (half-awake mode).
allow | Whether or not to enable half-awake mode. |
Registers the event handle that will be signaled to inform the session of various status changes.
event | The event handle to register for notification signaling. |
Result FRD_DecryptApproachContext | ( | DecryptedApproachContext * | decryptedContext, |
EncryptedApproachContext * | encryptedContext, | ||
bool | maskNonAscii, | ||
u8 | characterSet | ||
) |
Decrypts an encrypted approach context.
decryptedContext | Pointer to write the decrypted approach context data to. |
encryptedContext | Pointer to input encrypted approach context. |
maskNonAscii | Whether or not to replace all non-ASCII characters with question marks ('?') if the given character set doesn't match that of the corresponding friend's Mii data. |
characterSet | The character set to use for text conversions. |
Starts an internal task to determine the NAT properties of the current internet connection.
completionEvent | The event handle to signal once the task has completed. |
Returns the principal ID using the given friend code.
friendCode | The friend code being used. |
principalId | Pointer to write the principal ID to. |
Result FRD_GetEventNotification | ( | NotificationEvent * | event, |
u32 | count, | ||
u32 * | recievedNotifCount | ||
) |
Get Latest Event Notification.
event | Pointer to write recieved notification event struct to. |
count | Number of events |
recievedNotifCount | Number of notification reccieved. |
Result FRD_GetExtendedNatProperties | ( | u32 * | natMappingType, |
u32 * | natFilteringType, | ||
u32 * | natMappingPortIncrement | ||
) |
Gets extended NAT properties.
This is the same as FRD_GetNatProperties, with this version also returning the NAT Mapping Port Increment.
natMappingType | Pointer to write the NAT mapping type of the connection to. |
natFilteringType | Pointer to write the NAT filtering type of the connection to. |
natMappingPortIncrement | Pointer to write the NAT mapping port increment to. |
Get attributes for the current user's friends.
attributes | Pointer to output the attributes to. |
friendKeyList | Pointer to input friend keys to query attributes for. |
count | Number of input friend keys. |
Result FRD_GetFriendComment | ( | FriendComment * | comments, |
u32 | commentsLen, | ||
const FriendKey * | friendKeyList, | ||
u32 | count | ||
) |
Gets the comment (personal) message of the current user's friends.
comments | Pointer to write the friend comment data to. |
commentsLen | Number of UTF-16 characters screenNames can hold. (max: 0xC00) |
friendKeyList | Pointer to input friend keys. |
count | Number of input friend keys. |
Result FRD_GetFriendFavoriteGame | ( | GameKey * | favoriteGames, |
const FriendKey * | friendKeyList, | ||
u32 | count | ||
) |
Get the current user's friends' favourite games.
favoriteGames | Pointer to write game key data to. |
friendKeyList | Pointer to friend keys. |
count | Number of friend keys. |
Result FRD_GetFriendInfo | ( | FriendInfo * | infos, |
const FriendKey * | friendKeyList, | ||
u32 | count, | ||
bool | maskNonAscii, | ||
bool | profanityFlag | ||
) |
Get info about the current user's friends.
infos | Pointer to output friend info data to. |
friendKeyList | Pointer to input friend keys. |
count | Number of input friend keys. |
maskNonAscii | Whether or not to replace all non-ASCII characters with question marks ('?') if the given character set doesn't match that of the corresponding friend's Mii data. |
profanityFlag | Setting this to true replaces the screen names with all question marks ('?') if profanityFlag is also set in the corresponding friend's Mii data. |
Gets the current user's friend key list.
friendKeyList | Pointer to write the friend key list to. |
num | Stores the number of friend keys obtained. |
offset | The index of the friend key to start with. |
size | Size of the friend key list. (FRIEND_LIST_SIZE) |
Gets the current user's friends' Mii data.
miiList | Pointer to write Mii data to. |
friendKeyList | Pointer to input friend keys. |
count | Number of input friend keys. |
Result FRD_GetFriendPlayingGame | ( | FriendPlayingGame * | playingGames, |
const FriendKey * | friendKeyList, | ||
u32 | count | ||
) |
Get the current user's friends' playing game.
playingGames | Pointer to write playing game data to. |
friendKeyList | Pointer to friend keys. |
count | Number of input friend keys. |
Result FRD_GetFriendPresence | ( | FriendPresence * | friendPresences, |
const FriendKey * | friendKeyList, | ||
u32 | count | ||
) |
Gets friend presence data for the current user's friends.
friendPresences | Pointer to write the friend presence data to. |
friendKeyList | The friend keys of the friends to get presence data for. |
count | The number of input friend keys. |
Get the current user's friends' profile data.
profile | Pointer to write profile data to. |
friendKeyList | Pointer to input friend keys. |
count | Number of input friend keys. |
Get the relationship type for the current user's friends.
relationships | Pointer to output relationship types to. |
friendKeyList | Pointer to input friend keys to query relationship types for. |
count | Number of input friend keys. |
Result FRD_GetGameAuthenticationData | ( | GameAuthenticationData * | data | ) |
Get game server authentication data requested using FRD_RequestGameAuthentication.
data | Pointer to write game server authentication data to. |
Result FRD_GetMiiScreenName | ( | MiiScreenName * | screenNames, |
u32 | screenNamesLen, | ||
u8 * | characterSets, | ||
u32 | characterSetsLen, | ||
const FriendKey * | friendKeyList, | ||
u32 | count, | ||
bool | maskNonAscii, | ||
bool | profanityFlag | ||
) |
Gets screen names for the current user's friends.
screenNames | Pointer to write the UTF-16 screen names to. |
screenNamesLen | Number of UTF-16 characters screenNames can hold. (max: 0x800) |
characterSets | Pointer to write the character sets for the screen names to. |
characterSetsLen | Size of buffer to output character sets to. |
friendKeyList | The friend keys for the friends to get screen names for. |
count | The number of input friend keys. |
maskNonAscii | Whether or not to replace all non-ASCII characters with question marks ('?') if the given character set doesn't match that of the corresponding friend's Mii data. |
profanityFlag | Setting this to true replaces the screen names with all question marks ('?') if profanityFlag is also set in the corresponding friend's Mii data. |
Result FRD_GetMyApproachContext | ( | EncryptedApproachContext * | ctx | ) |
Gets the current user's encrypted approach context.
ctx | Pointer to write the encrypted approach context data to. |
Result FRD_GetMyComment | ( | FriendComment * | comment | ) |
Gets the current user's comment on their friend profile.
comment | Pointer to write the current user's comment to. |
max_size | Max size of the comment. |
Gets the current user's favourite game.
titleId | Pointer to write the title ID of current user's favourite game to. |
Gets the current user's friend key.
key | Pointer to write the current user's friend key to. |
Gets the ID of the current local account.
localAccountId | Pointer to write the current local account ID to.\ |
Gets the current user's Mii data.
mii | Pointer to write the current user's mii data to. |
Gets the NcPrincipalId for the current user.
ncPrincipalId | Pointer to output the NcPrincipalId to. |
Gets the current friend account's NEX password.
password | Pointer to write the NEX password to. |
max_size | Max size of the output buffer. Must not exceed 0x800. |
Gets the current user's playing game.
titleId | Pointer to write the current user's playing game to. |
Result FRD_GetMyPreference | ( | bool * | isPublicMode, |
bool * | isShowGameName, | ||
bool * | isShowPlayedGame | ||
) |
Gets the current user's privacy information.
isPublicMode | Determines whether friends are notified of the current user's online status. |
isShowGameName | Determines whether friends are notified of the application that the current user is running. |
isShowPlayedGame | Determiens whether to display the current user's game history. |
Result FRD_GetMyPresence | ( | MyPresence * | presence | ) |
Gets the current user's presence information.
presence | Pointer to write the current user's presence information to. |
Gets the current user's profile information.
profile | Pointer to write the current user's profile information to. |
Result FRD_GetMyScreenName | ( | MiiScreenName * | name | ) |
Gets the current user's screen name.
name | Pointer to write the current user's screen name to. |
max_size | Max size of the screen name. |
Returns NAT properties for the current internet connection.
natMappingType | Pointer to write the NAT mapping type of the connection to. |
natFilteringType | Pointer to write the NAT filtering type of the connection to. |
Returns the difference (in nanoseconds) between server time and device time.
This difference is calculated every time the system logs into friend services.
diffMs | The pointer to write the time difference (in nanoseconds) to. |
Gets the server environment configuration for the current user.
nascEnvironment | Pointer to write the NASC server environment type to. |
nfsType | Pointer to write the NFS (Nintendo Friend Server) type to. |
nfsNo | Pointer to write the NFS (Nintendo Friend Server) number to. |
Result FRD_GetServiceLocatorData | ( | ServiceLocatorData * | data | ) |
Get service locator data requested using FRD_RequestServiceLocator.
data | Pointer to write the service locator data to. |
Result FRD_HasLoggedIn | ( | bool * | state | ) |
Gets the login status of the current user.
state | Pointer to write the current user's login status to. |
Gets whether a friend code is included in the current user's friend list.
friendCode | The friend code to check for. |
isFromList | Pointer to write whether or not the given friend code was found in the current user's friends list. |
Result FRD_IsOnline | ( | bool * | state | ) |
Gets the online status of the current user.
state | Pointer to write the current user's online status to. |
Checks if the friend code is valid.
friendCode | The friend code being used. |
isValid | Pointer to write the validity of the friend code to. |
Log in to Nintendo's friend server.
event | Event to signal when Login is done. |
Returns the friend code using the given principal ID.
principalId | The principal ID being used. |
friendCode | Pointer to write the friend code to. |
Result FRD_RequestGameAuthentication | ( | u32 | serverId, |
u16 * | ingamesn, | ||
u32 | ingamesnSize, | ||
u8 | majorSdkVersion, | ||
u8 | minorSdkVersion, | ||
Handle | completionEvent | ||
) |
Requests game server authentication.
serverId | The ID of the NEX server to request authentication for. |
ingamesn | The UTF-16 nickname to use in game. |
ingamesnSize | Buffer size of the input ingamesn buffer. (max: FRIEND_INGAMESN_LEN * 2) |
majorSdkVersion | The major SDK version. |
minorSdkVersion | The minor SDK version. |
completionEvent | The event handle to signal once the operation has completed. |
Result FRD_RequestServiceLocator | ( | u32 | serverId, |
char * | keyhash, | ||
char * | svc, | ||
u8 | majorSdkVersion, | ||
u8 | minorSdkVersion, | ||
Handle | completionEvent | ||
) |
Request service locator info for a given NEX server.
keyhash | The keyhash value to use for the NASC request. |
svc | The svc value to use for the NASC request. |
majorSdkVersion | The major SDK version. |
minorSdkVersion | The minor SDK version. |
completionEvent | The event handle to signal once the operation has completed. |
serverId |
Get a support error code (XXX-YYYY) for the given result code.
errorCode | Pointer to write the support error code to. |
res | The result code to convert. |
Sends an invitation to the current user's friends.
friendKeyList | The friend keys to send an invitation to. |
count | The number of input friend keys. |
Sets the Friend API to use a specific SDK version.
sdkVer | The SDK version needed to be used. |
Result FRD_SetNotificationMask | ( | FriendNotificationMask | mask | ) |
Sets the notification mask for the event notification system.
mask | The notifications to subscribe to for the event notification system. |
Result FRD_UnscrambleLocalFriendCode | ( | u64 * | unscrambled, |
ScrambledFriendCode * | scrambled, | ||
u32 | count | ||
) |
Unscrambles a scrambled friend code.
unscrambled | Pointer to output the unscrambled friend codes to. |
scrambled | Pointer to the input scrambled friend codes. |
count | Number of input scrambled codes. |
Result FRD_UpdateGameModeDescription | ( | FriendGameModeDescription * | desc | ) |
Updates the game mode description string.
desc | Pointer to the UTF-8 game mode description to use. |
Updates the current user's presence data and game mode description.
presence | The new presence data to use. |
desc | The new game mode description to use. |
Result FRDA_AddFriendOffline | ( | FriendKey * | friendKey, |
FriendMii * | mii, | ||
FriendProfile * | friendProfile, | ||
MiiScreenName * | screenName, | ||
bool | profanityFlag, | ||
u8 | characterSet | ||
) |
Adds a friend offline ("Local" option).
friendKey | Pointer to the friend key of the friend to add. |
mii | Pointer to the Mii of the friend to add. |
friendProfile | Pointer to the friend profile of the friend to add. |
screenName | Pointer to the UTF-16 screen name of the friend to add. |
profanityFlag | Setting this to true will cause calls that return the screen name to replace it with question marks ('?') when profanityFlag is true in those calls. |
characterSet | The character set to use for text data of the friend. |
Adds a friend online ("Internet" option).
event | Event signaled when friend is registered. |
principalId | PrincipalId of the friend to add. |
Creates a new local friends account.
localAccountId | The local account ID to use. |
nascEnvironment | The NASC environment to create this account in. |
nfsType | The NFS (Nintendo Friend Server) type this account should use. |
nfsNo | The NFS (Nintendo Friend Server) number this account should use. |
Deletes a local friends account.
localAccountId | The ID of the local account to delete. |
Loads a local friends account.
localAccountId | The ID of the local account to load. |
Remove a friend.
principalId | PrinipalId of the friend code to remove. |
localFriendCode | LocalFriendCode of the friend code to remove. |
Sets the NcPrincipalId of the current user.
ncPrincipalId | The new NcPrincipalId. |
Result FRDA_UpdateComment | ( | FriendComment * | comment | ) |
Updates the current user's comment (personal message).
comment | Pointer to the new comment (personal message). |
Updates the current user's favorite game.
favoriteGame | Pointer to the game key of the new favorite game. |
Result FRDA_UpdateMii | ( | FriendMii * | mii, |
MiiScreenName * | screenName, | ||
bool | profanityFlag, | ||
u8 | characterSet | ||
) |
Updates the current user's Mii.
mii | Pointer to the new Mii data to use. |
screenName | Pointer to new screen name associated with the new Mii. |
profanityFlag | Setting this to true will cause calls that return the screen name to replace it with question marks ('?') when profanityFlag is true in those calls. |
characterSet | The character set to use for the screen name. |
Result FRDA_UpdateMiiScreenName | ( | FriendKey * | friendKey, |
MiiScreenName * | screenName, | ||
u8 | characterSet | ||
) |
Updates a friend's display name.
friendKey | Pointer to friend key of the friend to update the screen name of. |
screenName | Pointer to the new screen name to use. |
characterSet | The character set of the new screen name. |
Updates the game being played by the current user.
playingGame | Pointer to game key of the game being played. |
Result FRDA_UpdatePreference | ( | bool | isPublicMode, |
bool | isShowGameMode, | ||
bool | isShowPlayedMode | ||
) |
Updates the current user's friend list preferences.
isPublicMode | Whether or not the online status should be public. |
isShowGameMode | Whether or not the currently played game is shown. |
isShowPlayedMode | Whether or not the play history is shown. |
Result frdInit | ( | bool | forceUser | ) |
Initializes friend services.
forceUser | Whether or not to force using the user service frd:u instead of the default (admin service frd:a). |