|
myMPD
Internal API documentation
|
Mime type and file extensions functions. More...
#include "compile_time.h"#include "src/lib/mimetype.h"#include "src/lib/log.h"#include "src/lib/sds_extras.h"#include "src/lib/utility.h"#include <errno.h>#include <string.h>
Data Structures | |
| struct | t_mime_type_entry |
Functions | |
| const char * | get_mime_type_by_ext (const char *filename) |
| const char * | get_ext_by_mime_type (const char *mime_type) |
| const char * | get_mime_type_by_magic_stream (sds stream) |
| const char * | get_mime_type_by_magic_file (const char *filename) |
| bool | is_image (const char *filename) |
Variables | |
| const struct t_mime_type_entry | mime_entries [] |
| const char * | image_extensions [] |
Mime type and file extensions functions.
| const char * get_ext_by_mime_type | ( | const char * | mime_type | ) |
Gets the extension by mime type
| mime_type |
| const char * get_mime_type_by_ext | ( | const char * | filename | ) |
Gets the mime type by extension
| filename | Filename to get the mime type for |
| const char * get_mime_type_by_magic_file | ( | const char * | filename | ) |
Gets the mime type by magic numbers in binary file
| filename |
| const char * get_mime_type_by_magic_stream | ( | sds | stream | ) |
Gets the mime type by magic numbers in binary buffer
| stream | binary buffer |
| bool is_image | ( | const char * | filename | ) |
Checks the filetype by extension
| filename |
| const char* image_extensions[] |
List of image type extensions
| const struct t_mime_type_entry mime_entries[] |
Magic bytes to extension and mime type handling