Shared Database services: Difference between revisions

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 [[#PlayLogPolicy]], an u32 '''event_x8''', and an u64 '''titleID'''. Returns no output.
Takes an input u8 [[#AppletEventType]], 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 [[#PlayLogPolicy]] is 2 ("None") this will immediately return 0.
When [[#PlayLogPolicy]] is 2 ("None") this will immediately return 0.
Line 222: Line 222:
Logs a new [[#PlayEvent]] with the following data:
Logs a new [[#PlayEvent]] with the following data:
* Clears the 0x10-bytes at +0x10.
* Clears the 0x10-bytes at +0x10.
* u8 +0xF = [[#AppletEvent]].
* u8 +0xF = [[#AppletEventType]].
* Sets the 3 timestamps.
* Sets the 3 timestamps.
* Converts '''titleID''' and writes it to +0x0.
* Converts '''titleID''' and writes it to +0x0.
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 [[#PlayLogPolicy]], and an u64 '''titleID'''. Returns no output.
Takes an input u8 [[#AppletEventType]], 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]].
Line 261: Line 261:
Logs a new [[#PlayEvent]] with the following data:
Logs a new [[#PlayEvent]] with the following data:
* Clears the 0x20-bytes at +0x0.
* Clears the 0x20-bytes at +0x0.
* u8 +0xF = [[#AppletEvent]].
* u8 +0xF = [[#AppletEventType]].
* Sets the 3 timestamps.
* Sets the 3 timestamps.
* Converts '''titleID''' and writes it to +0x0.
* Converts '''titleID''' and writes it to +0x0.
Line 271: Line 271:


== 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 [[#PlayLogPolicy]], an u32 '''event_x8''', and an u64 '''titleID'''. Returns no output.
Takes an input u8 [[#AppletEventType]], 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.
Line 501: Line 501:
This is an enum for [[#PlayEvent]] +0x1C, which indicates the type of [[#PlayEvent]].
This is an enum for [[#PlayEvent]] +0x1C, which indicates the type of [[#PlayEvent]].


= AppletEvent =
= AppletEventType =
{| class="wikitable" border="1"
{| class="wikitable" border="1"
|-
|-
Line 590: Line 590:
| 0xE || 0x1 || [[#PlayLogPolicy]]
| 0xE || 0x1 || [[#PlayLogPolicy]]
|-
|-
| 0xF || 0x1 || [[#AppletEvent]]
| 0xF || 0x1 || [[#AppletEventType]]
|-
|-
| 0x10 || 0xC || Unused
| 0x10 || 0xC || Unused