src/playlist_vector.h File Reference
#include "util/list.h"
#include <stdbool.h>
#include <stddef.h>
#include <sys/time.h>
Go to the source code of this file.
Data Structures |
struct | playlist_metadata |
| A directory entry pointing to a playlist file. More...
|
Defines |
#define | playlist_vector_for_each(pos, head) list_for_each_entry(pos, head, siblings) |
#define | playlist_vector_for_each_safe(pos, n, head) list_for_each_entry_safe(pos, n, head, siblings) |
Functions |
void | playlist_vector_deinit (struct list_head *pv) |
struct playlist_metadata * | playlist_vector_find (struct list_head *pv, const char *name) |
| Caller must lock the db_mutex.
|
void | playlist_vector_add (struct list_head *pv, const char *name, time_t mtime) |
| Caller must lock the db_mutex.
|
bool | playlist_vector_update_or_add (struct list_head *pv, const char *name, time_t mtime) |
| Caller must lock the db_mutex.
|
bool | playlist_vector_remove (struct list_head *pv, const char *name) |
| Caller must lock the db_mutex.
|
Define Documentation
#define playlist_vector_for_each |
( |
pos, |
|
|
head |
|
) |
list_for_each_entry(pos, head, siblings) |
#define playlist_vector_for_each_safe |
( |
pos, |
|
|
n, |
|
|
head |
|
) |
list_for_each_entry_safe(pos, n, head, siblings) |
Function Documentation
void playlist_vector_add |
( |
struct list_head * |
pv, |
|
|
const char * |
name, |
|
|
time_t |
mtime | |
|
) |
| | |
void playlist_vector_deinit |
( |
struct list_head * |
pv |
) |
|
struct playlist_metadata* playlist_vector_find |
( |
struct list_head * |
pv, |
|
|
const char * |
name | |
|
) |
| | [read] |
bool playlist_vector_remove |
( |
struct list_head * |
pv, |
|
|
const char * |
name | |
|
) |
| | |
bool playlist_vector_update_or_add |
( |
struct list_head * |
pv, |
|
|
const char * |
name, |
|
|
time_t |
mtime | |
|
) |
| | |
Caller must lock the db_mutex.
- Returns:
- true if the vector or one of its items was modified