src/directory.h File Reference

#include "dirvec.h"
#include "songvec.h"
#include <stdbool.h>
#include <sys/types.h>

Go to the source code of this file.

Data Structures

struct  directory

Defines

#define DIRECTORY_DIR   "directory: "
#define DEVICE_INARCHIVE   (unsigned)(-1)
#define DEVICE_CONTAINER   (unsigned)(-2)

Functions

static bool isRootDirectory (const char *name)
struct directorydirectory_new (const char *dirname, struct directory *parent)
void directory_free (struct directory *directory)
static bool directory_is_empty (const struct directory *directory)
static const char * directory_get_path (const struct directory *directory)
static bool directory_is_root (const struct directory *directory)
 Is this the root directory of the music database?
const char * directory_get_name (const struct directory *directory)
 Returns the base name of the directory.
static struct directorydirectory_get_child (const struct directory *directory, const char *name)
static struct directorydirectory_new_child (struct directory *directory, const char *name)
void directory_prune_empty (struct directory *directory)
struct directorydirectory_lookup_directory (struct directory *directory, const char *uri)
 Looks up a directory by its relative URI.
struct songdirectory_lookup_song (struct directory *directory, const char *uri)
 Looks up a song by its relative URI.
void directory_sort (struct directory *directory)
int directory_walk (struct directory *directory, int(*forEachSong)(struct song *, void *), int(*forEachDir)(struct directory *, void *), void *data)


Define Documentation

#define DEVICE_CONTAINER   (unsigned)(-2)

Definition at line 32 of file directory.h.

#define DEVICE_INARCHIVE   (unsigned)(-1)

Definition at line 31 of file directory.h.

#define DIRECTORY_DIR   "directory: "

Definition at line 29 of file directory.h.


Function Documentation

void directory_free ( struct directory directory  ) 

static struct directory* directory_get_child ( const struct directory directory,
const char *  name 
) [static, read]

Definition at line 85 of file directory.h.

const char* directory_get_name ( const struct directory directory  ) 

Returns the base name of the directory.

static const char* directory_get_path ( const struct directory directory  )  [inline, static]

Definition at line 64 of file directory.h.

static bool directory_is_empty ( const struct directory directory  )  [inline, static]

Definition at line 58 of file directory.h.

static bool directory_is_root ( const struct directory directory  )  [inline, static]

Is this the root directory of the music database?

Definition at line 73 of file directory.h.

struct directory* directory_lookup_directory ( struct directory directory,
const char *  uri 
) [read]

Looks up a directory by its relative URI.

Parameters:
directory the parent (or grandparent, ...) directory
uri the relative URI
Returns:
the directory, or NULL if none was found

struct song* directory_lookup_song ( struct directory directory,
const char *  uri 
) [read]

Looks up a song by its relative URI.

Parameters:
directory the parent (or grandparent, ...) directory
uri the relative URI
Returns:
the song, or NULL if none was found

struct directory* directory_new ( const char *  dirname,
struct directory parent 
) [read]

static struct directory* directory_new_child ( struct directory directory,
const char *  name 
) [static, read]

Definition at line 91 of file directory.h.

void directory_prune_empty ( struct directory directory  ) 

void directory_sort ( struct directory directory  ) 

int directory_walk ( struct directory directory,
int(*)(struct song *, void *)  forEachSong,
int(*)(struct directory *, void *)  forEachDir,
void *  data 
)

static bool isRootDirectory ( const char *  name  )  [inline, static]

Definition at line 46 of file directory.h.


Generated on Thu Sep 3 02:29:41 2009 for MPD by  doxygen 1.5.9