|
myMPD
Internal API documentation
|
Image cache handling. More...
#include "compile_time.h"#include "src/lib/cache/cache_disk_images.h"#include "src/lib/filehandler.h"#include "src/lib/log.h"#include "src/lib/mimetype.h"#include "src/lib/sds_extras.h"#include <dirent.h>#include <sys/stat.h>#include <time.h>
Functions | |
| sds | cache_disk_images_get_basename (const char *cachedir, const char *type, const char *uri, int offset) |
| sds | cache_disk_images_write_file (sds cachedir, const char *type, const char *uri, const char *mime_type, sds binary, int offset) |
Image cache handling.
| sds cache_disk_images_get_basename | ( | const char * | cachedir, |
| const char * | type, | ||
| const char * | uri, | ||
| int | offset | ||
| ) |
Returns the path / basename for an uri to save it in the image cache
| cachedir | cache directory |
| type | image type |
| uri | uri of the song for the cover |
| offset | number of the coverimage |
| sds cache_disk_images_write_file | ( | sds | cachedir, |
| const char * | type, | ||
| const char * | uri, | ||
| const char * | mime_type, | ||
| sds | binary, | ||
| int | offset | ||
| ) |
Writes the image (as binary buffer) to the image cache, filename is the hash of the full path
| cachedir | cache directory |
| type | image type |
| uri | uri of the song for the cover |
| mime_type | mime_type of binary buffer |
| binary | binary data to save |
| offset | number of the coverimage |