PSP2SDK
dirty-f9e4f2d
The free SDK for PSP2
|
00001 00009 #ifndef _PSP2_APPUTL_H_ 00010 #define _PSP2_APPUTL_H_ 00011 00012 #include <psp2/types.h> 00013 #include <stdint.h> 00014 00015 #ifdef __cplusplus 00016 extern "C" { 00017 #endif 00018 00019 enum { 00020 SCE_APPUTIL_ERROR_PARAMETER = 0x80100600, 00021 SCE_APPUTIL_ERROR_NOT_INITIALIZED = 0x80100601, 00022 SCE_APPUTIL_ERROR_NO_MEMORY = 0x80100602, 00023 SCE_APPUTIL_ERROR_BUSY = 0x80100603, 00024 SCE_APPUTIL_ERROR_NOT_MOUNTED = 0x80100604, 00025 SCE_APPUTIL_ERROR_NO_PERMISSION = 0x80100605, 00026 SCE_APPUTIL_ERROR_APPEVENT_PARSE_INVALID_DATA = 0x80100620, 00027 SCE_APPUTIL_ERROR_SAVEDATA_SLOT_EXISTS = 0x80100640, 00028 SCE_APPUTIL_ERROR_SAVEDATA_SLOT_NOT_FOUND = 0x80100641, 00029 SCE_APPUTIL_ERROR_SAVEDATA_NO_SPACE_QUOTA = 0x80100642, 00030 SCE_APPUTIL_ERROR_SAVEDATA_NO_SPACE_FS = 0x80100643, 00031 SCE_APPUTIL_ERROR_PHOTO_DEVICE_NOT_FOUND = 0x80100680, 00032 }; 00033 00034 typedef unsigned int SceAppUtilBootAttribute; 00035 typedef unsigned int SceAppUtilAppEventType; 00036 typedef unsigned int SceAppUtilSaveDataSlotId; 00037 typedef unsigned int SceAppUtilSaveDataSlotStatus; 00038 typedef unsigned int SceAppUtilSaveDataSaveMode; 00039 typedef unsigned int SceAppUtilSaveDataRemoveMode; 00040 typedef unsigned int SceAppUtilAppParamId; 00041 typedef unsigned int SceAppUtilBgdlStatusType; 00042 00043 typedef struct SceAppUtilBgdlStatus SceAppUtilBgdlStatus; // Missing struct 00044 00045 typedef struct SceAppUtilInitParam { 00046 SceSize workBufSize; 00047 uint8_t reserved[60]; 00048 } SceAppUtilInitParam; 00049 00050 typedef struct SceAppUtilBootParam { 00051 SceAppUtilBootAttribute attr; 00052 unsigned int appVersion; 00053 uint8_t reserved[32]; 00054 } SceAppUtilBootParam; 00055 00056 typedef struct SceAppUtilSaveDataMountPoint { 00057 uint8_t data[16]; 00058 } SceAppUtilSaveDataMountPoint; 00059 00060 typedef struct SceAppUtilAppEventParam { 00061 SceAppUtilAppEventType type; 00062 uint8_t dat[1024]; 00063 } SceAppUtilAppEventParam; 00064 00065 typedef struct SceAppUtilMountPoint { 00066 int8_t data[16]; 00067 } SceAppUtilMountPoint; 00068 00069 typedef struct SceAppUtilSaveDataSlotEmptyParam { 00070 SceWChar16 *title; 00071 char *iconPath; 00072 void *iconBuf; 00073 SceSize iconBufSize; 00074 uint8_t reserved[32]; 00075 } SceAppUtilSaveDataSlotEmptyParam; 00076 00077 typedef struct SceAppUtilSaveDataSlot { 00078 SceAppUtilSaveDataSlotId id; 00079 SceAppUtilSaveDataSlotStatus status; 00080 int userParam; 00081 SceAppUtilSaveDataSlotEmptyParam *emptyParam; 00082 } SceAppUtilSaveDataSlot; 00083 00084 typedef struct SceAppUtilSaveDataSlotParam { 00085 SceAppUtilSaveDataSlotStatus status; 00086 SceWChar16 title[32]; 00087 SceWChar16 subTitle[64]; 00088 SceWChar16 detail[256]; 00089 char iconPath[64]; 00090 int userParam; 00091 SceSize sizeKB; 00092 SceDateTime modifiedTime; 00093 uint8_t reserved[48]; 00094 } SceAppUtilSaveDataSlotParam; 00095 00096 typedef struct SceAppUtilSaveDataSaveItem { 00097 const char *dataPath; 00098 const void *buf; 00099 uint32_t pad; 00100 SceOff offset; 00101 SceAppUtilSaveDataSaveMode mode; 00102 uint8_t reserved[36]; 00103 } SceAppUtilSaveDataSaveItem; 00104 00105 typedef struct SceAppUtilSaveDataFile { 00106 const char *filePath; 00107 void *buf; 00108 SceSize bufSize; 00109 SceOff offset; 00110 unsigned int mode; 00111 unsigned int progDelta; 00112 uint8_t reserved[32]; 00113 } SceAppUtilSaveDataFile; 00114 00115 typedef struct SceAppUtilSaveDataFileSlot { 00116 unsigned int id; 00117 SceAppUtilSaveDataSlotParam *slotParam; 00118 uint8_t reserved[32]; 00119 } SceAppUtilSaveDataFileSlot; 00120 00121 typedef struct SceAppUtilSaveDataRemoveItem { 00122 const char *dataPath; 00123 SceAppUtilSaveDataRemoveMode mode; 00124 uint8_t reserved[36]; 00125 } SceAppUtilSaveDataRemoveItem; 00126 00127 typedef struct SceAppUtilStoreBrowseParam { 00128 unsigned int type; 00129 const char *id; 00130 } SceAppUtilStoreBrowseParam; 00131 00132 typedef struct SceAppUtilWebBrowserParam { 00133 const char *str; 00134 SceSize strlen; 00135 unsigned int launchMode; 00136 unsigned int reserved; 00137 } SceAppUtilWebBrowserParam; 00138 00140 int sceAppUtilInit(SceAppUtilInitParam *initParam, SceAppUtilBootParam *bootParam); 00141 00143 int sceAppUtilShutdown(); 00144 00146 int sceAppUtilRecieveAppEvent(SceAppUtilAppEventParam *eventParam); 00147 00149 int sceAppUtilSaveDataSlotCreate(unsigned int slotId, 00150 SceAppUtilSaveDataSlotParam *param, 00151 SceAppUtilSaveDataMountPoint *mountPoint); 00152 00154 int sceAppUtilSaveDataSlotDelete(unsigned int slotId, 00155 SceAppUtilSaveDataMountPoint *mountPoint); 00156 00158 int sceAppUtilSaveDataSlotSetParam(unsigned int slotId, 00159 SceAppUtilSaveDataSlotParam *param, 00160 SceAppUtilSaveDataMountPoint *mountPoint); 00161 00163 int sceAppUtilSaveDataSlotGetParam(unsigned int slotId, 00164 SceAppUtilSaveDataSlotParam *param, 00165 SceAppUtilSaveDataMountPoint *mountPoint); 00166 00168 int sceAppUtilSaveDataDataSave(SceAppUtilSaveDataFileSlot *slot, 00169 SceAppUtilSaveDataFile *files, unsigned int fileNum, 00170 SceAppUtilSaveDataMountPoint *mountPoint, 00171 SceSize *requiredSizeKB); 00172 00174 int sceAppUtilMusicMount(); 00175 00177 int sceAppUtilMusicUmount(); 00178 00180 int sceAppUtilPhotoMount(); 00181 00183 int sceAppUtilPhotoUmount(); 00184 00186 int sceAppUtilSystemParamGetInt(unsigned int paramId, int *value); 00187 00189 int sceAppUtilSystemParamGetString(unsigned int paramId, 00190 SceWChar16 *buf, SceSize bufSize); 00191 00193 int sceAppUtilParamGetInt(SceAppUtilAppParamId paramId, int *value); 00194 00196 int sceAppUtilSaveSafeMemory(void *buf, SceSize bufSize, SceOff offset); 00197 00199 int sceAppUtilLoadSafeMemory(void *buf, SceSize bufSize, SceOff offset); 00200 00202 int sceAppUtilStoreBrowse(SceAppUtilStoreBrowseParam *param); 00203 00205 int sceAppUtilBgdlGetStatus(SceAppUtilBgdlStatus *stat); 00206 00208 int sceAppUtilLaunchWebBrowser(SceAppUtilWebBrowserParam *param); 00209 00210 #ifdef __cplusplus 00211 } 00212 #endif 00213 00214 #endif /* _PSP2_APPUTL_H_ */