libnx  v4.8.0
Data Structures | Enumerations | Functions
mii.h File Reference

Mii services (mii:*) IPC wrapper. More...

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

Go to the source code of this file.

Data Structures

struct  MiiDatabase
 
struct  MiiCreateId
 
struct  MiiCharInfo
 
struct  MiiNfpStoreDataExtension
 

Enumerations

enum  MiiServiceType {
  MiiServiceType_System = 0 ,
  MiiServiceType_User = 1
}
 
enum  MiiAge {
  MiiAge_Young = 0 ,
  MiiAge_Normal = 1 ,
  MiiAge_Old = 2 ,
  MiiAge_All = 3
}
 Mii age. More...
 
enum  MiiGender {
  MiiGender_Male = 0 ,
  MiiGender_Female = 1 ,
  MiiGender_All = 2
}
 Mii gender. More...
 
enum  MiiFaceColor {
  MiiFaceColor_Black = 0 ,
  MiiFaceColor_White = 1 ,
  MiiFaceColor_Asian = 2 ,
  MiiFaceColor_All = 3
}
 Mii face color. More...
 
enum  MiiSourceFlag {
  MiiSourceFlag_Database = (1U<<( 0 )) ,
  MiiSourceFlag_Default = (1U<<( 1 )) ,
  MiiSourceFlag_All = MiiSourceFlag_Database | MiiSourceFlag_Default
}
 
enum  MiiSpecialKeyCode {
  MiiSpecialKeyCode_Normal = 0 ,
  MiiSpecialKeyCode_Special = 0xA523B78F
}
 

Functions

Result miiInitialize (MiiServiceType service_type)
 Initialize mii.
 
void miiExit (void)
 Exit mii.
 
ServicemiiGetServiceSession (void)
 Gets the Service object for the actual mii service session.
 
Result miiOpenDatabase (MiiDatabase *out, MiiSpecialKeyCode key_code)
 Opens a mii database. More...
 
Result miiDatabaseIsUpdated (MiiDatabase *db, bool *out_updated, MiiSourceFlag flag)
 Returns whether the mii database is updated. More...
 
Result miiDatabaseIsFull (MiiDatabase *db, bool *out_full)
 Returns whether the mii database is full. More...
 
Result miiDatabaseGetCount (MiiDatabase *db, s32 *out_count, MiiSourceFlag flag)
 Returns number of miis in the database with the specified source flag. More...
 
Result miiDatabaseGet1 (MiiDatabase *db, MiiSourceFlag flag, MiiCharInfo *out_infos, s32 count, s32 *total_out)
 Reads mii charinfo data from the specified source flag. More...
 
Result miiDatabaseBuildRandom (MiiDatabase *db, MiiAge age, MiiGender gender, MiiFaceColor face_color, MiiCharInfo *out_info)
 Generates a random mii charinfo (doesn't register it in the console database). More...
 
void miiDatabaseClose (MiiDatabase *db)
 Closes a mii database.
 

Detailed Description

Mii services (mii:*) IPC wrapper.

Author
XorTroll

Enumeration Type Documentation

◆ MiiAge

enum MiiAge

Mii age.

Enumerator
MiiAge_Young 

Young.

MiiAge_Normal 

Normal.

MiiAge_Old 

Old.

MiiAge_All 

All of them.

◆ MiiFaceColor

Mii face color.

Enumerator
MiiFaceColor_Black 

Black.

MiiFaceColor_White 

White.

MiiFaceColor_Asian 

Asian.

MiiFaceColor_All 

All of them.

◆ MiiGender

enum MiiGender

Mii gender.

Enumerator
MiiGender_Male 

Male.

MiiGender_Female 

Female.

MiiGender_All 

Both of them.

◆ MiiServiceType

Enumerator
MiiServiceType_System 

Initializes mii:e.

MiiServiceType_User 

Initializes mii:u.

◆ MiiSourceFlag

Enumerator
MiiSourceFlag_Database 

Miis created by the user.

MiiSourceFlag_Default 

Default console miis.

MiiSourceFlag_All 

All of them.

◆ MiiSpecialKeyCode

Enumerator
MiiSpecialKeyCode_Normal 

Normal miis.

MiiSpecialKeyCode_Special 

Special miis.

Function Documentation

◆ miiDatabaseBuildRandom()

Result miiDatabaseBuildRandom ( MiiDatabase db,
MiiAge  age,
MiiGender  gender,
MiiFaceColor  face_color,
MiiCharInfo out_info 
)

Generates a random mii charinfo (doesn't register it in the console database).

Parameters
[in]dbDatabase.
[in]ageMii's age.
[in]genderMii's gender.
[in]face_colorMii's face color.
[out]out_infoOut mii charinfo data.

◆ miiDatabaseGet1()

Result miiDatabaseGet1 ( MiiDatabase db,
MiiSourceFlag  flag,
MiiCharInfo out_infos,
s32  count,
s32 total_out 
)

Reads mii charinfo data from the specified source flag.

Parameters
[in]dbDatabase.
[in]flagSource flag.
[out]out_infosOutput mii charinfo array.
[in]countNumber of mii chainfos to read.
[out]total_outNumber of mii charinfos which were actually read.

◆ miiDatabaseGetCount()

Result miiDatabaseGetCount ( MiiDatabase db,
s32 out_count,
MiiSourceFlag  flag 
)

Returns number of miis in the database with the specified source flag.

Parameters
[in]dbDatabase.
[in]flagSource flag.
[out]out_countOut mii count.

◆ miiDatabaseIsFull()

Result miiDatabaseIsFull ( MiiDatabase db,
bool *  out_full 
)

Returns whether the mii database is full.

Parameters
[in]dbDatabase.
[out]out_fullWhether the mii database is full.

◆ miiDatabaseIsUpdated()

Result miiDatabaseIsUpdated ( MiiDatabase db,
bool *  out_updated,
MiiSourceFlag  flag 
)

Returns whether the mii database is updated.

Parameters
[in]dbDatabase.
[in]flagSource flag.
[out]out_updatedWhether the mii database is updated.

◆ miiOpenDatabase()

Result miiOpenDatabase ( MiiDatabase out,
MiiSpecialKeyCode  key_code 
)

Opens a mii database.

Parameters
[in]key_codeMii key code filter.
[out]outDatabase.