mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-28 05:04:16 -05:00
Artwork caching (pull request #61), and also:
- introduced new section in config file for sqlite pragma settings, added config for artwork cache - added setting of pragma synchronous, cache size and journal mode to daap cache
This commit is contained in:
54
src/cache.h
Normal file
54
src/cache.h
Normal file
@@ -0,0 +1,54 @@
|
||||
|
||||
#ifndef __CACHE_H__
|
||||
#define __CACHE_H__
|
||||
|
||||
#ifdef HAVE_LIBEVENT2
|
||||
# include <event2/event.h>
|
||||
# include <event2/buffer.h>
|
||||
#else
|
||||
# include <event.h>
|
||||
#endif
|
||||
|
||||
|
||||
/* ---------------------------- DAAP cache API --------------------------- */
|
||||
|
||||
void
|
||||
cache_daap_trigger(void);
|
||||
|
||||
int
|
||||
cache_daap_get(const char *query, struct evbuffer *evbuf);
|
||||
|
||||
void
|
||||
cache_daap_add(const char *query, const char *ua, int msec);
|
||||
|
||||
int
|
||||
cache_daap_threshold(void);
|
||||
|
||||
|
||||
/* ---------------------------- Artwork cache API --------------------------- */
|
||||
|
||||
int
|
||||
cache_artwork_ping(char *path, time_t mtime);
|
||||
|
||||
int
|
||||
cache_artwork_delete_by_path(char *path);
|
||||
|
||||
int
|
||||
cache_artwork_purge_cruft(time_t ref);
|
||||
|
||||
int
|
||||
cache_artwork_add(int64_t persistentid, int max_w, int max_h, int format, char *filename, struct evbuffer *evbuf);
|
||||
|
||||
int
|
||||
cache_artwork_get(int64_t persistentid, int max_w, int max_h, int *cached, int *format, struct evbuffer *evbuf);
|
||||
|
||||
|
||||
/* ---------------------------- Cache API --------------------------- */
|
||||
|
||||
int
|
||||
cache_init(void);
|
||||
|
||||
void
|
||||
cache_deinit(void);
|
||||
|
||||
#endif /* !__CACHE_H__ */
|
||||
Reference in New Issue
Block a user