summaryrefslogtreecommitdiff
path: root/deadbeef.h
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2011-03-26 22:51:51 +0100
committerGravatar waker <wakeroid@gmail.com>2011-03-26 22:51:51 +0100
commit2c0f383ad74af2790ea5e470ded4f5e3c08ce772 (patch)
tree678484a17faad1cf139ccdabb84c2c8e4fcad63b /deadbeef.h
parent49f5aa7515d026fe581c0d890c33c02818e7bdd9 (diff)
initial support for playlist metadata
allows to add any set of properties to every playlist api is based on playItem metadata api
Diffstat (limited to 'deadbeef.h')
-rw-r--r--deadbeef.h21
1 files changed, 18 insertions, 3 deletions
diff --git a/deadbeef.h b/deadbeef.h
index 0070bc3c..a8f55d15 100644
--- a/deadbeef.h
+++ b/deadbeef.h
@@ -360,12 +360,27 @@ typedef struct {
int (*plt_get_sel_count) (int plt);
int (*plt_add) (int before, const char *title);
void (*plt_remove) (int plt);
- void (*plt_free) (void);
void (*plt_set_curr) (int plt);
int (*plt_get_curr) (void);
- int (*plt_get_title) (int plt, char *buffer, int bufsize);
- int (*plt_set_title) (int plt, const char *title);
void (*plt_move) (int from, int before);
+
+ // getting and working with a handle must be guarded using plt_lock/unlock
+ void *(*plt_get_handle) (int idx);
+ int (*plt_get_title) (void *handle, char *buffer, int bufsize);
+ int (*plt_set_title) (void *handle, const char *title);
+ // playlist metadata
+ // this kind of metadata is stored in playlist (dbpl) files
+ void (*plt_add_meta) (void *handle, const char *key, const char *value);
+ void (*plt_replace_meta) (void *handle, const char *key, const char *value);
+ void (*plt_append_meta) (void *handle, const char *key, const char *value);
+ void (*plt_set_meta_int) (void *handle, const char *key, int value);
+ void (*plt_set_meta_float) (void *handle, const char *key, float value);
+ const char *(*plt_find_meta) (void *handle, const char *key);
+ DB_metaInfo_t * (*plt_get_metadata_head) (void *handle); // returns head of metadata linked list
+ void (*plt_delete_metadata) (void *handle, DB_metaInfo_t *meta);
+ int (*plt_find_meta_int) (void *handle, const char *key, int def);
+ float (*plt_find_meta_float) (void *handle, const char *key, float def);
+ void (*plt_delete_all_meta) (void *handle);
// playlist control
void (*pl_lock) (void);
void (*pl_unlock) (void);