Shared Database services: Difference between revisions
No edit summary |
No edit summary |
||
Line 216: | Line 216: | ||
== NotifyAppletEvent == | == NotifyAppletEvent == | ||
Takes an input u8 [[#AppletEvent]], an u8 [[Applet_Manager_services#AppletId|AppletId]], an u8 [[Filesystem_services#StorageId|StorageId]], an u8 | Takes an input u8 [[#AppletEvent]], an u8 [[Applet_Manager_services#AppletId|AppletId]], an u8 [[Filesystem_services#StorageId|StorageId]], an u8 [[#PlayLogPolicy]], an u32 '''event_x8''', and an u64 '''titleID'''. Returns no output. | ||
When | When [[#PlayLogPolicy]] is 2 this will immediately return 0. | ||
Logs a new [[#PlayEvent]] with the following data: | Logs a new [[#PlayEvent]] with the following data: | ||
Line 226: | Line 226: | ||
* Converts '''titleID''' and writes it to +0x0. | * Converts '''titleID''' and writes it to +0x0. | ||
* u32 +0x8 = '''event_x8'''. | * u32 +0x8 = '''event_x8'''. | ||
* u8 +0xC = [[Applet_Manager_services#AppletId|AppletId]], u8 +0xD = [[Filesystem_services#StorageId|StorageId]], and u8 +0xE = | * u8 +0xC = [[Applet_Manager_services#AppletId|AppletId]], u8 +0xD = [[Filesystem_services#StorageId|StorageId]], and u8 +0xE = [[#PlayLogPolicy]]. | ||
After the initial logging, additional code runs with some of the above input params. | After the initial logging, additional code runs with some of the above input params. | ||
Line 253: | Line 253: | ||
== Cmd8 == | == Cmd8 == | ||
Takes an input u8 [[#AppletEvent]], an u8 '''event_x9''', an u8 [[Applet_Manager_services#AppletId|AppletId]], an u8 [[Filesystem_services#StorageId|StorageId]], an u8 | Takes an input u8 [[#AppletEvent]], an u8 '''event_x9''', an u8 [[Applet_Manager_services#AppletId|AppletId]], an u8 [[Filesystem_services#StorageId|StorageId]], an u8 [[#PlayLogPolicy]], and an u64 '''titleID'''. Returns no output. | ||
This is similar to [[#NotifyAppletEvent]]. | This is similar to [[#NotifyAppletEvent]]. | ||
When | When [[#PlayLogPolicy]] is 2 this will immediately return 0. | ||
Logs a new [[#PlayEvent]] with the following data: | Logs a new [[#PlayEvent]] with the following data: | ||
Line 266: | Line 266: | ||
* u8 +0x9 = '''event_x9'''. | * u8 +0x9 = '''event_x9'''. | ||
* u8 +0x8 = 1. | * u8 +0x8 = 1. | ||
* u8 +0xC = [[Applet_Manager_services#AppletId|AppletId]], u8 +0xD = [[Filesystem_services#StorageId|StorageId]], and u8 +0xE = | * u8 +0xC = [[Applet_Manager_services#AppletId|AppletId]], u8 +0xD = [[Filesystem_services#StorageId|StorageId]], and u8 +0xE = [[#PlayLogPolicy]]. | ||
After the initial logging, additional code runs with some of the above input params. This is handled the same as [[#NotifyAppletEvent]], except that the value passed for '''event_x8''' is value 0 here. | After the initial logging, additional code runs with some of the above input params. This is handled the same as [[#NotifyAppletEvent]], except that the value passed for '''event_x8''' is value 0 here. | ||
== Cmd9 == | == Cmd9 == | ||
Takes an input u8 [[#AppletEvent]], an u8 [[Applet_Manager_services#AppletId|AppletId]], an u8 [[Filesystem_services#StorageId|StorageId]], an 0x20-byte struct, an u8 bool flag, an u8 | Takes an input u8 [[#AppletEvent]], an u8 [[Applet_Manager_services#AppletId|AppletId]], an u8 [[Filesystem_services#StorageId|StorageId]], an 0x20-byte struct, an u8 bool flag, an u8 [[#PlayLogPolicy]], an u32 '''event_x8''', and an u64 '''titleID'''. Returns no output. | ||
This is identical to [[#NotifyAppletEvent]] except for the additional struct/flag params. | This is identical to [[#NotifyAppletEvent]] except for the additional struct/flag params. | ||
When | When [[#PlayLogPolicy]] is 2 this will immediately return 0. | ||
Logs a new [[#PlayEvent]] with the following data: | Logs a new [[#PlayEvent]] with the following data: | ||
Line 283: | Line 283: | ||
* Converts '''titleID''' and writes it to +0x0. | * Converts '''titleID''' and writes it to +0x0. | ||
* u32 +0x8 = '''event_x8''' | * u32 +0x8 = '''event_x8''' | ||
* u8 +0xC = [[Applet_Manager_services#AppletId|AppletId]], u8 +0xD = [[Filesystem_services#StorageId|StorageId]], and u8 +0xE = | * u8 +0xC = [[Applet_Manager_services#AppletId|AppletId]], u8 +0xD = [[Filesystem_services#StorageId|StorageId]], and u8 +0xE = [[#PlayLogPolicy]]. | ||
After the initial logging, additional code runs with some of the above input params. This is handled the same as [[#NotifyAppletEvent]], except that when the u8 bool flag is set the input struct is used with this. | After the initial logging, additional code runs with some of the above input params. This is handled the same as [[#NotifyAppletEvent]], except that when the u8 bool flag is set the input struct is used with this. | ||
Line 533: | Line 533: | ||
This is an enum for [[#PlayEvent]] +0xF with [[#PlayEventType]] = Applet, this indicates the type of the Applet event. | This is an enum for [[#PlayEvent]] +0xF with [[#PlayEventType]] = Applet, this indicates the type of the Applet event. | ||
= PlayLogPolicy = | |||
{| class="wikitable" border="1" | |||
|- | |||
! Value | |||
! Description | |||
|- | |||
| 0 || [[#QueryApplicationEvent]] and [[#QueryLastPlayTime]] will only return the entry when PlayLogPolicy matches this value. | |||
|- | |||
| 1 || The above commands will filter out the entry with this. | |||
|- | |||
| 2 || pdm:ntfy [[#NotifyAppletEvent]], [[#Cmd8]], and [[#Cmd9]] will immediately return 0 when the input param matches this value. | |||
|} | |||
This is an enum for [[#PlayEvent]] +0xE with [[#PlayEventType]] = Applet. This is set via the above commands, which uses this as an input param. | |||
= PlayEvent = | = PlayEvent = | ||
Line 581: | Line 596: | ||
| 0xD || 0x1 || [[Filesystem_services#StorageId|StorageId]] | | 0xD || 0x1 || [[Filesystem_services#StorageId|StorageId]] | ||
|- | |- | ||
| 0xE || 0x1 || | | 0xE || 0x1 || [[#PlayLogPolicy]] | ||
|- | |- | ||
| 0xF || 0x1 || [[#AppletEvent]] | | 0xF || 0x1 || [[#AppletEvent]] |