nn::cfg::CTR::SimpleAddress Structure

Syntax

struct SimpleAddress
{
   u32 id;
   wchar_t countryName[CFG_SIMPLE_ADDRESS_NUM_LANGUAGES][CFG_SIMPLE_ADDRESS_NAME_LENGTH];
   wchar_t regionName[CFG_SIMPLE_ADDRESS_NUM_LANGUAGES][CFG_SIMPLE_ADDRESS_NAME_LENGTH];
   u16 latitude;
   u16 longitude;
};

Description

Structure that represents the user's simple address information configured in the System Settings.

The size of this structure is at least 4 KB. Be careful not to exhaust the stack if the user's simple address information is placed in the stack. The country and region names in the simple address information retrieved from the nn::cfg::CTR::GetSimpleAddress function are guaranteed to be NULL terminated.

The country code is stored in the upper 8 bits of id, and the region code is stored in the following 8 bits. The lower 16 bits are reserved. The country code is the same value you can get using the nn::cfg::CTR::GetCountry function. For more information about the region code, click here.

Member Variables

id u32 Simple address information ID. The country code is stored in the upper 8 bits, and the region code is stored in the following 8 bits. The lower 16 bits are reserved.
countryName wchar_t Stores country names in each language.
regionName wchar_t Stores region names in each language (such as the names of states or prefectures).
If a region is not selected, stores "—." If regions cannot be selected for the given country setting, stores the country name.
latitude u16 The latitude. Values 0x00000x4000 represent the range from 0 to +90 degrees; 0xC0000xFFFF represent the range from -90 to -0.005 degrees. Positive angles indicate the northern hemisphere; negative angles indicate the southern hemisphere.
longitude u16 The longitude. Values 0x00000x7FFF represent the range from 0 to +179.995 degrees; 0x80000xFFFF represent the range from -180 to -0.005 degrees. Positive angles indicate the eastern hemisphere; negative angles indicate the western hemisphere.

Revision History

2011/12/14
Added a link for details about region codes.
Added an explanation about the data stored for region names.
2011/10/19
Added information specific to simple address information IDs.
2011/10/11
Added a note specific to region names.
2010/05/27
Initial version.

CONFIDENTIAL