diff options
author | Francisco José García García | 2016-11-05 15:26:56 +0000 |
---|---|---|
committer | GitHub | 2016-11-05 15:26:56 +0000 |
commit | 2fe2b8af1eae2919def1711b9fe49008409b525e (patch) | |
tree | 10c27cf4a6c9a8c354d93d5d72b61c7bc51d8472 | |
parent | Fixed number of arguments in two functions (#58) (diff) | |
parent | Update db.json (diff) | |
download | vds-libraries-2fe2b8af1eae2919def1711b9fe49008409b525e.tar.gz |
Merge pull request #76 from d3m3vilurr/fix-pr-74
Fix PR #74
-rw-r--r-- | include/user/shellutil.h | 72 | ||||
-rw-r--r-- | nids/360/SceShellSvc.yml | 11 |
2 files changed, 83 insertions, 0 deletions
diff --git a/include/user/shellutil.h b/include/user/shellutil.h new file mode 100644 index 0000000..ceb413d --- /dev/null +++ b/include/user/shellutil.h @@ -0,0 +1,72 @@ +#ifndef _PSP2_SHELLUTIL_H_ +#define _PSP2_SHELLUTIL_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +enum { + SCE_SHELL_UTIL_LOCK_TYPE_PS_BTN = 0x1, + SCE_SHELL_UTIL_LOCK_TYPE_QUICK_MENU = 0x2, + SCE_SHELL_UTIL_LOCK_TYPE_POWEROFF_MENU = 0x4, + SCE_SHELL_UTIL_LOCK_TYPE_UNK8 = 0x8, + SCE_SHELL_UTIL_LOCK_TYPE_UNK10 = 0x10, + SCE_SHELL_UTIL_LOCK_TYPE_UNK20 = 0x20, + SCE_SHELL_UTIL_LOCK_TYPE_UNK40 = 0x40, + SCE_SHELL_UTIL_LOCK_TYPE_UNK80 = 0x80, + SCE_SHELL_UTIL_LOCK_TYPE_UNK100 = 0x100, + SCE_SHELL_UTIL_LOCK_TYPE_UNK200 = 0x200, + SCE_SHELL_UTIL_LOCK_TYPE_MUSIC_PLAYER = 0x400, + SCE_SHELL_UTIL_LOCK_TYPE_PS_BTN_2 = 0x800, //! without the stop symbol +}; + +enum { + SCE_SHELL_UTIL_LOCK_MODE_LOCK = 0x1, + SCE_SHELL_UTIL_LOCK_MODE_UNLOCK = 0x2, +}; + +typedef void (SceShellUtilEventHandler)(int result, int mode, int type, void *userData); + +/** + * Init events + * + * @param[in] unk - Unknown, use 0 + * + * @return 0 on success, < 0 on error. +*/ +int sceShellUtilInitEvents(int unk); + +/** + * Register event handler + * + * @param[in] handler - Event handler + * + * @param[in] userData - The user data passed to the handler + * + * @return 0 on success, < 0 on error. +*/ +int sceShellUtilRegisterEventHandler(SceShellUtilEventHandler *handler, void *userData); + +/** + * Lock event + * + * @param[in] type - One of ::ShellUtilLockType + * + * @return 0 on success, < 0 on error. +*/ +int sceShellUtilLock(int type); + +/** + * Unlock event + * + * @param[in] type - One of ::ShellUtilLockType + * + * @return 0 on success, < 0 on error. +*/ +int sceShellUtilUnlock(int type); + +#ifdef __cplusplus +} +#endif + +#endif /* _PSP2_SHELLUTIL_H_ */ diff --git a/nids/360/SceShellSvc.yml b/nids/360/SceShellSvc.yml new file mode 100644 index 0000000..53047a2 --- /dev/null +++ b/nids/360/SceShellSvc.yml @@ -0,0 +1,11 @@ +modules: + SceShellSvc: + nid: 0x821DC423 + libraries: + SceShellUtil: + nid: 0xD2B1C8AE + functions: + sceShellUtilInitEvents: 0xE8AD11EC + sceShellUtilLock: 0xA9537233 + sceShellUtilRegisterEventHandler: 0x7B5EDFE7 + sceShellUtilUnlock: 0x21A6CF54 |