libnx  v4.2.2
Data Structures | Macros | Enumerations | Functions
acc.h File Reference

Account (acc:*) service IPC wrapper. More...

#include "../types.h"
#include "../sf/service.h"

Go to the source code of this file.

Data Structures

struct  AccountProfile
 Profile. More...
 
struct  AccountUid
 Account UserId. More...
 
struct  AccountUserData
 UserData. More...
 
struct  AccountProfileBase
 ProfileBase. More...
 
struct  AccountNetworkServiceAccountId
 NetworkServiceAccountId. More...
 

Macros

#define ACC_USER_LIST_SIZE   8
 

Enumerations

enum  AccountServiceType {
  AccountServiceType_Application = 0,
  AccountServiceType_System = 1,
  AccountServiceType_Administrator = 2
}
 

Functions

Result accountInitialize (AccountServiceType service_type)
 Initialize account.
 
void accountExit (void)
 Exit account.
 
ServiceaccountGetServiceSession (void)
 Gets the Service object for the actual account service session.
 
Result accountGetUserCount (s32 *user_count)
 Get the total number of user profiles.
 
Result accountListAllUsers (AccountUid *uids, s32 max_uids, s32 *actual_total)
 Get a list of all userIds. More...
 
Result accountGetLastOpenedUser (AccountUid *uid)
 Get the userId for the last opened user.
 
Result accountGetProfile (AccountProfile *out, AccountUid uid)
 Get an AccountProfile for the specified userId.
 
Result accountIsUserRegistrationRequestPermitted (bool *out)
 IsUserRegistrationRequestPermitted.
 
Result accountTrySelectUserWithoutInteraction (AccountUid *uid, bool is_network_service_account_required)
 TrySelectUserWithoutInteraction.
 
void accountProfileClose (AccountProfile *profile)
 Close the AccountProfile.
 
Result accountProfileGet (AccountProfile *profile, AccountUserData *userdata, AccountProfileBase *profilebase)
 Get AccountUserData and AccountProfileBase for the specified profile, userdata is optional (can be NULL).
 
Result accountProfileGetImageSize (AccountProfile *profile, u32 *image_size)
 Get the icon image size.
 
Result accountProfileLoadImage (AccountProfile *profile, void *buf, size_t len, u32 *image_size)
 Load the JPEG profile icon, valid for both Miis and character icons. The output image_size is the same as the one from accountProfileGetImageSize.
 
Result accountGetPreselectedUser (AccountUid *uid)
 Gets the userId which was selected by the profile-selector applet (if any), prior to launching the currently running Application. More...
 
static bool accountUidIsValid (const AccountUid *Uid)
 Checks whether the specified AccountUid is valid/set (non-zero). More...
 

Detailed Description

Account (acc:*) service IPC wrapper.

Author
yellows8

Enumeration Type Documentation

◆ AccountServiceType

Enumerator
AccountServiceType_Application 

Initializes acc:u0.

AccountServiceType_System 

Initializes acc:u1.

AccountServiceType_Administrator 

Initializes acc:su.

Function Documentation

◆ accountGetPreselectedUser()

Result accountGetPreselectedUser ( AccountUid uid)

Gets the userId which was selected by the profile-selector applet (if any), prior to launching the currently running Application.

This gets the cached PreselectedUser loaded during accountInitialize, when PreselectedUser is available.

◆ accountListAllUsers()

Result accountListAllUsers ( AccountUid uids,
s32  max_uids,
s32 actual_total 
)

Get a list of all userIds.

The returned list will never be larger than ACC_USER_LIST_SIZE.

Parameters
uidsPointer to array of userIds.
max_uidsMaximum number of userIds to return.
actual_totalThe actual total number of userIds found.

◆ accountUidIsValid()

static bool accountUidIsValid ( const AccountUid Uid)
inlinestatic

Checks whether the specified AccountUid is valid/set (non-zero).

Parameters
[in]UidAccountUid