#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 directory * | directory_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 directory * | directory_get_child (const struct directory *directory, const char *name) |
static struct directory * | directory_new_child (struct directory *directory, const char *name) |
void | directory_prune_empty (struct directory *directory) |
struct directory * | directory_lookup_directory (struct directory *directory, const char *uri) |
Looks up a directory by its relative URI. | |
struct song * | directory_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 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.
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] |
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.