libctru
v2.4.1
|
Friend Services. More...
#include <3ds/mii.h>
Go to the source code of this file.
Data Structures | |
struct | FriendKey |
Friend key data. More... | |
struct | TitleData |
Friend Title data. More... | |
struct | FriendProfile |
Friend profile data. More... | |
struct | GameDescription |
Game Description structure. More... | |
struct | NotificationEvent |
Friend Notification Event structure. More... | |
Macros | |
#define | FRIEND_SCREEN_NAME_SIZE 0xB |
11-byte UTF-16 screen name | |
#define | FRIEND_COMMENT_SIZE 0x21 |
33-byte UTF-16 comment | |
#define | FRIEND_LIST_SIZE 0x64 |
100 (Max number of friends) | |
Enumerations | |
enum | NotificationTypes { 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_INVITATION } |
Enum to use with FRD_GetNotificationEvent. More... | |
Functions | |
Result | frdInit (void) |
Initializes FRD service. | |
void | frdExit (void) |
Exists FRD. | |
Handle * | frdGetSessionHandle (void) |
Get FRD handle. | |
Result | FRDU_HasLoggedIn (bool *state) |
Gets the login status of the current user. More... | |
Result | FRDU_IsOnline (bool *state) |
Gets the online status of the current user. More... | |
Result | FRD_Logout (void) |
Logs out of Nintendo's friend server. | |
Result | FRD_Login (Handle event) |
Log in to Nintendo's friend server. More... | |
Result | FRD_GetMyFriendKey (FriendKey *key) |
Gets the current user's friend key. More... | |
Result | FRD_GetMyPreference (bool *isPublicMode, bool *isShowGameName, bool *isShowPlayedGame) |
Gets the current user's privacy information. More... | |
Result | FRD_GetMyProfile (FriendProfile *profile) |
Gets the current user's profile information. More... | |
Result | FRD_GetMyScreenName (char *name, size_t max_size) |
Gets the current user's screen name. More... | |
Result | FRD_GetMyMii (MiiData *mii) |
Gets the current user's Mii data. More... | |
Result | FRD_GetMyPlayingGame (u64 *titleId) |
Gets the current user's playing game. More... | |
Result | FRD_GetMyFavoriteGame (u64 *titleId) |
Gets the current user's favourite game. More... | |
Result | FRD_GetMyComment (char *comment, size_t max_size) |
Gets the current user's comment on their friend profile. More... | |
Result | FRD_GetFriendKeyList (FriendKey *friendKeyList, u32 *num, u32 offset, u32 size) |
Gets the current user's friend key list. More... | |
Result | FRD_GetFriendMii (MiiData *miiDataList, const FriendKey *friendKeyList, size_t size) |
Gets the current user's friends' Mii data. More... | |
Result | FRD_GetFriendProfile (FriendProfile *profile, const FriendKey *friendKeyList, size_t size) |
Get the current user's friends' profile data. More... | |
Result | FRD_GetFriendPlayingGame (GameDescription *desc, const FriendKey *friendKeyList, size_t size) |
Get the current user's friends' playing game. More... | |
Result | FRD_GetFriendFavouriteGame (GameDescription *desc, const FriendKey *friendKeyList, u32 count) |
Get the current user's friends' favourite game. More... | |
Result | FRD_IsInFriendList (FriendKey *friendKeyList, bool *isFromList) |
Gets whether a friend key is included in the current user's friend list. More... | |
Result | FRD_UpdateGameModeDescription (const char *desc) |
Updates the game mode description string. More... | |
Result | FRD_AttachToEventNotification (Handle event) |
Event which is signaled when friend login states change. More... | |
Result | FRD_GetEventNotification (NotificationEvent *event, u32 count, u32 *recievedNotifCount) |
Get Latest Event Notification. More... | |
Result | FRD_PrincipalIdToFriendCode (u32 principalId, u64 *friendCode) |
Returns the friend code using the given principal ID. More... | |
Result | FRD_FriendCodeToPrincipalId (u64 friendCode, u32 *principalId) |
Returns the principal ID using the given friend code. More... | |
Result | FRD_IsValidFriendCode (u64 friendCode, bool *isValid) |
Checks if the friend code is valid. More... | |
Result | FRD_SetClientSdkVersion (u32 sdkVer) |
Sets the Friend API to use a specific SDK version. More... | |
Result | FRD_AddFriendOnline (Handle event, u32 principalId) |
Add a Friend online. More... | |
Result | FRD_RemoveFriend (u32 principalId, u64 localFriendCode) |
Remove a Friend. More... | |
Friend Services.
enum NotificationTypes |
Enum to use with FRD_GetNotificationEvent.
Add a Friend online.
event | Event signaled when friend is registered. |
principalId | PrincipalId of the friend to add. |
Event which is signaled when friend login states change.
event | event which will be signaled. |
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_GetFriendFavouriteGame | ( | GameDescription * | desc, |
const FriendKey * | friendKeyList, | ||
u32 | count | ||
) |
Get the current user's friends' favourite game.
desc | Pointer to write Game Description data to. |
friendKeyList | Pointer to FriendKeys, |
count | Number Of FriendKeys. |
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.
miiDataList | Pointer to write Mii data to. |
friendKeyList | Pointer to FriendKeys. |
size | Number of Friendkeys. |
Result FRD_GetFriendPlayingGame | ( | GameDescription * | desc, |
const FriendKey * | friendKeyList, | ||
size_t | size | ||
) |
Get the current user's friends' playing game.
desc | Pointer to write Game Description data to. |
friendKeyList | Pointer to FriendKeys, |
size | Number Of FriendKeys. |
Result FRD_GetFriendProfile | ( | FriendProfile * | profile, |
const FriendKey * | friendKeyList, | ||
size_t | size | ||
) |
Get the current user's friends' profile data.
profile | Pointer to write profile data to. |
friendKeyList | Pointer to FriendKeys. |
size | Number of FriendKeys. |
Result FRD_GetMyComment | ( | char * | comment, |
size_t | max_size | ||
) |
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 current user's Mii data.
mii | Pointer to write the current user's mii data to. |
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_GetMyProfile | ( | FriendProfile * | profile | ) |
Gets the current user's profile information.
profile | Pointer to write the current user's profile information to. |
Result FRD_GetMyScreenName | ( | char * | name, |
size_t | max_size | ||
) |
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. |
Gets whether a friend key is included in the current user's friend list.
friendKeyList | Pointer to a list of friend keys. |
isFromList | Pointer to a write the friendship 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. |
Remove a Friend.
principalId | PrinipalId of the friend code to remove. |
localFriendCode | LocalFriendCode of the friend code to remove. |
Sets the Friend API to use a specific SDK version.
sdkVer | The SDK version needed to be used. |
Result FRD_UpdateGameModeDescription | ( | const char * | desc | ) |
Updates the game mode description string.
desc | Pointer to write the game mode description to. |
Result FRDU_HasLoggedIn | ( | bool * | state | ) |
Gets the login status of the current user.
state | Pointer to write the current user's login status to. |
Result FRDU_IsOnline | ( | bool * | state | ) |
Gets the online status of the current user.
state | Pointer to write the current user's online status to. |