content-type.h 788 Bytes
Newer Older
1 2 3 4 5
/* See LICENSE file for license and copyright information */

#ifndef ZATHURA_CONTENT_TYPE_H
#define ZATHURA_CONTENT_TYPE_H

6 7 8
#include "types.h"

/**
9
 * Create new context for content type detection.
10 11 12 13 14 15
 *
 * @return new context
 */
zathura_content_type_context_t* zathura_content_type_new(void);

/**
16
 * Free content type detection context.
17 18 19 20 21
 *
 * @param context The context.
 */
void zathura_content_type_free(zathura_content_type_context_t* context);

22 23 24 25 26
/**
 * "Guess" the content type of a file. Various methods are tried depending on
 * the available libraries.
 *
 * @param path file name
27
 * @return content type of path, needs to freeed with g_free.
28
 */
29 30
char* zathura_content_type_guess(zathura_content_type_context_t* context,
                                 const char* path);
31 32

#endif