summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrapheneCt2020-06-12 00:24:49 -0400
committerReiko Asakura2020-06-12 00:24:49 -0400
commitb0498793e9b7890d615c1ef26f687747d4a5ea28 (patch)
tree57dad96e52ccfa3cd3d1e147549348ece5b91323
parentnotification_util.h: update struct members (diff)
downloadvds-libraries-b0498793e9b7890d615c1ef26f687747d4a5ea28.tar.gz
Add incoming_dialog.h
From https://github.com/GrapheneCt/Vita-PoC/blob/master/incoming_dialog.h
-rw-r--r--include/user/incoming_dialog.h83
-rw-r--r--nids/360/SceIncomingDialog.yml13
2 files changed, 96 insertions, 0 deletions
diff --git a/include/user/incoming_dialog.h b/include/user/incoming_dialog.h
new file mode 100644
index 0000000..c110cf0
--- /dev/null
+++ b/include/user/incoming_dialog.h
@@ -0,0 +1,83 @@
+#ifndef _DOLCESDK_PSP2_INCOMING_DIALOG_H_
+#define _DOLCESDK_PSP2_INCOMING_DIALOG_H_
+
+#include <psp2/kernel/clib.h>
+#include <psp2/scebase.h>
+#include <psp2/types.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Dialog status
+ */
+typedef enum SceIncomingDialogStatus {
+ SCE_INCOMING_DIALOG_NOT_RUNNING,
+ SCE_INCOMING_DIALOG_BUSY,
+ SCE_INCOMING_DIALOG_RUNNING,
+ SCE_INCOMING_DIALOG_ACCEPTED,
+ SCE_INCOMING_DIALOG_REJECTED,
+ SCE_INCOMING_DIALOG_CLOSED,
+ SCE_INCOMING_DIALOG_TIMEOUT,
+} SceIncomingDialogStatus;
+
+/**
+ * Errors
+ */
+#define SCE_INCOMINGDIALOG_ERROR_INVALID_ARG 0x80106202;
+
+typedef struct SceIncomingDialogParam {
+ SceInt32 sdkVersion;
+ SceChar8 titleid[0x10]; // TitleId of the application to open when "accept" button has been pressed. Can be all zero.
+ SceChar8 audioPath[0x80]; // Path to audio file that will be played during dialog, .mp3, .at9, m4a. Can be all zero.
+ SceUInt32 dialogTimer; // Time to show dialog in seconds
+ SceInt32 unk_BC; // Can be set to 0
+ SceChar8 reserved1[0x3E];
+ SceWChar16 buttonRightText[0x20]; // Text for "accept" button. Must be null-terminated.
+ SceWChar16 buttonLeftText[0x20]; // Text for "reject" button. Must be null-terminated. If all zero, only "accept" button will be created.
+ SceWChar16 dialogText[0x81]; // Text for dialog window, also shared with notification. Must be null-terminated.
+} SceIncomingDialogParam;
+
+/**
+ * Initialize incoming dialog library, initType must be 0.
+ */
+SceInt32 sceIncomingDialogInitialize(int initType);
+
+/**
+ * Open incoming dialog.
+ */
+SceInt32 sceIncomingDialogOpen(SceIncomingDialogParam* dialogParam);
+
+/**
+ * Returns current status of incoming dialog.
+ */
+SceInt32 sceIncomingDialogGetStatus(void);
+
+/**
+ * Force exit to LiveArea and show dialog window
+ */
+SceInt32 sceIncomingDialogSwitchToDialog(void);
+
+/**
+ * Close incoming dialog.
+ */
+SceInt32 sceIncomingDialogClose(void);
+
+/**
+ * Finalize incoming dialog library
+ */
+SceInt32 sceIncomingDialogFinalize(void);
+
+static inline
+void sceIncomingDialogParamInit(SceIncomingDialogParam* dialogParam)
+{
+ sceClibMemset(dialogParam, 0x0, sizeof(SceIncomingDialogParam));
+ dialogParam->sdkVersion = SCE_PSP2_SDK_VERSION;
+}
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* _DOLCESDK_PSP2_INCOMING_DIALOG_H_ */
diff --git a/nids/360/SceIncomingDialog.yml b/nids/360/SceIncomingDialog.yml
new file mode 100644
index 0000000..01ba346
--- /dev/null
+++ b/nids/360/SceIncomingDialog.yml
@@ -0,0 +1,13 @@
+modules:
+ SceIncomingDialog:
+ nid: 0xC3E0DAF2
+ libraries:
+ SceIncomingDialog:
+ nid: 0x5058F4AB
+ functions:
+ sceIncomingDialogClose: 0x126BD15E
+ sceIncomingDialogFinalize: 0x860B1885
+ sceIncomingDialogGetStatus: 0x839DE14C
+ sceIncomingDialogInitialize: 0x18AF99EB
+ sceIncomingDialogOpen: 0x2BEDC1A0
+ sceIncomingDialogSwitchToDialog: 0x0123B83A