2014-01-14 18:01:34 +01:00
|
|
|
/* See LICENSE file for license and copyright information */
|
|
|
|
|
|
|
|
#ifndef ZATHURA_CONTENT_TYPE_H
|
|
|
|
#define ZATHURA_CONTENT_TYPE_H
|
|
|
|
|
2016-01-20 13:45:46 +01:00
|
|
|
#include "types.h"
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Create new context for MIME type detection.
|
|
|
|
*
|
|
|
|
* @return new context
|
|
|
|
*/
|
|
|
|
zathura_content_type_context_t* zathura_content_type_new(void);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Free MIME type detection context.
|
|
|
|
*
|
|
|
|
* @param context The context.
|
|
|
|
*/
|
|
|
|
void zathura_content_type_free(zathura_content_type_context_t* context);
|
|
|
|
|
2014-08-15 17:06:21 +02:00
|
|
|
/**
|
|
|
|
* "Guess" the content type of a file. Various methods are tried depending on
|
|
|
|
* the available libraries.
|
|
|
|
*
|
|
|
|
* @param path file name
|
2016-01-20 15:25:08 +01:00
|
|
|
* @return content type of path, needs to freeed with g_free.
|
2014-08-15 17:06:21 +02:00
|
|
|
*/
|
2016-01-20 15:25:08 +01:00
|
|
|
char* zathura_content_type_guess(zathura_content_type_context_t* context,
|
|
|
|
const char* path);
|
2014-01-14 18:01:34 +01:00
|
|
|
|
|
|
|
#endif
|