#include <glib.h>
#include <sys/time.h>
#include <stdbool.h>
Go to the source code of this file.
Functions | |
void | db_init (const char *path) |
Initialize the database library. | |
void | db_finish (void) |
void | db_clear (void) |
Clear the database. | |
struct directory * | db_get_root (void) |
Returns the root directory object. | |
struct directory * | db_get_directory (const char *name) |
struct song * | db_get_song (const char *file) |
int | db_walk (const char *name, int(*forEachSong)(struct song *, void *), int(*forEachDir)(struct directory *, void *), void *data) |
bool | db_check (void) |
bool | db_save (void) |
bool | db_load (GError **error) |
time_t | db_get_mtime (void) |
static bool | db_exists (void) |
Returns true if there is a valid database file on the disk. |
bool db_check | ( | void | ) |
void db_clear | ( | void | ) |
Clear the database.
static bool db_exists | ( | void | ) | [inline, static] |
Returns true if there is a valid database file on the disk.
Definition at line 80 of file database.h.
void db_finish | ( | void | ) |
struct directory* db_get_directory | ( | const char * | name | ) | [read] |
time_t db_get_mtime | ( | void | ) |
struct directory* db_get_root | ( | void | ) | [read] |
struct song* db_get_song | ( | const char * | file | ) | [read] |
void db_init | ( | const char * | path | ) |
Initialize the database library.
path | the absolute path of the database file |
bool db_load | ( | GError ** | error | ) |
bool db_save | ( | void | ) |
int db_walk | ( | const char * | name, | |
int(*)(struct song *, void *) | forEachSong, | |||
int(*)(struct directory *, void *) | forEachDir, | |||
void * | data | |||
) |