libnx  v4.7.0
nacp.h
Go to the documentation of this file.
1 /**
2  * @file nacp.h
3  * @brief Control.nacp structure / related code for nacp.
4  * @copyright libnx Authors
5  */
6 
7 #pragma once
8 
9 /// Language entry. These strings are UTF-8.
10 typedef struct {
11  char name[0x200];
12  char author[0x100];
14 
15 /// ApplicationNeighborDetectionGroupConfiguration
16 typedef struct {
17  u64 group_id; ///< GroupId
18  u8 key[0x10];
20 
21 /// NeighborDetectionClientConfiguration
22 typedef struct {
24  NacpApplicationNeighborDetectionGroupConfiguration receivable_group_configurations[0x10]; ///< ReceivableGroupConfigurations
26 
27 /// ApplicationJitConfiguration
28 typedef struct {
29  u64 flags; ///< Flags
30  u64 memory_size; ///< MemorySize
32 
33 /// ns ApplicationControlProperty
34 typedef struct {
35  NacpLanguageEntry lang[16]; ///< \ref NacpLanguageEntry
36  u8 isbn[0x25]; ///< Isbn
37  u8 startup_user_account; ///< StartupUserAccount
38  u8 user_account_switch_lock; ///< UserAccountSwitchLock
39  u8 add_on_content_registration_type; ///< AddOnContentRegistrationType
40  u32 attribute_flag; ///< AttributeFlag
41  u32 supported_language_flag; ///< SupportedLanguageFlag
42  u32 parental_control_flag; ///< ParentalControlFlag
43  u8 screenshot; ///< Screenshot
44  u8 video_capture; ///< VideoCapture
45  u8 data_loss_confirmation; ///< DataLossConfirmation
46  u8 play_log_policy; ///< PlayLogPolicy
47  u64 presence_group_id; ///< PresenceGroupId
48  s8 rating_age[0x20]; ///< RatingAge
49  char display_version[0x10]; ///< DisplayVersion
50  u64 add_on_content_base_id; ///< AddOnContentBaseId
51  u64 save_data_owner_id; ///< SaveDataOwnerId
52  u64 user_account_save_data_size; ///< UserAccountSaveDataSize
53  u64 user_account_save_data_journal_size; ///< UserAccountSaveDataJournalSize
54  u64 device_save_data_size; ///< DeviceSaveDataSize
55  u64 device_save_data_journal_size; ///< DeviceSaveDataJournalSize
56  u64 bcat_delivery_cache_storage_size; ///< BcatDeliveryCacheStorageSize
57  u64 application_error_code_category; ///< ApplicationErrorCodeCategory
58  u64 local_communication_id[0x8]; ///< LocalCommunicationId
59  u8 logo_type; ///< LogoType
60  u8 logo_handling; ///< LogoHandling
61  u8 runtime_add_on_content_install; ///< RuntimeAddOnContentInstall
62  u8 runtime_parameter_delivery; ///< RuntimeParameterDelivery
63  u8 reserved_x30f4[0x2]; ///< Reserved
64  u8 crash_report; ///< CrashReport
65  u8 hdcp; ///< Hdcp
66  u64 pseudo_device_id_seed; ///< SeedForPseudoDeviceId
67  char bcat_passphrase[0x41]; ///< BcatPassphrase
68  u8 startup_user_account_option; ///< StartupUserAccountOption
69  u8 reserved_for_user_account_save_data_operation[0x6]; ///< ReservedForUserAccountSaveDataOperation
70  u64 user_account_save_data_size_max; ///< UserAccountSaveDataSizeMax
71  u64 user_account_save_data_journal_size_max; ///< UserAccountSaveDataJournalSizeMax
72  u64 device_save_data_size_max; ///< DeviceSaveDataSizeMax
73  u64 device_save_data_journal_size_max; ///< DeviceSaveDataJournalSizeMax
74  u64 temporary_storage_size; ///< TemporaryStorageSize
75  u64 cache_storage_size; ///< CacheStorageSize
76  u64 cache_storage_journal_size; ///< CacheStorageJournalSize
77  u64 cache_storage_data_and_journal_size_max; ///< CacheStorageDataAndJournalSizeMax
78  u16 cache_storage_index_max; ///< CacheStorageIndexMax
79  u8 reserved_x318a[0x6]; ///< Reserved
80  u64 play_log_queryable_application_id[0x10]; ///< PlayLogQueryableApplicationId
81  u8 play_log_query_capability; ///< PlayLogQueryCapability
82  u8 repair_flag; ///< RepairFlag
83  u8 program_index; ///< ProgramIndex
84  u8 required_network_service_license_on_launch; ///< RequiredNetworkServiceLicenseOnLaunchFlag
85  u32 reserved_x3214; ///< Reserved
88  u8 reserved_x33c0[0xc40]; ///< Reserved
89 } NacpStruct;
90 
91 /// Get the NacpLanguageEntry from the input nacp corresponding to the current system language (this may fallback to other languages when needed). Output langentry is NULL if none found / content of entry is empty.
92 /// If you're using ns you may want to use \ref nsGetApplicationDesiredLanguage instead.
94 
Result nacpGetLanguageEntry(NacpStruct *nacp, NacpLanguageEntry **langentry)
Get the NacpLanguageEntry from the input nacp corresponding to the current system language (this may ...
ApplicationJitConfiguration.
Definition: nacp.h:28
u64 flags
Flags.
Definition: nacp.h:29
u64 memory_size
MemorySize.
Definition: nacp.h:30
ApplicationNeighborDetectionGroupConfiguration.
Definition: nacp.h:16
u64 group_id
GroupId.
Definition: nacp.h:17
Language entry. These strings are UTF-8.
Definition: nacp.h:10
NeighborDetectionClientConfiguration.
Definition: nacp.h:22
NacpApplicationNeighborDetectionGroupConfiguration send_group_configuration
SendGroupConfiguration.
Definition: nacp.h:23
ns ApplicationControlProperty
Definition: nacp.h:34
u32 supported_language_flag
SupportedLanguageFlag.
Definition: nacp.h:41
u64 user_account_save_data_journal_size_max
UserAccountSaveDataJournalSizeMax.
Definition: nacp.h:71
u8 logo_type
LogoType.
Definition: nacp.h:59
u8 runtime_parameter_delivery
RuntimeParameterDelivery.
Definition: nacp.h:62
u8 startup_user_account_option
StartupUserAccountOption.
Definition: nacp.h:68
u8 screenshot
Screenshot.
Definition: nacp.h:43
u8 repair_flag
RepairFlag.
Definition: nacp.h:82
u64 cache_storage_journal_size
CacheStorageJournalSize.
Definition: nacp.h:76
u64 temporary_storage_size
TemporaryStorageSize.
Definition: nacp.h:74
u8 crash_report
CrashReport.
Definition: nacp.h:64
u64 bcat_delivery_cache_storage_size
BcatDeliveryCacheStorageSize.
Definition: nacp.h:56
u8 startup_user_account
StartupUserAccount.
Definition: nacp.h:37
u64 device_save_data_size_max
DeviceSaveDataSizeMax.
Definition: nacp.h:72
u8 required_network_service_license_on_launch
RequiredNetworkServiceLicenseOnLaunchFlag.
Definition: nacp.h:84
u64 add_on_content_base_id
AddOnContentBaseId.
Definition: nacp.h:50
u32 parental_control_flag
ParentalControlFlag.
Definition: nacp.h:42
u8 logo_handling
LogoHandling.
Definition: nacp.h:60
u64 cache_storage_size
CacheStorageSize.
Definition: nacp.h:75
u32 reserved_x3214
Reserved.
Definition: nacp.h:85
u64 user_account_save_data_size_max
UserAccountSaveDataSizeMax.
Definition: nacp.h:70
u64 pseudo_device_id_seed
SeedForPseudoDeviceId.
Definition: nacp.h:66
u64 application_error_code_category
ApplicationErrorCodeCategory.
Definition: nacp.h:57
u64 device_save_data_size
DeviceSaveDataSize.
Definition: nacp.h:54
u8 user_account_switch_lock
UserAccountSwitchLock.
Definition: nacp.h:38
NacpApplicationJitConfiguration jit_configuration
JitConfiguration.
Definition: nacp.h:87
u16 cache_storage_index_max
CacheStorageIndexMax.
Definition: nacp.h:78
u64 device_save_data_journal_size_max
DeviceSaveDataJournalSizeMax.
Definition: nacp.h:73
u64 device_save_data_journal_size
DeviceSaveDataJournalSize.
Definition: nacp.h:55
u8 video_capture
VideoCapture.
Definition: nacp.h:44
u32 attribute_flag
AttributeFlag.
Definition: nacp.h:40
u8 hdcp
Hdcp.
Definition: nacp.h:65
u64 cache_storage_data_and_journal_size_max
CacheStorageDataAndJournalSizeMax.
Definition: nacp.h:77
u8 program_index
ProgramIndex.
Definition: nacp.h:83
u8 play_log_policy
PlayLogPolicy.
Definition: nacp.h:46
u8 runtime_add_on_content_install
RuntimeAddOnContentInstall.
Definition: nacp.h:61
u64 user_account_save_data_size
UserAccountSaveDataSize.
Definition: nacp.h:52
u64 user_account_save_data_journal_size
UserAccountSaveDataJournalSize.
Definition: nacp.h:53
u64 presence_group_id
PresenceGroupId.
Definition: nacp.h:47
u64 save_data_owner_id
SaveDataOwnerId.
Definition: nacp.h:51
u8 data_loss_confirmation
DataLossConfirmation.
Definition: nacp.h:45
NacpNeighborDetectionClientConfiguration neighbor_detection_client_configuration
NeighborDetectionClientConfiguration.
Definition: nacp.h:86
u8 add_on_content_registration_type
AddOnContentRegistrationType.
Definition: nacp.h:39
u8 play_log_query_capability
PlayLogQueryCapability.
Definition: nacp.h:81
uint64_t u64
64-bit unsigned integer.
Definition: types.h:22
uint8_t u8
8-bit unsigned integer.
Definition: types.h:19
int8_t s8
8-bit signed integer.
Definition: types.h:25
uint16_t u16
16-bit unsigned integer.
Definition: types.h:20
u32 Result
Function error code result type.
Definition: types.h:44
uint32_t u32
32-bit unsigned integer.
Definition: types.h:21