diff options
author | Sunguk Lee | 2016-11-30 04:27:03 +0900 |
---|---|---|
committer | GitHub | 2016-11-30 04:27:03 +0900 |
commit | 7d1e7b34539a7b232090974866fa9be3b122d3d0 (patch) | |
tree | 3bfb6278006b303dcde60ca8472c9c398223409e /include | |
parent | Merge pull request #103 from vitasdk/SceBtForDriver_nids (diff) | |
parent | Rename argument of scePromoterUtilityDeletePkg (diff) | |
download | vds-libraries-7d1e7b34539a7b232090974866fa9be3b122d3d0.tar.gz |
Merge pull request #101 from vitasdk/add-promoterutils
Add package installing functions
Diffstat (limited to 'include')
-rw-r--r-- | include/user/promoterutil.h | 93 | ||||
-rw-r--r-- | include/user/sysmodule.h | 10 |
2 files changed, 103 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 } |