RetroArch
Classes | Macros | Typedefs | Functions
task_database.c File Reference
#include <compat/strcasestr.h>
#include <compat/strl.h>
#include <retro_miscellaneous.h>
#include <retro_endianness.h>
#include <string/stdstring.h>
#include <lists/dir_list.h>
#include <file/file_path.h>
#include <encodings/crc32.h>
#include <streams/file_stream.h>
#include <streams/chd_stream.h>
#include <streams/interface_stream.h>
#include "tasks_internal.h"
#include "../core_info.h"
#include "../database_info.h"
#include "../file_path_special.h"
#include "../msg_hash.h"
#include "../playlist.h"
#include "../verbosity.h"
#include "../ui/ui_companion_driver.h"
Include dependency graph for task_database.c:

Classes

struct  database_state_handle
 
struct  db_handle
 

Macros

#define COLLECTION_SIZE   99999
 

Typedefs

typedef struct database_state_handle database_state_handle_t
 
typedef struct db_handle db_handle_t
 

Functions

int cue_find_track (const char *cue_path, bool first, uint64_t *offset, uint64_t *size, char *track_path, uint64_t max_len)
 
bool cue_next_file (intfstream_t *fd, const char *cue_path, char *path, uint64_t max_len)
 
int gdi_find_track (const char *gdi_path, bool first, char *track_path, uint64_t max_len)
 
bool gdi_next_file (intfstream_t *fd, const char *gdi_path, char *path, uint64_t max_len)
 
int detect_system (intfstream_t *fd, const char **system_name)
 
int detect_ps1_game (intfstream_t *fd, char *game_id)
 
int detect_psp_game (intfstream_t *fd, char *game_id)
 
int detect_gc_game (intfstream_t *fd, char *game_id)
 
int detect_serial_ascii_game (intfstream_t *fd, char *game_id)
 
static void database_info_set_type (database_info_handle_t *handle, enum database_type type)
 
static enum database_type database_info_get_type (database_info_handle_t *handle)
 
static const char * database_info_get_current_name (database_state_handle_t *handle)
 
static const char * database_info_get_current_element_name (database_info_handle_t *handle)
 
static int task_database_iterate_start (database_info_handle_t *db, const char *name)
 
static int intfstream_get_serial (intfstream_t *fd, char *serial)
 
static bool intfstream_file_get_serial (const char *name, uint64_t offset, uint64_t size, char *serial)
 
static int task_database_cue_get_serial (const char *name, char *serial)
 
static int task_database_gdi_get_serial (const char *name, char *serial)
 
static int task_database_chd_get_serial (const char *name, char *serial)
 
static int intfstream_get_crc (intfstream_t *fd, uint32_t *crc)
 
static bool intfstream_file_get_crc (const char *name, uint64_t offset, size_t size, uint32_t *crc)
 
static int task_database_cue_get_crc (const char *name, uint32_t *crc)
 
static int task_database_gdi_get_crc (const char *name, uint32_t *crc)
 
static bool task_database_chd_get_crc (const char *name, uint32_t *crc)
 
static void task_database_cue_prune (database_info_handle_t *db, const char *name)
 
static void gdi_prune (database_info_handle_t *db, const char *name)
 
static enum msg_file_type extension_to_file_type (const char *ext)
 
static int task_database_iterate_playlist (database_state_handle_t *db_state, database_info_handle_t *db, const char *name)
 
static int database_info_list_iterate_end_no_match (database_info_handle_t *db, database_state_handle_t *db_state, const char *path)
 
static int task_database_iterate_next (database_info_handle_t *db)
 
static int database_info_list_iterate_new (database_state_handle_t *db_state, const char *query)
 
static int database_info_list_iterate_found_match (db_handle_t *_db, database_state_handle_t *db_state, database_info_handle_t *db, const char *archive_name)
 
static int database_info_list_iterate_next (database_state_handle_t *db_state)
 
static int task_database_iterate_crc_lookup (db_handle_t *_db, database_state_handle_t *db_state, database_info_handle_t *db, const char *name, const char *archive_entry)
 
static int task_database_iterate_playlist_archive (db_handle_t *_db, database_state_handle_t *db_state, database_info_handle_t *db, const char *name)
 
static int task_database_iterate_playlist_lutro (db_handle_t *_db, database_state_handle_t *db_state, database_info_handle_t *db, const char *path)
 
static int task_database_iterate_serial_lookup (db_handle_t *_db, database_state_handle_t *db_state, database_info_handle_t *db, const char *name)
 
static int task_database_iterate (db_handle_t *_db, database_state_handle_t *db_state, database_info_handle_t *db)
 
static void task_database_cleanup_state (database_state_handle_t *db_state)
 
static void task_database_handler (retro_task_t *task)
 
bool task_push_dbscan (const char *playlist_directory, const char *content_database, const char *fullpath, bool directory, bool show_hidden_files, retro_task_callback_t cb)
 

Macro Definition Documentation

◆ COLLECTION_SIZE

#define COLLECTION_SIZE   99999

Typedef Documentation

◆ database_state_handle_t

◆ db_handle_t

typedef struct db_handle db_handle_t

Function Documentation

◆ cue_find_track()

int cue_find_track ( const char *  cue_path,
bool  first,
uint64_t offset,
uint64_t size,
char *  track_path,
uint64_t  max_len 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cue_next_file()

bool cue_next_file ( intfstream_t fd,
const char *  cue_path,
char *  path,
uint64_t  max_len 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ database_info_get_current_element_name()

static const char* database_info_get_current_element_name ( database_info_handle_t handle)
static
Here is the caller graph for this function:

◆ database_info_get_current_name()

static const char* database_info_get_current_name ( database_state_handle_t handle)
static
Here is the caller graph for this function:

◆ database_info_get_type()

static enum database_type database_info_get_type ( database_info_handle_t handle)
static
Here is the caller graph for this function:

◆ database_info_list_iterate_end_no_match()

static int database_info_list_iterate_end_no_match ( database_info_handle_t db,
database_state_handle_t db_state,
const char *  path 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ database_info_list_iterate_found_match()

static int database_info_list_iterate_found_match ( db_handle_t _db,
database_state_handle_t db_state,
database_info_handle_t db,
const char *  archive_name 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ database_info_list_iterate_new()

static int database_info_list_iterate_new ( database_state_handle_t db_state,
const char *  query 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ database_info_list_iterate_next()

static int database_info_list_iterate_next ( database_state_handle_t db_state)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ database_info_set_type()

static void database_info_set_type ( database_info_handle_t handle,
enum database_type  type 
)
static
Here is the caller graph for this function:

◆ detect_gc_game()

int detect_gc_game ( intfstream_t fd,
char *  game_id 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ detect_ps1_game()

int detect_ps1_game ( intfstream_t fd,
char *  game_id 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ detect_psp_game()

int detect_psp_game ( intfstream_t fd,
char *  game_id 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ detect_serial_ascii_game()

int detect_serial_ascii_game ( intfstream_t fd,
char *  game_id 
)

Check for an ASCII serial in the first few bits of the ISO (Wii).

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

◆ detect_system()

int detect_system ( intfstream_t fd,
const char **  system_name 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ extension_to_file_type()

static enum msg_file_type extension_to_file_type ( const char *  ext)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ gdi_find_track()

int gdi_find_track ( const char *  gdi_path,
bool  first,
char *  track_path,
uint64_t  max_len 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ gdi_next_file()

bool gdi_next_file ( intfstream_t fd,
const char *  gdi_path,
char *  path,
uint64_t  max_len 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ gdi_prune()

static void gdi_prune ( database_info_handle_t db,
const char *  name 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ intfstream_file_get_crc()

static bool intfstream_file_get_crc ( const char *  name,
uint64_t  offset,
size_t  size,
uint32_t crc 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ intfstream_file_get_serial()

static bool intfstream_file_get_serial ( const char *  name,
uint64_t  offset,
uint64_t  size,
char *  serial 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ intfstream_get_crc()

static int intfstream_get_crc ( intfstream_t fd,
uint32_t crc 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ intfstream_get_serial()

static int intfstream_get_serial ( intfstream_t fd,
char *  serial 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ task_database_chd_get_crc()

static bool task_database_chd_get_crc ( const char *  name,
uint32_t crc 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ task_database_chd_get_serial()

static int task_database_chd_get_serial ( const char *  name,
char *  serial 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ task_database_cleanup_state()

static void task_database_cleanup_state ( database_state_handle_t db_state)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ task_database_cue_get_crc()

static int task_database_cue_get_crc ( const char *  name,
uint32_t crc 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ task_database_cue_get_serial()

static int task_database_cue_get_serial ( const char *  name,
char *  serial 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ task_database_cue_prune()

static void task_database_cue_prune ( database_info_handle_t db,
const char *  name 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ task_database_gdi_get_crc()

static int task_database_gdi_get_crc ( const char *  name,
uint32_t crc 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ task_database_gdi_get_serial()

static int task_database_gdi_get_serial ( const char *  name,
char *  serial 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ task_database_handler()

static void task_database_handler ( retro_task_t task)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ task_database_iterate()

static int task_database_iterate ( db_handle_t _db,
database_state_handle_t db_state,
database_info_handle_t db 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ task_database_iterate_crc_lookup()

static int task_database_iterate_crc_lookup ( db_handle_t _db,
database_state_handle_t db_state,
database_info_handle_t db,
const char *  name,
const char *  archive_entry 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ task_database_iterate_next()

static int task_database_iterate_next ( database_info_handle_t db)
static
Here is the caller graph for this function:

◆ task_database_iterate_playlist()

static int task_database_iterate_playlist ( database_state_handle_t db_state,
database_info_handle_t db,
const char *  name 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ task_database_iterate_playlist_archive()

static int task_database_iterate_playlist_archive ( db_handle_t _db,
database_state_handle_t db_state,
database_info_handle_t db,
const char *  name 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ task_database_iterate_playlist_lutro()

static int task_database_iterate_playlist_lutro ( db_handle_t _db,
database_state_handle_t db_state,
database_info_handle_t db,
const char *  path 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ task_database_iterate_serial_lookup()

static int task_database_iterate_serial_lookup ( db_handle_t _db,
database_state_handle_t db_state,
database_info_handle_t db,
const char *  name 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ task_database_iterate_start()

static int task_database_iterate_start ( database_info_handle_t db,
const char *  name 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ task_push_dbscan()

bool task_push_dbscan ( const char *  playlist_directory,
const char *  content_database,
const char *  fullpath,
bool  directory,
bool  show_hidden_files,
retro_task_callback_t  cb 
)
Here is the call graph for this function:
Here is the caller graph for this function: