RetroArch
Classes | Typedefs | Enumerations | Functions | Variables
archive_file.h File Reference
#include <stdint.h>
#include <stddef.h>
#include <boolean.h>
#include <unistd.h>
#include <retro_miscellaneous.h>
#include <retro_common_api.h>
Include dependency graph for archive_file.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  file_archive_handle
 
struct  file_archive_transfer
 
struct  decomp_state_t
 
struct  decompress_state_t
 
struct  archive_extract_userdata
 
struct  file_archive_file_backend
 

Typedefs

typedef struct file_archive_handle file_archive_file_handle_t
 
typedef struct file_archive_file_data file_archive_file_data_t
 
typedef struct file_archive_transfer file_archive_transfer_t
 
typedef int(* file_archive_file_cb) (const char *name, const char *valid_exts, const uint8_t *cdata, unsigned cmode, uint32_t csize, uint32_t size, uint32_t crc32, struct archive_extract_userdata *userdata)
 

Enumerations

enum  file_archive_transfer_type {
  ARCHIVE_TRANSFER_NONE = 0, ARCHIVE_TRANSFER_INIT, ARCHIVE_TRANSFER_ITERATE, ARCHIVE_TRANSFER_DEINIT,
  ARCHIVE_TRANSFER_DEINIT_ERROR
}
 
enum  file_archive_compression_mode { ARCHIVE_MODE_UNCOMPRESSED = 0, ARCHIVE_MODE_COMPRESSED = 8 }
 

Functions

int file_archive_parse_file_iterate (file_archive_transfer_t *state, bool *returnerr, const char *file, const char *valid_exts, file_archive_file_cb file_cb, struct archive_extract_userdata *userdata)
 
void file_archive_parse_file_iterate_stop (file_archive_transfer_t *state)
 
int file_archive_parse_file_progress (file_archive_transfer_t *state)
 
bool file_archive_extract_file (char *archive_path, size_t archive_path_size, const char *valid_exts, const char *extraction_dir, char *out_path, size_t len)
 
struct string_listfile_archive_get_file_list (const char *path, const char *valid_exts)
 
bool file_archive_perform_mode (const char *name, const char *valid_exts, const uint8_t *cdata, unsigned cmode, uint32_t csize, uint32_t size, uint32_t crc32, struct archive_extract_userdata *userdata)
 
int file_archive_compressed_read (const char *path, void **buf, const char *optional_filename, int64_t *length)
 
const struct file_archive_file_backendfile_archive_get_zlib_file_backend (void)
 
const struct file_archive_file_backendfile_archive_get_7z_file_backend (void)
 
const struct file_archive_file_backendfile_archive_get_file_backend (const char *path)
 
uint32_t file_archive_get_file_crc32 (const char *path)
 

Variables

const struct file_archive_file_backend zlib_backend
 
const struct file_archive_file_backend sevenzip_backend
 

Typedef Documentation

◆ file_archive_file_cb

typedef int(* file_archive_file_cb) (const char *name, const char *valid_exts, const uint8_t *cdata, unsigned cmode, uint32_t csize, uint32_t size, uint32_t crc32, struct archive_extract_userdata *userdata)

◆ file_archive_file_data_t

◆ file_archive_file_handle_t

◆ file_archive_transfer_t

Enumeration Type Documentation

◆ file_archive_compression_mode

Enumerator
ARCHIVE_MODE_UNCOMPRESSED 
ARCHIVE_MODE_COMPRESSED 

◆ file_archive_transfer_type

Enumerator
ARCHIVE_TRANSFER_NONE 
ARCHIVE_TRANSFER_INIT 
ARCHIVE_TRANSFER_ITERATE 
ARCHIVE_TRANSFER_DEINIT 
ARCHIVE_TRANSFER_DEINIT_ERROR 

Function Documentation

◆ file_archive_compressed_read()

int file_archive_compressed_read ( const char *  path,
void **  buf,
const char *  optional_filename,
int64_t length 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_archive_extract_file()

bool file_archive_extract_file ( char *  archive_path,
size_t  archive_path_size,
const char *  valid_exts,
const char *  extraction_directory,
char *  out_path,
size_t  len 
)

file_archive_extract_file: : filename path to ZIP archive. : size of ZIP archive. : valid extensions for a file. : the directory to extract the temporary file to.

Extract file from archive. If no file inside the archive is specified, the first file found will be used.

Returns : true (1) on success, otherwise false (0).

file_archive_extract_file: : filename path to archive. : size of archive. : valid extensions for the file. : the directory to extract temporary file to.

Extract file from archive. If no file inside the archive is specified, the first file found will be used.

Returns : true (1) on success, otherwise false (0).

Here is the call graph for this function:

◆ file_archive_get_7z_file_backend()

const struct file_archive_file_backend* file_archive_get_7z_file_backend ( void  )

◆ file_archive_get_file_backend()

const struct file_archive_file_backend* file_archive_get_file_backend ( const char *  path)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_archive_get_file_crc32()

uint32_t file_archive_get_file_crc32 ( const char *  path)

file_archive_get_file_crc32: : filename path of archive

Returns: CRC32 of the specified file in the archive, otherwise 0. If no path within the archive is specified, the first file found inside is used.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_archive_get_file_list()

struct string_list* file_archive_get_file_list ( const char *  path,
const char *  valid_exts 
)

file_archive_get_file_list: : filename path of archive : Valid extensions of archive to be parsed. If NULL, allow all.

Returns: string listing of files from archive on success, otherwise NULL.

file_archive_get_file_list: : filename path of archive

Returns: string listing of files from archive on success, otherwise NULL.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_archive_get_zlib_file_backend()

const struct file_archive_file_backend* file_archive_get_zlib_file_backend ( void  )

◆ file_archive_parse_file_iterate()

int file_archive_parse_file_iterate ( file_archive_transfer_t state,
bool returnerr,
const char *  file,
const char *  valid_exts,
file_archive_file_cb  file_cb,
struct archive_extract_userdata userdata 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_archive_parse_file_iterate_stop()

void file_archive_parse_file_iterate_stop ( file_archive_transfer_t state)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ file_archive_parse_file_progress()

int file_archive_parse_file_progress ( file_archive_transfer_t state)
Here is the caller graph for this function:

◆ file_archive_perform_mode()

bool file_archive_perform_mode ( const char *  name,
const char *  valid_exts,
const uint8_t cdata,
unsigned  cmode,
uint32_t  csize,
uint32_t  size,
uint32_t  crc32,
struct archive_extract_userdata userdata 
)
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ sevenzip_backend

const struct file_archive_file_backend sevenzip_backend

◆ zlib_backend

const struct file_archive_file_backend zlib_backend