summaryrefslogtreecommitdiff
path: root/plugins/artwork/artwork.h
blob: 1c60475ca610c2f4c8f75ea5b0a960cbe42c513c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#ifndef __ARTWORK_H
#define __ARTWORK_H

#include "../../deadbeef.h"

extern DB_FILE *current_file;

typedef void (*artwork_callback) (const char *fname, const char *artist, const char *album, void *user_data);

typedef struct {
    DB_misc_t plugin;
    // returns filename of cached image, or NULL
    char* (*get_album_art) (const char *fname, const char *artist, const char *album, int size, artwork_callback callback, void *user_data);

    // this has to be called to clear queue on exit, before caller terminates
    // `fast=1' means "don't wait, just flush queue"
    void (*reset) (int fast);
    const char *(*get_default_cover) (void);

    // synchronously get filename
    char* (*get_album_art_sync) (const char *fname, const char *artist, const char *album, int size);
} DB_artwork_plugin_t;

#endif /*__ARTWORK_H*/