1 #ifndef __LV2_SYSUTIL_SAVE_H__ 2 #define __LV2_SYSUTIL_SAVE_H__ 8 #define SYS_SAVE_MAX_DIRECTORY_NAME 32 9 #define SYS_SAVE_MAX_FILE_NAME 13 10 #define SYS_SAVE_DIRECTORY_LIST_MAX 2048 11 #define SYS_SAVE_CUSTOM_ERROR_MESSAGE_MAX 256 12 #define SYS_SAVE_MAX_LIST_PARAMETER 8 13 #define SYS_SAVE_MAX_TITLE 128 14 #define SYS_SAVE_MAX_SUBTITLE 128 15 #define SYS_SAVE_MAX_DETAIL 1024 16 #define SYS_SAVE_MAX_PROTECTED_FILE_ID 16 19 #define SYS_SAVE_CURRENT_VERSION 0 22 #define SYS_SAVE_CALLBACK_RESULT_DONE 1 23 #define SYS_SAVE_CALLBACK_RESULT_CONTINUE 0 24 #define SYS_SAVE_CALLBACK_RESULT_NO_SPACE_LEFT -1 25 #define SYS_SAVE_CALLBACK_RESULT_ERROR -2 26 #define SYS_SAVE_CALLBACK_RESULT_CORRUPTED -3 27 #define SYS_SAVE_CALLBACK_RESULT_NOT_FOUND -4 28 #define SYS_SAVE_CALLBACK_RESULT_ERROR_CUSTOM -5 31 #define SYS_SAVE_BIND_NO_ERROR 0x00 32 #define SYS_SAVE_BIND_ANOTHER_CONSOLE 0x01 33 #define SYS_SAVE_BIND_ANOTHER_DISC 0x02 34 #define SYS_SAVE_BIND_ANOTHER_APP 0x04 35 #define SYS_SAVE_BIND_NO_USER_INFO 0x08 36 #define SYS_SAVE_BIND_OTHER_USER 0x10 39 #define SYS_SAVE_RETURN_DONE 0 40 #define SYS_SAVE_RETURN_CANCELED 1 41 #define SYS_SAVE_RETURN_ERROR 0x8002b400 43 #define SYS_SAVE_RETURN_ERROR_CALLBACK (SYS_SAVE_RETURN_ERROR | 1) 44 #define SYS_SAVE_RETURN_ERROR_HDD_ERROR (SYS_SAVE_RETURN_ERROR | 2) 45 #define SYS_SAVE_RETURN_ERROR_INTERNAL (SYS_SAVE_RETURN_ERROR | 3) 46 #define SYS_SAVE_RETURN_ERROR_INVALID_ARG (SYS_SAVE_RETURN_ERROR | 4) 47 #define SYS_SAVE_RETURN_ERROR_NO_SPACE_LEFT (SYS_SAVE_RETURN_ERROR | 5) 48 #define SYS_SAVE_RETURN_ERROR_CORRUPTED (SYS_SAVE_RETURN_ERROR | 6) 49 #define SYS_SAVE_RETURN_ERROR_FAILED (SYS_SAVE_RETURN_ERROR | 7) 50 #define SYS_SAVE_RETURN_ERROR_ALREADY_IN_USE (SYS_SAVE_RETURN_ERROR | 8) 57 SYS_SAVE_SORT_TYPE_TIMESTAMP = 0,
58 SYS_SAVE_SORT_TYPE_TITLE,
62 SYS_SAVE_SORT_ORDER_DESCENDING = 0,
63 SYS_SAVE_SORT_ORDER_ASCENDING,
67 SYS_SAVE_FOCUS_POSITION_DIRECTORY_NAME = 0,
68 SYS_SAVE_FOCUS_POSITION_LIST_HEAD,
69 SYS_SAVE_FOCUS_POSITION_LIST_TAIL,
70 SYS_SAVE_FOCUS_POSITION_LATEST,
71 SYS_SAVE_FOCUS_POSITION_OLDEST,
72 SYS_SAVE_FOCUS_POSITION_NEW_SAVE,
73 } sysSaveFocusPosition;
76 SYS_SAVE_NEW_SAVE_POSITION_TOP = 0,
77 SYS_SAVE_NEW_SAVE_POSITION_BOTTOM,
78 } sysSaveNewSavePosition;
82 SYS_SAVE_FILETYPE_PROTECTED_FILE = 0,
83 SYS_SAVE_FILETYPE_STANDARD_FILE,
84 SYS_SAVE_FILETYPE_CONTENT_ICON0,
85 SYS_SAVE_FILETYPE_CONTENT_ICON1,
86 SYS_SAVE_FILETYPE_CONTENT_PIC1,
87 SYS_SAVE_FILETYPE_CONTENT_SND0,
91 SYS_SAVE_RECREATE_MODE_OVERWRITE_CORRUPTED = 0,
92 SYS_SAVE_RECREATE_MODE_OVERWRITE_NOT_CORRUPTED,
93 SYS_SAVE_RECREATE_MODE_DELETE
94 } sysSaveRecreateMode;
97 SYS_SAVE_FILE_OPERATION_READ = 0,
98 SYS_SAVE_FILE_OPERATION_WRITE,
99 SYS_SAVE_FILE_OPERATION_DELETE,
100 } sysSaveFileOperation;
103 SYS_SAVE_ERROR_DIALOG_NONE = 0,
104 SYS_SAVE_ERROR_DIALOG_SHOW,
105 SYS_SAVE_ERROR_DIALOG_SHOW_ONCE,
106 } sysSaveErrorDialogMode;
109 sysSaveSortType sortType;
110 sysSaveSortOrder sortOrder;
111 char *pathPrefix ATTRIBUTE_PRXPTR;
112 void *reserved ATTRIBUTE_PRXPTR;
120 void *buffer ATTRIBUTE_PRXPTR;
126 u32 incrementProgress;
128 char *customErrorMessage ATTRIBUTE_PRXPTR;
129 void *user_data ATTRIBUTE_PRXPTR;
133 char directoryName[SYS_SAVE_MAX_DIRECTORY_NAME];
134 char listParameter[SYS_SAVE_MAX_LIST_PARAMETER];
139 char *title ATTRIBUTE_PRXPTR;
141 void *iconBuffer ATTRIBUTE_PRXPTR;
142 void *reserved ATTRIBUTE_PRXPTR;
146 sysSaveNewSavePosition position;
147 char *directoryName ATTRIBUTE_PRXPTR;
149 void *reserved ATTRIBUTE_PRXPTR;
164 sysSaveFocusPosition focus;
166 char *focusDirectoryName ATTRIBUTE_PRXPTR;
170 void *reserved ATTRIBUTE_PRXPTR;
177 char directoryName[SYS_SAVE_MAX_DIRECTORY_NAME];
181 char title[SYS_SAVE_MAX_TITLE];
182 char subtitle[SYS_SAVE_MAX_SUBTITLE];
183 char detail[SYS_SAVE_MAX_DETAIL];
186 char listParameter[SYS_SAVE_MAX_LIST_PARAMETER];
191 sysSaveFileType fileType;
197 char filename[SYS_SAVE_MAX_FILE_NAME];
206 u32 bindingInformation;
221 sysSaveRecreateMode recreateMode;
222 void *reserved ATTRIBUTE_PRXPTR;
226 u32 previousOperationResultSize;
231 sysSaveFileOperation fileOperation;
232 void *reserved ATTRIBUTE_PRXPTR;
233 sysSaveFileType fileType;
234 u8 protectedFileID[SYS_SAVE_MAX_PROTECTED_FILE_ID];
235 char *filename ATTRIBUTE_PRXPTR;
239 void *buffer ATTRIBUTE_PRXPTR;
243 char *directoryName ATTRIBUTE_PRXPTR;
245 void *reserved ATTRIBUTE_PRXPTR;
261 s32 sysSaveListLoad2 (u32 version,
264 sysSaveListCallback listCb,
265 sysSaveStatusCallback statusCb,
266 sysSaveFileCallback fileCb,
267 sys_mem_container_t container,
270 s32 sysSaveListSave2 (u32 version,
273 sysSaveListCallback listCb,
274 sysSaveStatusCallback statusCb,
275 sysSaveFileCallback fileCb,
276 sys_mem_container_t container,
279 s32 sysSaveListAutoLoad (u32 version,
280 sysSaveErrorDialogMode errorDialogMode,
283 sysSaveFixedCallback fixedCb,
284 sysSaveStatusCallback statusCb,
285 sysSaveFileCallback fileCb,
286 sys_mem_container_t container,
289 s32 sysSaveListAutoSave (u32 version,
290 sysSaveErrorDialogMode errorDialogMode,
293 sysSaveFixedCallback fixedCb,
294 sysSaveStatusCallback statusCb,
295 sysSaveFileCallback fileCb,
296 sys_mem_container_t container,
299 s32 sysSaveFixedLoad2 (u32 version,
302 sysSaveFixedCallback fixedCb,
303 sysSaveStatusCallback statusCb,
304 sysSaveFileCallback fileCb,
305 sys_mem_container_t container,
308 s32 sysSaveFixedSave2 (u32 version,
311 sysSaveFixedCallback fixedCb,
312 sysSaveStatusCallback statusCb,
313 sysSaveFileCallback fileCb,
314 sys_mem_container_t container,
317 s32 sysSaveAutoLoad2 (s32 version,
318 const char *directoryName,
319 sysSaveErrorDialogMode errorDialogMode,
321 sysSaveStatusCallback statusCb,
322 sysSaveFileCallback fileCb,
323 sys_mem_container_t container,
326 s32 sysSaveAutoSave2 (s32 version,
327 const char *directoryName,
328 sysSaveErrorDialogMode errorDialogMode,
330 sysSaveStatusCallback statusCb,
331 sysSaveFileCallback fileCb,
332 sys_mem_container_t container,
335 s32 sysSaveDelete2(sys_mem_container_t container);