Changes

Jump to navigation Jump to search
4,438 bytes added ,  23:59, 25 November 2019
Line 14: Line 14:  
| 3 || GetApplicationControlPropertyWithApplicationId || Takes an input u64 TitleId, returns a type-0x16 buffer filled with the contents of [[NACP_Format|control.nacp]]
 
| 3 || GetApplicationControlPropertyWithApplicationId || Takes an input u64 TitleId, returns a type-0x16 buffer filled with the contents of [[NACP_Format|control.nacp]]
 
|-
 
|-
| 9998 || ||
+
| 9998 || [9.0.0+] GetPreomiaApplicationLaunchProperty ||
 
|-
 
|-
| 9999 || ||
+
| 9999 || [9.0.0+] GetPreomiaApplicationControlProperty ||
 
|}
 
|}
   Line 103: Line 103:  
= time:a, time:r, time:u =
 
= time:a, time:r, time:u =
 
These are "nn::timesrv::detail::service::IStaticService".
 
These are "nn::timesrv::detail::service::IStaticService".
 +
 +
These were added with [9.0.0+].
 +
 +
The time:u service has max_sessions 17, time:a has max_sessions 4, and time:r has max_sessions 2.
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 246: Line 250:  
| 7 || [9.0.0+] SetDeviceLocationNameWithTimeZoneRule ||  
 
| 7 || [9.0.0+] SetDeviceLocationNameWithTimeZoneRule ||  
 
|-
 
|-
| 8 || [9.0.0+] ParseTimeZoneBinary ||  
+
| 8 || [9.0.0+] ParseTimeZoneBinary || Stubbed, return 0x7BC74.
 
|-
 
|-
 
| 20 || [9.0.0+] GetDeviceLocationNameOperationEventReadableHandle ||  
 
| 20 || [9.0.0+] GetDeviceLocationNameOperationEventReadableHandle ||  
Line 378: Line 382:  
! Cmd || Name
 
! Cmd || Name
 
|-
 
|-
| 500 || RegisterAlarmSetting
+
| 500 || [[#RegisterAlarmSetting]]
 
|-
 
|-
| 510 || UpdateAlarmSetting
+
| 510 || [[#UpdateAlarmSetting]]
 
|-
 
|-
| 520 || ListAlarmSettings
+
| 520 || [[#ListAlarmSettings]]
 
|-
 
|-
| 530 || LoadApplicationParameter
+
| 530 || [[#LoadApplicationParameter]]
 
|-
 
|-
| 540 || DeleteAlarmSetting
+
| 540 || [[#DeleteAlarmSetting]]
 
|-
 
|-
| 1000 || Initialize
+
| 1000 || [[#Initialize]]
 
|}
 
|}
 +
 +
== RegisterAlarmSetting ==
 +
Takes a type-0x15 input buffer [[#AlarmSetting]] and a type-0x5 input buffer. Returns an [[#AlarmSettingId]].
 +
 +
The second buffer can be empty (addr=0/size=0). Size must be <=0x400. This is the ApplicationParameter.
 +
 +
A maximum of 8 Alarms can be registered by an Application at the same time.
 +
 +
Before using the cmd, sdknso uses [[HID_services|hid]] IsFirmwareUpdateNeededForNotification then if needed launches the controller-applet for firmware-update.
 +
 +
After using the cmd when it failed, [[Error_Applet|ShowError]] will be used when the Result is in a certain range, otherwise this will assert.
 +
 +
== UpdateAlarmSetting ==
 +
Takes a type-0x15 input buffer [[#AlarmSetting]] and a type-0x5 input buffer. No output.
 +
 +
The second buffer can be empty (addr=0/size=0). Size must be <=0x400. This is the ApplicationParameter.
 +
 +
== ListAlarmSettings ==
 +
Takes a type-0x6 output buffer to receive an array of [[#AlarmSetting]]. Returns a s32 '''AlarmSettingsCount'''.
 +
 +
== LoadApplicationParameter ==
 +
Takes an input [[#AlarmSettingId]] and a type-0x6 output buffer containing the ApplicationParameter. Returns an u32 actual_size.
 +
 +
== DeleteAlarmSetting ==
 +
Takes an input [[#AlarmSettingId]].
 +
 +
== Initialize ==
 +
Takes a PID-descriptor and an input u64 pid_reserved.
    
= notif:s =
 
= notif:s =
Line 400: Line 432:  
! Cmd || Name
 
! Cmd || Name
 
|-
 
|-
| 500 || RegisterAlarmSetting
+
| 500 || [[#RegisterAlarmSetting]]
 
|-
 
|-
| 510 || UpdateAlarmSetting
+
| 510 || [[#UpdateAlarmSetting]]
 
|-
 
|-
| 520 || ListAlarmSettings
+
| 520 || [[#ListAlarmSettings]]
 
|-
 
|-
| 530 || LoadApplicationParameter
+
| 530 || [[#LoadApplicationParameter]]
 
|-
 
|-
| 540 || DeleteAlarmSetting
+
| 540 || [[#DeleteAlarmSetting]]
 
|-
 
|-
| 1000 || Initialize
+
| 1000 ||  
 
|-
 
|-
| 1010 ||
+
| 1010 || [[#ListNotifications]]
 
|-
 
|-
| 1020 ||
+
| 1020 || [[#DeleteNotification]]
 
|-
 
|-
| 1030 ||
+
| 1030 || [[#ClearNotifications]]
 
|-
 
|-
| 1040 ||
+
| 1040 ||  
 
|-
 
|-
| 1500 ||
+
| 1500 || [[#SetPresentationSetting]]
 
|-
 
|-
| 1510 ||
+
| 1510 || [[#GetPresentationSetting]]
 
|-
 
|-
| 2000 ||
+
| 2000 || [[#GetAlarmSetting]]
 
|-
 
|-
 
| 2001 ||
 
| 2001 ||
 
|-
 
|-
| 2010 ||
+
| 2010 || [[#MuteAlarmSetting]]
 
|-
 
|-
| 2020 ||
+
| 2020 || [[#IsAlarmSettingReady]]
 
|-
 
|-
 
| 8000 ||
 
| 8000 ||
Line 436: Line 468:  
| 8010 ||
 
| 8010 ||
 
|-
 
|-
| 9000 ||
+
| 9000 || [[#GetNextAlarm]]
 +
|}
 +
 
 +
== Cmd1000 ==
 +
No input, returns a total of 4-bytes of output.
 +
 
 +
== ListNotifications ==
 +
Unofficial name.
 +
 
 +
== DeleteNotification ==
 +
Unofficial name.
 +
 
 +
== ClearNotifications ==
 +
Unofficial name.
 +
 
 +
No input/output.
 +
 
 +
== Cmd1040 ==
 +
No input, returns an output [[#IUnknown0]].
 +
 
 +
== IUnknown0 ==
 +
{| class="wikitable" border="1"
 +
|-
 +
! Cmd || Name
 +
|-
 +
| 0 ||  
 
|}
 
|}
 +
 +
This was added with [9.0.0+].
 +
 +
Cmd0: no input, returns an output handle.
 +
 +
== SetPresentationSetting ==
 +
Unofficial name.
 +
 +
== GetPresentationSetting ==
 +
Unofficial name.
 +
 +
== GetAlarmSetting ==
 +
Unofficial name.
 +
 +
Takes an input [[#AlarmSettingId]]. Returns an [[#AlarmSetting]].
 +
 +
== MuteAlarmSetting ==
 +
Unofficial name.
 +
 +
Takes an input [[#AlarmSettingId]] and a bool.
 +
 +
== IsAlarmSettingReady ==
 +
Unofficial name.
 +
 +
Takes an input [[#AlarmSettingId]]. Returns a bool.
 +
 +
== GetNextAlarm ==
 +
Unofficial name.
 +
 +
Takes an input [[#AlarmSettingId]]. Returns an u8 '''IsAlarmScheduled''' and a [[Glue_services#PosixTime|PosixTime]] for the next scheduled alarm.
    
= ApplicationLaunchProperty =
 
= ApplicationLaunchProperty =
Total size is 0x10-bytes.
+
Total size is 0x10 bytes.
    
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 468: Line 555:  
| Padding
 
| Padding
 
|}
 
|}
 +
 +
= AlarmSettingId =
 +
This is "nn::notification::AlarmSettingId". This is an u16.
 +
 +
= AlarmSetting =
 +
This is "nn::notification::AlarmSetting". Total size is 0x40 bytes. When initializing this to the defaults, the entire struct is cleared then the last 0xE-bytes are set to 0xFF.
 +
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x00
 +
| 0x02
 +
| [[#AlarmSettingId]]
 +
|-
 +
| 0x02
 +
| 0x01
 +
| Kind (0 = WeeklySchedule)
 +
|-
 +
| 0x03
 +
| 0x01
 +
| u8 bool Muted (non-zero/true = AlarmSetting turned off, zero/false = on).
 +
|-
 +
| 0x04
 +
| 0x04
 +
| Padding
 +
|-
 +
| 0x08
 +
| 0x10
 +
| UID. User account associated with this AlarmSetting. Used for the PreselectedUser when launching the Application when the system was previously in sleep-mode, instead of launching the applet for selecting the user.
 +
|-
 +
| 0x18
 +
| 0x08
 +
| ApplicationId
 +
|-
 +
| 0x20
 +
| 0x08
 +
| Not set by sdksno, besides clearing it during initialization.
 +
|-
 +
| 0x28
 +
| 0x18
 +
| Alarm schedule (WeeklyScheduleAlarmSetting)
 +
|}
 +
 +
Schedule:
 +
 +
{| class="wikitable" border="1"
 +
|-
 +
! Offset
 +
! Size
 +
! Description
 +
|-
 +
| 0x00 || 0x0A || Not set by sdksno, besides clearing it during initialization.
 +
|-
 +
| 0x0A || 0xE(7*2) || Array of 7 entries where each entry is 2-bytes. Index is <code>nn::time::DayOfWeek</code>, Sun-Sat.
 +
|}
 +
 +
Array entries:
 +
 +
Each byte is set using an input s32. An entry with value 0xFFFF (the default) indicates that it's disabled. The high byte is the hour, the low byte is the minute. This uses local-time.
 +
 +
sdknso checks whether an entry is enabled with: <code>return ({last 5-bits of the entry} < 3) && ((entry & 0xfc) < 60);</code>. The first check is equivalent to comparing the second entry byte with value 24.
    
[[Category:Services]]
 
[[Category:Services]]

Navigation menu