vitasdk
Documentation of the vitasdk
apputil.h
Go to the documentation of this file.
1 
7 #ifndef _PSP2_APPUTIL_H_
8 #define _PSP2_APPUTIL_H_
9 
10 #include <vitasdk/build_utils.h>
11 #include <psp2/types.h>
12 #include <stdint.h>
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
18 typedef enum SceAppUtilSaveDataRemoveMode {
22 
23 typedef enum SceAppUtilSaveDataSaveMode {
27 
28 typedef enum SceAppUtilErrorCode {
32  SCE_APPUTIL_ERROR_BUSY = 0x80100603,
47 
48 typedef unsigned int SceAppUtilBootAttribute;
49 typedef unsigned int SceAppUtilAppEventType;
50 typedef unsigned int SceAppUtilSaveDataSlotId;
51 typedef unsigned int SceAppUtilSaveDataSlotStatus;
52 typedef unsigned int SceAppUtilAppParamId;
53 typedef unsigned int SceAppUtilBgdlStatusType;
54 
55 typedef struct SceAppUtilBgdlStatus {
63 
64 typedef struct SceAppUtilInitParam {
66  uint8_t reserved[60];
69 
70 typedef struct SceAppUtilBootParam {
72  unsigned int appVersion;
73  uint8_t reserved[32];
76 
78  uint8_t data[16];
81 
82 typedef struct SceAppUtilAppEventParam {
84  uint8_t dat[1024];
87 
88 typedef struct SceAppUtilMountPoint {
89  int8_t data[16];
92 
95  char *iconPath;
96  void *iconBuf;
98  uint8_t reserved[32];
101 
102 typedef struct SceAppUtilSaveDataSlot {
105  int userParam;
109 
115  char iconPath[64];
116  int userParam;
119  uint8_t reserved[48];
122 
124  const char *dataPath;
125  const void *buf;
126  uint32_t pad;
128  int mode;
129  uint8_t reserved[36];
132 
133 typedef struct SceAppUtilSaveDataFile {
134  const char *filePath;
135  void *buf;
138  unsigned int mode;
139  unsigned int progDelta;
140  uint8_t reserved[32];
143 
145  unsigned int id;
147  uint8_t reserved[32];
150 
152  const char *dataPath;
153  int mode;
154  uint8_t reserved[36];
157 
159  unsigned int type;
160  const char *id;
163 
165  const char *str;
167  unsigned int launchMode;
168  unsigned int reserved;
171 
181 
184 
187 
190 
192 int sceAppUtilSaveDataSlotCreate(unsigned int slotId,
194  SceAppUtilSaveDataMountPoint *mountPoint);
195 
197 int sceAppUtilSaveDataSlotDelete(unsigned int slotId,
198  SceAppUtilSaveDataMountPoint *mountPoint);
199 
201 int sceAppUtilSaveDataSlotSetParam(unsigned int slotId,
203  SceAppUtilSaveDataMountPoint *mountPoint);
204 
206 int sceAppUtilSaveDataSlotGetParam(unsigned int slotId,
208  SceAppUtilSaveDataMountPoint *mountPoint);
209 
212  SceAppUtilSaveDataFile *files, unsigned int fileNum,
213  SceAppUtilSaveDataMountPoint *mountPoint,
214  SceSize *requiredSizeKB);
215 
218  SceAppUtilSaveDataRemoveItem *files, unsigned int fileNum,
219  SceAppUtilSaveDataMountPoint *mountPoint);
220 
223 
226 
229 
232 
235 
238 
240 int sceAppUtilSystemParamGetInt(unsigned int paramId, int *value);
241 
243 int sceAppUtilSystemParamGetString(unsigned int paramId,
244  SceChar8 *buf, SceSize bufSize);
245 
248 
250 int sceAppUtilSaveSafeMemory(void *buf, SceSize bufSize, SceOff offset);
251 
253 int sceAppUtilLoadSafeMemory(void *buf, SceSize bufSize, SceOff offset);
254 
257 
260 
263 
264 #ifdef __cplusplus
265 }
266 #endif
267 
268 #endif /* _PSP2_APPUTIL_H_ */
269 
int sceAppUtilCacheUmount()
Unmount cache data.
uint8_t reserved[32]
Reserved range.
Definition: apputil.h:98
SceWChar16 * title
Title string.
Definition: apputil.h:94
const char * dataPath
Path to savedata data.
Definition: apputil.h:152
SceUInt32 addcontNumReady
Definition: apputil.h:57
SceAppUtilSaveDataSlotStatus status
Status.
Definition: apputil.h:111
unsigned int SceAppUtilBootAttribute
Definition: apputil.h:48
int sceAppUtilLoadSafeMemory(void *buf, SceSize bufSize, SceOff offset)
Load safe memory.
int sceAppUtilAppParamGetInt(SceAppUtilAppParamId paramId, int *value)
Get application parameters for int type.
SceAppUtilBootAttribute attr
Boot attribute.
Definition: apputil.h:71
int8_t data[16]
Mount point.
Definition: apputil.h:89
VITASDK_BUILD_ASSERT_EQ(0x2C, SceAppUtilBgdlStatus)
int sceAppUtilSaveDataSlotGetParam(unsigned int slotId, SceAppUtilSaveDataSlotParam *param, SceAppUtilSaveDataMountPoint *mountPoint)
Get savedata slot param.
uint8_t reserved[32]
Definition: apputil.h:147
SceSize strlen
Length of str.
Definition: apputil.h:166
SceWChar16 title[32]
Title name.
Definition: apputil.h:112
unsigned int launchMode
Browser mode.
Definition: apputil.h:167
int userParam
User param.
Definition: apputil.h:116
int sceAppUtilSaveDataDataSave(SceAppUtilSaveDataFileSlot *slot, SceAppUtilSaveDataFile *files, unsigned int fileNum, SceAppUtilSaveDataMountPoint *mountPoint, SceSize *requiredSizeKB)
Delete savedata files.
SceSize sizeKB
Data size (In KB)
Definition: apputil.h:117
const char * id
Target id.
Definition: apputil.h:160
int sceAppUtilInit(SceAppUtilInitParam *initParam, SceAppUtilBootParam *bootParam)
Initializes the AppUtil library.
int sceAppUtilLaunchWebBrowser(SceAppUtilWebBrowserParam *param)
Launch web browser app.
int sceAppUtilPhotoUmount()
Unmount photo data.
const char * filePath
Definition: apputil.h:134
SceDateTime modifiedTime
Last modified time.
Definition: apputil.h:118
SceWChar16 detail[256]
Detail info.
Definition: apputil.h:114
SceAppUtilBgdlStatusType type
Definition: apputil.h:56
uint8_t reserved[48]
Reserved range.
Definition: apputil.h:119
SceAppUtilSaveDataSlotParam * slotParam
Definition: apputil.h:146
int sceAppUtilReceiveAppEvent(SceAppUtilAppEventParam *eventParam)
Receive app event.
SceSize bufSize
Definition: apputil.h:136
int mode
Savedata save mode (One of ::SceAppUtilSaveDataSaveMode)
Definition: apputil.h:128
uint8_t reserved[36]
Reserved range.
Definition: apputil.h:129
SceChar8 reserved[28]
Definition: apputil.h:60
int sceAppUtilBgdlGetStatus(SceAppUtilBgdlStatus *stat)
Get background download status.
SceAppUtilAppEventType type
Event type.
Definition: apputil.h:83
unsigned int reserved
Reserved area.
Definition: apputil.h:168
int sceAppUtilPhotoMount()
Mount photo data.
SceAppUtilSaveDataSlotEmptyParam * emptyParam
Settings for empty slot.
Definition: apputil.h:106
unsigned int progDelta
Definition: apputil.h:139
int sceAppUtilSaveDataSlotDelete(unsigned int slotId, SceAppUtilSaveDataMountPoint *mountPoint)
Delete savedata slot.
char iconPath[64]
Icon path.
Definition: apputil.h:115
int sceAppUtilShutdown()
Shutdown AppUtil library.
SceSize workBufSize
Buffer size.
Definition: apputil.h:65
int sceAppUtilMusicMount()
Mount music data.
char * iconPath
Path to icon.
Definition: apputil.h:95
uint8_t dat[1024]
Event parameter.
Definition: apputil.h:84
const void * buf
Buffer of savedata file.
Definition: apputil.h:125
int sceAppUtilCacheMount()
Mount cache data.
uint8_t reserved[32]
Reserved range.
Definition: apputil.h:73
uint8_t reserved[60]
Reserved range.
Definition: apputil.h:66
SceUInt32 licenseReady
Definition: apputil.h:59
SceAppUtilSaveDataSlotId id
Slot id.
Definition: apputil.h:103
unsigned int SceAppUtilAppParamId
Definition: apputil.h:52
unsigned int SceAppUtilSaveDataSlotStatus
Definition: apputil.h:51
SceWChar16 subTitle[64]
Subtitle.
Definition: apputil.h:113
int sceAppUtilSaveDataSlotSetParam(unsigned int slotId, SceAppUtilSaveDataSlotParam *param, SceAppUtilSaveDataMountPoint *mountPoint)
Set savedata slot param.
SceOff offset
Definition: apputil.h:137
unsigned int appVersion
App version.
Definition: apputil.h:72
unsigned int SceAppUtilSaveDataSlotId
Definition: apputil.h:50
int sceAppUtilSaveSafeMemory(void *buf, SceSize bufSize, SceOff offset)
Save safe memory.
SceAppUtilErrorCode
Definition: apputil.h:28
SceAppUtilSaveDataSlotStatus status
Slot status.
Definition: apputil.h:104
SceUInt32 addcontNumNotReady
Definition: apputil.h:58
int sceAppUtilSaveDataSlotCreate(unsigned int slotId, SceAppUtilSaveDataSlotParam *param, SceAppUtilSaveDataMountPoint *mountPoint)
Create savedata slot.
int sceAppUtilStoreBrowse(SceAppUtilStoreBrowseParam *param)
Launch PSN Store.
unsigned int SceAppUtilAppEventType
Definition: apputil.h:49
uint8_t reserved[36]
Reserved range.
Definition: apputil.h:154
const char * str
String that's passed to command specified by launchMode.
Definition: apputil.h:165
SceAppUtilSaveDataDataRemoveMode
Definition: apputil.h:18
uint8_t data[16]
Definition: apputil.h:78
const char * dataPath
Path to savedata.
Definition: apputil.h:124
uint8_t reserved[32]
Definition: apputil.h:140
SceSize iconBufSize
Icon buffer size.
Definition: apputil.h:97
unsigned int mode
Definition: apputil.h:138
int mode
Savedata remove mode (One of ::SceAppUtilSaveDataRemoveMode)
Definition: apputil.h:153
unsigned int id
Definition: apputil.h:145
int sceAppUtilSystemParamGetInt(unsigned int paramId, int *value)
Get system parameters for int type.
void * iconBuf
Icon buffer.
Definition: apputil.h:96
int sceAppUtilSaveDataDataRemove(SceAppUtilSaveDataFileSlot *slot, SceAppUtilSaveDataRemoveItem *files, unsigned int fileNum, SceAppUtilSaveDataMountPoint *mountPoint)
uint32_t pad
Padding.
Definition: apputil.h:126
int userParam
Param for free usage.
Definition: apputil.h:105
int sceAppUtilMusicUmount()
Unmount music data.
int sceAppUtilSystemParamGetString(unsigned int paramId, SceChar8 *buf, SceSize bufSize)
Get application parameters for string type.
void * buf
Definition: apputil.h:135
SceAppUtilSaveDataDataSaveMode
Definition: apputil.h:23
unsigned int type
Store browse type.
Definition: apputil.h:159
int sceAppUtilAppEventParseLiveArea(const SceAppUtilAppEventParam *eventParam, char *buffer)
Parse received app event from LiveArea.
unsigned int SceAppUtilBgdlStatusType
Definition: apputil.h:53
SceOff offset
Offset of savedata file.
Definition: apputil.h:127
@ SCE_APPUTIL_ERROR_NO_PERMISSION
Definition: apputil.h:34
@ SCE_APPUTIL_ERROR_SAVEDATA_NO_SPACE_FS
Definition: apputil.h:40
@ SCE_APPUTIL_ERROR_APPEVENT_PARSE_INVALID_DATA
Definition: apputil.h:36
@ SCE_APPUTIL_ERROR_PARAMETER
Definition: apputil.h:29
@ SCE_APPUTIL_ERROR_BUSY
Definition: apputil.h:32
@ SCE_APPUTIL_ERROR_MOUNT_LIMIT_OVER
Definition: apputil.h:44
@ SCE_APPUTIL_ERROR_SAVEDATA_NO_SPACE_QUOTA
Definition: apputil.h:39
@ SCE_APPUTIL_ERROR_NOT_MOUNTED
Definition: apputil.h:33
@ SCE_APPUTIL_ERROR_SAVEDATA_SLOT_NOT_FOUND
Definition: apputil.h:38
@ SCE_APPUTIL_ERROR_PHOTO_DEVICE_NOT_FOUND
Definition: apputil.h:42
@ SCE_APPUTIL_ERROR_NO_MEMORY
Definition: apputil.h:31
@ SCE_APPUTIL_ERROR_NOT_INITIALIZED
Definition: apputil.h:30
@ SCE_APPUTIL_ERROR_DRM_NO_ENTITLEMENT
Definition: apputil.h:41
@ SCE_APPUTIL_ERROR_STACKSIZE_TOO_SHORT
Definition: apputil.h:45
@ SCE_APPUTIL_ERROR_SAVEDATA_SLOT_EXISTS
Definition: apputil.h:37
@ SCE_APPUTIL_ERROR_MUSIC_DEVICE_NOT_FOUND
Definition: apputil.h:43
@ SCE_APPUTIL_ERROR_PASSCODE_MISMATCH
Definition: apputil.h:35
@ SCE_APPUTIL_SAVEDATA_DATA_REMOVE_MODE_DEFAULT
Definition: apputil.h:19
@ SCE_APPUTIL_SAVEDATA_DATA_REMOVE_MODE_NO_SLOT
Definition: apputil.h:20
@ SCE_APPUTIL_SAVEDATA_DATA_SAVE_MODE_FILE
Definition: apputil.h:24
@ SCE_APPUTIL_SAVEDATA_DATA_SAVE_MODE_DIRECTORY
Definition: apputil.h:25
Definition: apputil.h:82
Definition: apputil.h:55
Definition: apputil.h:70
Definition: apputil.h:64
Definition: apputil.h:88
Definition: apputil.h:133
Definition: apputil.h:144
Definition: apputil.h:77
Definition: apputil.h:151
Definition: apputil.h:123
Definition: apputil.h:102
Definition: apputil.h:93
Definition: apputil.h:110
Definition: apputil.h:158
Definition: apputil.h:164
void * buffer
Definition: bt.h:6
int8_t SceChar8
Definition: types.h:32
unsigned int SceSize
Definition: types.h:56
uint32_t SceUInt32
Definition: types.h:45
SceInt64 SceOff
Offset type.
Definition: types.h:88
uint16_t SceWChar16
Definition: types.h:77
Definition: types.h:213