RetroArch
Classes | Macros | Typedefs | Functions | Variables
playlist.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <libretro.h>
#include <boolean.h>
#include <compat/posix_string.h>
#include <string/stdstring.h>
#include <streams/interface_stream.h>
#include <streams/file_stream.h>
#include <file/file_path.h>
#include "playlist.h"
#include "verbosity.h"
Include dependency graph for playlist.c:

Classes

struct  playlist_entry
 
struct  content_playlist
 

Macros

#define PLAYLIST_ENTRIES   6
 

Typedefs

typedef int() playlist_sort_fun_t(const struct playlist_entry *a, const struct playlist_entry *b)
 

Functions

uint32_t playlist_get_size (playlist_t *playlist)
 
char * playlist_get_conf_path (playlist_t *playlist)
 
void playlist_get_index (playlist_t *playlist, size_t idx, const char **path, const char **label, const char **core_path, const char **core_name, const char **crc32, const char **db_name)
 
void playlist_delete_index (playlist_t *playlist, size_t idx)
 
void playlist_get_index_by_path (playlist_t *playlist, const char *search_path, char **path, char **label, char **core_path, char **core_name, char **crc32, char **db_name)
 
bool playlist_entry_exists (playlist_t *playlist, const char *path, const char *crc32)
 
static void playlist_free_entry (struct playlist_entry *entry)
 
void playlist_update (playlist_t *playlist, size_t idx, const char *path, const char *label, const char *core_path, const char *core_name, const char *crc32, const char *db_name)
 
bool playlist_push (playlist_t *playlist, const char *path, const char *label, const char *core_path, const char *core_name, const char *crc32, const char *db_name)
 
void playlist_write_file (playlist_t *playlist)
 
void playlist_free (playlist_t *playlist)
 
void playlist_clear (playlist_t *playlist)
 
size_t playlist_size (playlist_t *playlist)
 
static bool playlist_read_file (playlist_t *playlist, const char *path)
 
void playlist_free_cached (void)
 
playlist_tplaylist_get_cached (void)
 
bool playlist_init_cached (const char *path, size_t size)
 
playlist_tplaylist_init (const char *path, size_t size)
 
static int playlist_qsort_func (const struct playlist_entry *a, const struct playlist_entry *b)
 
void playlist_qsort (playlist_t *playlist)
 

Variables

static playlist_tplaylist_cached = NULL
 

Macro Definition Documentation

◆ PLAYLIST_ENTRIES

#define PLAYLIST_ENTRIES   6

Typedef Documentation

◆ playlist_sort_fun_t

typedef int() playlist_sort_fun_t(const struct playlist_entry *a, const struct playlist_entry *b)

Function Documentation

◆ playlist_clear()

void playlist_clear ( playlist_t playlist)

playlist_clear: : Playlist handle.

Clears all playlist entries in playlist.

Here is the call graph for this function:

◆ playlist_delete_index()

void playlist_delete_index ( playlist_t playlist,
size_t  idx 
)

playlist_delete_index: : Playlist handle. : Index of playlist entry.

Delete the entry at the index:

Here is the caller graph for this function:

◆ playlist_entry_exists()

bool playlist_entry_exists ( playlist_t playlist,
const char *  path,
const char *  crc32 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ playlist_free()

void playlist_free ( playlist_t playlist)

playlist_free: : Playlist handle.

Frees playlist handle.

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

◆ playlist_free_cached()

void playlist_free_cached ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ playlist_free_entry()

static void playlist_free_entry ( struct playlist_entry entry)
static

playlist_free_entry: : Playlist entry handle.

Frees playlist entry.

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

◆ playlist_get_cached()

playlist_t* playlist_get_cached ( void  )
Here is the caller graph for this function:

◆ playlist_get_conf_path()

char* playlist_get_conf_path ( playlist_t playlist)
Here is the caller graph for this function:

◆ playlist_get_index()

void playlist_get_index ( playlist_t playlist,
size_t  idx,
const char **  path,
const char **  label,
const char **  core_path,
const char **  core_name,
const char **  crc32,
const char **  db_name 
)

playlist_get_index: : Playlist handle. : Index of playlist entry. : Path of playlist entry. : Core path of playlist entry. : Core name of playlist entry.

Gets values of playlist index:

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

◆ playlist_get_index_by_path()

void playlist_get_index_by_path ( playlist_t playlist,
const char *  search_path,
char **  path,
char **  label,
char **  core_path,
char **  core_name,
char **  crc32,
char **  db_name 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ playlist_get_size()

uint32_t playlist_get_size ( playlist_t playlist)
Here is the caller graph for this function:

◆ playlist_init()

playlist_t* playlist_init ( const char *  path,
size_t  size 
)

playlist_init: : Path to playlist contents file. : Maximum capacity of playlist size.

Creates and initializes a playlist.

Returns: handle to new playlist if successful, otherwise NULL

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

◆ playlist_init_cached()

bool playlist_init_cached ( const char *  path,
size_t  size 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ playlist_push()

bool playlist_push ( playlist_t playlist,
const char *  path,
const char *  label,
const char *  core_path,
const char *  core_name,
const char *  crc32,
const char *  db_name 
)

playlist_push: : Playlist handle. : Path of new playlist entry. : Core path of new playlist entry. : Core name of new playlist entry.

Push entry to top of playlist.

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

◆ playlist_qsort()

void playlist_qsort ( playlist_t playlist)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ playlist_qsort_func()

static int playlist_qsort_func ( const struct playlist_entry a,
const struct playlist_entry b 
)
static
Here is the caller graph for this function:

◆ playlist_read_file()

static bool playlist_read_file ( playlist_t playlist,
const char *  path 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ playlist_size()

size_t playlist_size ( playlist_t playlist)

playlist_size: : Playlist handle.

Gets size of playlist. Returns: size of playlist.

Here is the caller graph for this function:

◆ playlist_update()

void playlist_update ( playlist_t playlist,
size_t  idx,
const char *  path,
const char *  label,
const char *  core_path,
const char *  core_name,
const char *  crc32,
const char *  db_name 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ playlist_write_file()

void playlist_write_file ( playlist_t playlist)
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ playlist_cached

playlist_t* playlist_cached = NULL
static