diff options
-rw-r--r-- | include/user/promoterutil.h | 93 | ||||
-rw-r--r-- | include/user/sysmodule.h | 10 | ||||
-rw-r--r-- | nids/360/ScePromoterUtil.yml | 15 |
3 files changed, 118 insertions, 0 deletions
diff --git a/include/user/promoterutil.h b/include/user/promoterutil.h new file mode 100644 index 0000000..117b4c3 --- /dev/null +++ b/include/user/promoterutil.h @@ -0,0 +1,93 @@ +#ifndef _PSP2_PROMOTERUTIL_H_ +#define _PSP2_PROMOTERUTIL_H_ + +#include <psp2/types.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/** Parameters for scePromoterUtilityUpdateLiveArea() */ +typedef struct ScePromoterUtilityLAUpdate { + char titleid[12]; //!< Target app. + char path[128]; //!< Directory of extracted LA update data. +} ScePromoterUtilityLAUpdate; + +/** + * Init the promoter utility. + * \note Needs to be called before using the other functions. + * + * @return 0 on success. + */ +int scePromoterUtilityInit(void); + +/** + * Deinit the promoter utility. + * + * @return 0 on success. + */ +int scePromoterUtilityExit(void); + +/** + * Delete a package from the LiveArea. + * + * @param[in] *titleid + * + * @return 0 on success. + */ +int scePromoterUtilityDeletePkg(const char *titleid); + +/** + * Update the LiveArea ressources of an app + * + * @param[in] *args - see ::ScePromoterUtilityLAUpdate + * + * @return 0 on success. + */ +int scePromoterUtilityUpdateLiveArea(ScePromoterUtilityLAUpdate *args); + +/** + * Install a package from a directory, and add an icon on the LiveArea. + * \note It is an asynchronous function. + * + * @param[in] *path - the path of the directory where the extracted content of the package is + * @param unk - unknown, pass 0 + * + * @return 0 on success. + */ +int scePromoterUtilityPromotePkg(const char *path, int unk); + +/** + * Install a package from a directory and generate a rif. + * \note It is an asynchronous function. + * + * @param[in] *path - the path of the directory where the extracted content of the package is + * @param unk - unknown, pass 0 + * + * @return 0 on success. + */ +int scePromoterUtilityPromotePkgWithRif(const char *path, int unk); + +/** + * Returns the state of an operation. + * + * @param[out] *state - the current status, 0 when finished + * + * @return <0 if failed. + */ +int scePromoterUtilityGetState(int *state); + +/** + * Returns the result of a finished operation + * + * @param[out] *res - the result, 0 on success + * + * @return <0 if failed. + */ +int scePromoterUtilityGetResult(int *res); + +#ifdef __cplusplus +} +#endif + +#endif /* _PSP2_PROMOTERUTIL_H_ */ diff --git a/include/user/sysmodule.h b/include/user/sysmodule.h index 9961b71..8cc2a37 100644 --- a/include/user/sysmodule.h +++ b/include/user/sysmodule.h @@ -74,9 +74,19 @@ enum { SCE_SYSMODULE_AVPLAYER = 0x004c }; +/* internal module IDs */ +enum { + SCE_SYSMODULE_PAF = 0x80000008, + SCE_SYSMODULE_PROMOTER_UTIL = 0x80000024 +}; + int sceSysmoduleLoadModule(SceUInt16 id); int sceSysmoduleUnloadModule(SceUInt16 id); int sceSysmoduleIsLoaded(SceUInt16 id); +int sceSysmoduleLoadModuleInternal(SceUInt32 id); +int sceSysmoduleUnloadModuleInternal(SceUInt32 id); +int sceSysmoduleIsLoadedInternal(SceUInt32 id); +int sceSysmoduleLoadModuleInternalWithArg(SceUInt32 id, SceSize args, void *argp, void *unk); #ifdef __cplusplus } diff --git a/nids/360/ScePromoterUtil.yml b/nids/360/ScePromoterUtil.yml new file mode 100644 index 0000000..1288b10 --- /dev/null +++ b/nids/360/ScePromoterUtil.yml @@ -0,0 +1,15 @@ +modules: + ScePromoterUtil: + nid: 0xB31C2D5C + libraries: + ScePromoterUtil: + nid: 0x31F237B6 + functions: + scePromoterUtilityDeletePkg: 0x7D46752F + scePromoterUtilityExit: 0xC95D24A6 + scePromoterUtilityGetResult: 0x49B473F0 + scePromoterUtilityGetState: 0xABEC74D2 + scePromoterUtilityInit: 0x93451536 + scePromoterUtilityPromotePkg: 0x716C81F4 + scePromoterUtilityPromotePkgWithRif: 0x86641BC6 + scePromoterUtilityUpdateLiveArea: 0x17D73ECA |