src/database.h File Reference

#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 directorydb_get_root (void)
 Returns the root directory object.
struct directorydb_get_directory (const char *name)
struct songdb_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.

Function Documentation

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]

Returns the root directory object.

Returns NULL if there is no configured music directory.

struct song* db_get_song ( const char *  file  )  [read]
void db_init ( const char *  path  ) 

Initialize the database library.

Parameters:
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 
)
Generated on Mon Aug 2 17:09:37 2010 for MPD by  doxygen 1.6.3