|
Jo Engine
2024.04.28
Jo Sega Saturn Engine
|
Go to the documentation of this file.
36 #ifndef __JO_BACKUP_H__
37 # define __JO_BACKUP_H__
39 # ifdef JO_COMPILE_WITH_BACKUP_SUPPORT
42 # define JO_BACKUP_MAX_FILENAME_LENGTH (12)
45 # define JO_BACKUP_MAX_FILE (255)
48 # define JO_BACKUP_MAX_COMMENT_LENGTH (10)
146 void *contents,
unsigned int content_size)
193 bool jo_backup_get_file_info(
const jo_backup_device backup_device,
const char *
const fname,
char*
const comment,
unsigned char*
const language_num,
unsigned int*
const date,
unsigned int*
const num_bytes,
unsigned int*
const num_blocks);
jo_datetime save_datetime
Definition: backup.h:91
bool jo_backup_get_file_last_modified_date(const jo_backup_device backup_device, const char *const fname, jo_datetime *datetime)
Get file last modified date on the backup device.
bool jo_backup_format_device(const jo_backup_device backup_device)
Format the device (all data is lost)
@ JoCartridgeMemoryBackup
Definition: backup.h:56
bool jo_backup_get_file_info(const jo_backup_device backup_device, const char *const fname, char *const comment, unsigned char *const language_num, unsigned int *const date, unsigned int *const num_bytes, unsigned int *const num_blocks)
Get file comment, language, date, and size in bytes and blocks.
@ JoExternalDeviceBackup
Definition: backup.h:57
void * contents
Definition: backup.h:78
unsigned short jo_backup_get_file_partition(const jo_backup_device backup_device, const char *const fname)
Get the partition number where the file is located.
jo_backup_status jo_backup_get_last_status(const jo_backup_device backup_device)
Get last backup status (error details)
void * jo_backup_load_file_contents(const jo_backup_device backup_device, const char *const fname, unsigned int *length)
Load file contents from the backup device.
bool jo_backup_save(jo_backup *file)
Save file contents to the backup device (if the file exists it will be overwritten)
unsigned char * jo_backup_load_file_comment(const jo_backup_device backup_device, const char *const fname)
Load file comment from the backup device.
@ JoBackupStatusUnknown
Definition: backup.h:69
@ JoBackupStatusWriteProtect
Definition: backup.h:64
Backup File struct.
Definition: backup.h:74
bool jo_backup_delete_file(const jo_backup_device backup_device, const char *const fname)
Delete file on the backup device.
@ JoBackupStatusOutOfMemory
Definition: backup.h:65
jo_backup_device backup_device
Definition: backup.h:75
char * fname
Definition: backup.h:76
int jo_backup_get_free_block_count(const jo_backup_device backup_device)
Get free block count on the backup device.
#define __jo_force_inline
force inline attribute (and prevent Doxygen prototype parsing bug)
Definition: types.h:39
@ JoBackupStatusNotFound
Definition: backup.h:66
unsigned char language_num
Definition: backup.h:87
char * comment
Definition: backup.h:77
bool jo_backup_get_file_size(const jo_backup_device backup_device, const char *const fname, unsigned int *const num_bytes, unsigned int *const num_blocks)
Get file size in bytes and blocks.
bool jo_backup_mount(const jo_backup_device backup_device)
Mount the backup device (must be the first call)
List struct.
Definition: list.h:74
@ JoBackupStatusOk
Definition: backup.h:63
unsigned short partition_number
Definition: backup.h:83
bool jo_backup_unmount(const jo_backup_device backup_device)
Unmount the backup device (optional)
@ JoBackupStatusNoMatch
Definition: backup.h:67
jo_backup_status
Backup status.
Definition: backup.h:62
unsigned int save_timestamp
Definition: backup.h:89
void jo_backup_init_file(jo_backup *file)
Initialize a backup file in order to save it.
unsigned int content_size
Definition: backup.h:79
bool jo_backup_file_exists(const jo_backup_device backup_device, const char *const fname)
Check if file exists.
static __jo_force_inline bool jo_backup_save_file_contents(const jo_backup_device backup_device, char *const fname, char *const comment, void *contents, unsigned int content_size)
Save file contents to the backup device (if the file exists it will be overwritten)
Definition: backup.h:145
@ JoInternalMemoryBackup
Definition: backup.h:55
jo_language language
Definition: backup.h:85
jo_backup_device
Backup device type.
Definition: backup.h:54
@ JoBackupStatusBroken
Definition: backup.h:68
bool jo_backup_read_device(const jo_backup_device backup_device, jo_list *const filenames)
Read backup device.
int jo_backup_get_total_block_count(const jo_backup_device backup_device)
Get total block count on the backup device.