Glue services: Difference between revisions

No edit summary
 
(12 intermediate revisions by 2 users not shown)
Line 6: Line 6:
! Cmd || Name
! Cmd || Name
|-
|-
| 0 || [[#GetApplicationLaunchProperty]]
| 0 || [[#GetApplicationLaunchProperty|GetApplicationLaunchProperty]]
|-
|-
| 1 || [10.0.0+] [[#GetApplicationControlProperty]] ([1.0.0-9.2.0] [[#GetApplicationLaunchPropertyWithApplicationId]])
| 1 || [10.0.0+] [[#GetApplicationControlProperty|GetApplicationControlProperty]] ([1.0.0-9.2.0] [[#GetApplicationLaunchPropertyWithApplicationId|GetApplicationLaunchPropertyWithApplicationId]])
|-
|-
| 2 || [10.0.0+] GetApplicationProcessProperty ([1.0.0-9.2.0] [[#GetApplicationControlProperty]])
| 2 || [10.0.0+] [[#GetApplicationProcessProperty|GetApplicationProcessProperty]] ([1.0.0-9.2.0] [[#GetApplicationControlProperty|GetApplicationControlProperty]])
|-
|-
| 3 || [10.0.0+] GetApplicationInstanceId ([1.0.0-9.2.0] [[#GetApplicationControlPropertyWithApplicationId]])
| 3 || [10.0.0+] [[#GetApplicationInstanceId|GetApplicationInstanceId]] ([1.0.0-9.2.0] [[#GetApplicationControlPropertyWithApplicationId|GetApplicationControlPropertyWithApplicationId]])
|-
|-
| 4 || [10.0.0+] [[#GetApplicationInstanceUnregistrationNotifier]]
| 4 || [10.0.0+] [[#GetApplicationInstanceUnregistrationNotifier|GetApplicationInstanceUnregistrationNotifier]]
|-
|-
| 5 || [10.0.0+] ListApplicationInstanceId
| 5 || [10.0.0+] [[#ListApplicationInstanceId|ListApplicationInstanceId]]
|-
|-
| 6 || [10.0.0+] GetMicroApplicationInstanceId
| 6 || [10.0.0+] [[#GetMicroApplicationInstanceId|GetMicroApplicationInstanceId]]
|-
|-
| 7 || [10.0.0+] GetApplicationCertificate
| 7 || [10.0.0+] [[#GetApplicationCertificate|GetApplicationCertificate]]
|-
|-
| 9998 || [9.0.0-9.2.0] GetPreomiaApplicationLaunchProperty
| 9998 || [9.0.0-9.2.0] [[#GetPreomiaApplicationLaunchProperty|GetPreomiaApplicationLaunchProperty]]
|-
|-
| 9999 || [9.0.0-9.2.0] GetPreomiaApplicationControlProperty
| 9999 || [9.0.0-9.2.0] [[#GetPreomiaApplicationControlProperty|GetPreomiaApplicationControlProperty]]
|}
|}


== GetApplicationLaunchProperty ==
== GetApplicationLaunchProperty ==
Takes an input u64 ProcessId (1.0.0-9.2.0) or u64 ApplicationInstanceId (10.0.0+), returns an [[#ApplicationLaunchProperty]].
Takes an input u64 ProcessId. Returns an [[#ApplicationLaunchProperty]].
 
[10.0.0+] Now takes an input [[#ApplicationInstanceId]] instead of ProcessId.


== GetApplicationLaunchPropertyWithApplicationId ==
== GetApplicationLaunchPropertyWithApplicationId ==
Takes an input u64 ApplicationId, returns an [[#ApplicationLaunchProperty]].
Takes an input u64 ApplicationId. Returns an [[#ApplicationLaunchProperty]].


== GetApplicationControlProperty ==
== GetApplicationControlProperty ==
Takes an input u64 ProcessId (1.0.0-9.2.0) or u64 ApplicationInstanceId (10.0.0+), returns a type-0x16 buffer filled with the contents of [[NACP_Format|control.nacp]]
Takes an input u64 ProcessId and a type-0x16 output buffer containing an [[NACP|ApplicationControlProperty]]. No output.
 
[10.0.0+] Now takes an input [[#ApplicationInstanceId]] instead of ProcessId.


== GetApplicationControlPropertyWithApplicationId ==
== GetApplicationControlPropertyWithApplicationId ==
Takes an input u64 ApplicationId, returns a type-0x16 buffer filled with the contents of [[NACP_Format|control.nacp]]
Takes an input u64 ApplicationId and a type-0x16 output buffer containing an [[NACP|ApplicationControlProperty]]. No output.
 
== GetApplicationProcessProperty ==
Takes an input [[#ApplicationInstanceId]]. Returns an [[#ApplicationProcessProperty]].
 
== GetApplicationInstanceId ==
Takes an input u64 ProcessId. Returns an [[#ApplicationInstanceId]].


== GetApplicationInstanceUnregistrationNotifier ==
== GetApplicationInstanceUnregistrationNotifier ==
Returns an [[#IUnregistrationNotifier]].
No input. Returns an [[#IUnregistrationNotifier]].
 
== ListApplicationInstanceId ==
Takes a type-0x6 output buffer containing an array of [[#ApplicationInstanceId]]. Returns an s32 '''Count'''.
 
== GetMicroApplicationInstanceId ==
Same as [[#GetApplicationInstanceId]].
 
== GetApplicationCertificate ==
Takes an input [[#ApplicationInstanceId]] and a type-0x16 output buffer containing an [[#ApplicationCertificate]]. No output.
 
== GetPreomiaApplicationLaunchProperty ==
Same as [[#GetApplicationLaunchProperty]].
 
== GetPreomiaApplicationControlProperty ==
Same as [[#GetApplicationControlProperty]].


== IUnregistrationNotifier ==
== IUnregistrationNotifier ==
Line 49: Line 74:
! Cmd || Name
! Cmd || Name
|-
|-
| 0 || GetReadableHandle
| 0 || [[#GetReadableHandle|GetReadableHandle]]
|}
|}
=== GetReadableHandle ===
No input. Returns an output readable Event handle.


= arp:w =
= arp:w =
Line 59: Line 87:
! Cmd || Name
! Cmd || Name
|-
|-
| 0 || [[#AcquireRegistrar]]
| 0 || [[#AcquireRegistrar|AcquireRegistrar]]
|-
|-
| 1 || [10.0.0+] UnregisterApplicationInstance ([1.0.0-9.2.0] DeleteProperties)
| 1 || [10.0.0+] [[#UnregisterApplicationInstance|UnregisterApplicationInstance]] ([1.0.0-9.2.0] DeleteProperties)
|-
|-
| 2 || [10.0.0+] [[#AcquireUpdater]]
| 2 || [15.0.0+] [[#AcquireApplicationProcessPropertyUpdater|AcquireApplicationProcessPropertyUpdater]] ([10.0.0-14.1.2] [[#AcquireUpdater|AcquireUpdater]])
|-
| 3 || [15.0.0+] [[#AcquireApplicationCertificateUpdater|AcquireApplicationCertificateUpdater]]
|-
| 4 || [19.0.0+] [[#RegisterApplicationControlProperty|RegisterApplicationControlProperty]]
|}
|}


== AcquireRegistrar ==
== AcquireRegistrar ==
Returns an [[#IRegistrar]].
No input. Returns an [[#IRegistrar]].
 
== UnregisterApplicationInstance ==
Takes an input [[#ApplicationInstanceId]]. No output.


== AcquireUpdater ==
== AcquireUpdater ==
Returns an [[#IUpdater]].
Takes an input [[#ApplicationInstanceId]]. Returns an [[#IUpdater]].
 
== AcquireApplicationProcessPropertyUpdater ==
Takes an input [[#ApplicationInstanceId]]. Returns an [[#IUpdater]].
 
== AcquireApplicationCertificateUpdater ==
Takes an input [[#ApplicationInstanceId]]. Returns an [[#IUpdater]].
 
== RegisterApplicationControlProperty ==
Takes a type-0x15 input buffer containing an [[NACP|ApplicationControlProperty]] and an input [[#ApplicationInstanceId]]. No output.


== IRegistrar ==
== IRegistrar ==
Line 79: Line 123:
! Cmd || Name
! Cmd || Name
|-
|-
| 0 || [[#Issue]]
| 0 || [[#Issue|Issue]]
|-
|-
| 1 || [[#SetApplicationLaunchProperty]]
| 1 || [[#SetApplicationLaunchProperty|SetApplicationLaunchProperty]]
|-
|-
| 2 || [[#SetApplicationControlProperty]]
| 2 || [1.0.0-18.1.0] [[#SetApplicationControlProperty|SetApplicationControlProperty]]
|}
|}


=== Issue ===
=== Issue ===
Takes an input u64.
No input. Returns an output [[#ApplicationInstanceId]].


=== SetApplicationLaunchProperty ===
=== SetApplicationLaunchProperty ===
Takes an input [[#ApplicationLaunchProperty]].
Takes an input [[#ApplicationLaunchProperty]]. No output.


=== SetApplicationControlProperty ===
=== SetApplicationControlProperty ===
Takes an input type-0x15 buffer filled with the contents of [[NACP_Format|control.nacp]].
Takes a type-0x15 input buffer containing an [[NACP|ApplicationControlProperty]]. No output.


== IUpdater ==
== IUpdater ==
Line 102: Line 146:
! Cmd || Name
! Cmd || Name
|-
|-
| 0 || Issue
| 0 || [[#Issue_2|Issue]]
|-
|-
| 1 || SetApplicationProcessProperty
| 1 || [[#SetApplicationProcessProperty|SetApplicationProcessProperty]]
|-
|-
| 2 || DeleteApplicationProcessProperty
| 2 || [[#DeleteApplicationProcessProperty|DeleteApplicationProcessProperty]]
|-
|-
| 3 || SetApplicationCertificate
| 3 || [[#SetApplicationCertificate|SetApplicationCertificate]]
|}
|}
=== Issue ===
No input/output.
=== SetApplicationProcessProperty ===
Takes an input u64 ProcessId and an input [[#ApplicationProcessProperty]]. No output.
=== DeleteApplicationProcessProperty ===
No input/output.
=== SetApplicationCertificate ===
Takes a type-0x15 input buffer containing an [[#ApplicationCertificate]]. No output.


= bgtc:t =
= bgtc:t =
Line 120: Line 176:
! Cmd || Name
! Cmd || Name
|-
|-
| 100 || [[#OpenTaskService]]
| 100 || [[#CreateTaskService]]
|}
|}


== OpenTaskService ==
== CreateTaskService ==
No input. Returns an [[#ITaskService]].
No input. Returns an [[#ITaskService]].


Line 155: Line 211:
| 15 || SchedulePeriodicTask
| 15 || SchedulePeriodicTask
|-
|-
| 16 || [9.0.0+]
| 16 || [9.0.0+] ScheduleStrictTask
|-
|-
| 101 || [3.0.0+] GetOperationMode
| 101 || [3.0.0+] GetOperationMode
Line 163: Line 219:
| 103 || [3.0.0+] WillStayHalfAwakeInsteadSleep
| 103 || [3.0.0+] WillStayHalfAwakeInsteadSleep
|-
|-
| 200 || [12.0.0+]
| 200 || [12.0.0+] EnableStayHalfAwake
|}
|}


Line 238: Line 294:
|-
|-
| 501 || [4.0.0+] CalculateSpanBetween ||  
| 501 || [4.0.0+] CalculateSpanBetween ||  
|-
| 600 || [19.0.0+] GetInitialLaunchEndTime ||
|}
|}


Line 509: Line 567:


= notif:s =
= notif:s =
This is "nn::notification::server::INotificationServicesForSystem".
This is "nn::notification::server::INotificationServices".


This was added with [9.0.0+].
This was added with [9.0.0+].
Line 527: Line 585:
| 540 || [[#DeleteAlarmSetting]]
| 540 || [[#DeleteAlarmSetting]]
|-
|-
| 1000 ||  
| 1000 || [[#GetNotificationCount]]
|-
|-
| 1010 || [[#ListNotifications]]
| 1010 || ListNotifications
|-
|-
| 1020 || [[#DeleteNotification]]
| 1020 || DeleteNotification
|-
|-
| 1030 || [[#ClearNotifications]]
| 1030 || ClearNotifications
|-
|-
| 1040 || [[#OpenNotificationSystemEventAccessor]]
| 1040 || [[#GetNotificationSendingNotifier]]
|-
|-
| 1500 || [[#SetPresentationSetting]]
| 1500 || SetNotificationPresentationSetting
|-
|-
| 1510 || [[#GetPresentationSetting]]
| 1510 || GetNotificationPresentationSetting
|-
|-
| 2000 || [[#GetAlarmSetting]]
| 2000 || [[#GetAlarmSetting]]
|-
|-
| 2001 ||
| 2001 || GetAlarmSettingWithApplicationParameter
|-
|-
| 2010 || [[#MuteAlarmSetting]]
| 2010 || [[#SetAlarmSettingIsMuted]]
|-
|-
| 2020 || [[#IsAlarmSettingReady]]
| 2020 || [[#IsAlarmSettingDeletable]]
|-
|-
| 8000 ||
| 3000 || [20.0.0+]
|-
|-
| 8010 ||
| 3010 || [20.0.0+]
|-
|-
| 8999 || [10.0.0+]
| 8000 || RegisterAppletResourceUserId
|-
|-
| 9000 || [[#GetNextAlarm]]
| 8010 || UnregisterAppletResourceUserId
|-
| 8999 || [10.0.0+] GetCurrentTime
|-
| 9000 || [[#GetAlarmSettingNextNotificationTime]]
|}
|}


== Cmd1000 ==
== GetNotificationCount ==
No input, returns a total of 4-bytes of output.
No input. Returns a total of 4-bytes of output.


== ListNotifications ==
== GetNotificationSendingNotifier ==
Unofficial name.
No input. Returns an output [[#INotificationSystemEventAccessor]].
 
== DeleteNotification ==
Unofficial name.
 
== ClearNotifications ==
Unofficial name.
 
No input/output.
 
== OpenNotificationSystemEventAccessor ==
Unofficial name.
 
No input, returns an output [[#INotificationSystemEventAccessor]].


== INotificationSystemEventAccessor ==
== INotificationSystemEventAccessor ==
Line 586: Line 635:
! Cmd || Name
! Cmd || Name
|-
|-
| 0 ||  
| 0 || GetSystemEvent
|}
|}
Cmd0: no input, returns an output handle.
== SetPresentationSetting ==
Unofficial name.
== GetPresentationSetting ==
Unofficial name.


== GetAlarmSetting ==
== GetAlarmSetting ==
Unofficial name.
Takes an input [[#AlarmSettingId]]. Returns an [[#AlarmSetting]].
Takes an input [[#AlarmSettingId]]. Returns an [[#AlarmSetting]].


== MuteAlarmSetting ==
== SetAlarmSettingIsMuted ==
Unofficial name.
Takes an input [[#AlarmSettingId]] and a bool. No output.
 
Takes an input [[#AlarmSettingId]] and a bool.
 
== IsAlarmSettingReady ==
Unofficial name.


== IsAlarmSettingDeletable ==
Takes an input [[#AlarmSettingId]]. Returns a bool.
Takes an input [[#AlarmSettingId]]. Returns a bool.


== GetNextAlarm ==
== GetAlarmSettingNextNotificationTime ==
Unofficial name.
 
Takes an input [[#AlarmSettingId]]. Returns an u8 '''IsAlarmScheduled''' and a [[Glue_services#PosixTime|PosixTime]] for the next scheduled alarm.
Takes an input [[#AlarmSettingId]]. Returns an u8 '''IsAlarmScheduled''' and a [[Glue_services#PosixTime|PosixTime]] for the next scheduled alarm.


Line 630: Line 663:
| 1 || CommitContext
| 1 || CommitContext
|-
|-
| 2 ||  
| 2 || RemoveContext
|}
|}


Line 674: Line 707:
|-
|-
| 1 || CommitContext
| 1 || CommitContext
|}
= pl:u =
This is "nn::pl::sharedresource::detail::IPlatformSharedResourceManager".
This was added with [16.0.0+].
This has max_sessions 5.
{| class="wikitable" border="1"
|-
! Cmd || Name
|-
| 0 || [[#RequestLoad]]
|-
| 1 || [[#GetLoadState]]
|-
| 2 || [[#GetSize]]
|-
| 3 || [[#GetSharedMemoryAddressOffset]]
|-
| 4 || [[#GetSharedMemoryNativeHandle]]
|-
| 5 || [[#GetSharedFontInOrderOfPriority]]
|-
| 6 || GetSharedFontInOrderOfPriorityForSystem
|}
== RequestLoad ==
Takes a [[#SharedFontType]] (uint32), no output.
== GetLoadState ==
Takes a [[#SharedFontType]] (uint32), returns the [[#LoadState]] (uint32).
=== LoadState ===
{| class="wikitable" border="1"
|-
! Value || Description
|-
| 0x00 || Loading
|-
| 0x01 || Loaded
|}
== GetSize ==
Takes a [[#SharedFontType]] (uint32), returns the Font Size (uint32).
== GetSharedMemoryAddressOffset ==
Takes a [[#SharedFontType]] (uint32), returns the offset (uint32) to the Font Address.
== GetSharedMemoryNativeHandle ==
No input, returns an output SharedMemory handle.
User-processes map this SharedMemory with size=0x1100000 and permissions=R--.
Font data is TTF, located at the offset returned by [[#GetSharedMemoryAddressOffset]].
== GetSharedFontInOrderOfPriority ==
Takes an input u64 [[Settings_services#LanguageCode|LanguageCode]] and 3 type-0x6 output buffers, returns an output u8 and u32. The u8 is a bool to specify if the fonts are loaded or not and the u32 is the font count.
The first buffer contains a list of [[#SharedFontType|Shared font types]], the second buffer contains the font offsets and the final buffer contains the font sizes.
The buffers are an array of u32s which specify information about a specific font. Buffer1[n] is related to Buffer2[n] and Buffer3[n].
Example: Font index 0s offset is at Buffer2[0], size is at Buffer3[0].
The fonts are relative to the shared memory created by [[#GetSharedFontSharedMemoryHandle]]
== SharedFontType ==
{| class="wikitable" border="1"
|-
! Value || Description
|-
| 0x00 || Japan, US and Europe (Standard)
|-
| 0x01 || Chinese Simplified
|-
| 0x02 || Extended Chinese Simplified
|-
| 0x03 || Chinese Traditional
|-
| 0x04 || Korean (Hangul)
|-
| 0x05 || Nintendo Extended
|}
* Nintendo Extended: Contains Nintendo-specific characters, including HID buttons, HID controller styles, applet icons, Wii(U) icons,  etc.
= ApplicationInstanceId =
This is "nn::arp::ApplicationInstanceId".
This is an u64 ID bound to an application instance.
= ApplicationKind =
This is "nn::arp::ApplicationKind".
{| class="wikitable" border="1"
|-
! Value
! Description
|-
| 0 || Application
|-
| 1 || MicroApplication
|}
|}


= ApplicationLaunchProperty =
= ApplicationLaunchProperty =
Total size is 0x10 bytes.
This is "nn::arp::ApplicationLaunchProperty".
 
This is a 0x10-byte struct.


{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 687: Line 822:
| 0x00
| 0x00
| 0x08
| 0x08
| Title ID
| [[NCM_services#ProgramId|Id]]
|-
|-
| 0x08
| 0x08
Line 695: Line 830:
| 0x0C
| 0x0C
| 0x01
| 0x01
| Base Game [[Filesystem_services#StorageId|Storage Id]]
| [[Filesystem_services#StorageId|Storage]]
|-
|-
| 0x0D
| 0x0D
| 0x01
| 0x01
| Update [[Filesystem_services#StorageId|Storage Id]]
| [[Filesystem_services#StorageId|PatchStorage]]
|-
|-
| 0x0E
| 0x0E
| 0x02
| 0x01
| Padding
| [[#ApplicationKind|Kind]]
|-
| 0x0F
| 0x01
| Reserved
|}
|}
= ApplicationProcessProperty =
This is "nn::arp::ApplicationProcessProperty".
This is a 0x1-byte struct.
[17.0.0+] This is a 0x10-byte struct.
{| class="wikitable" border="1"
|-
! Offset
! Size
! Description
|-
| 0x00
| 0x01
| ProgramIndex
|-
| 0x01
| 0x0F
|
|}
= ApplicationCertificate =
This is "nn::arp::ApplicationCertificate".
This is a 0x528-byte struct.


= AlarmSettingId =
= AlarmSettingId =