Back to index

libcitadel  8.12
xdgmimemagic.h
Go to the documentation of this file.
00001 /* -*- mode: C; c-file-style: "gnu" -*- */
00002 /* xdgmimemagic.h: Private file.  Datastructure for storing the magic files.
00003  *
00004  * More info can be found at http://www.freedesktop.org/standards/
00005  *
00006  * Copyright (C) 2003  Red Hat, Inc.
00007  * Copyright (C) 2003  Jonathan Blandford <jrb@alum.mit.edu>
00008  *
00009  * Licensed under the Academic Free License version 2.0
00010  * Or under the following terms:
00011  *
00012  * This library is free software; you can redistribute it and/or
00013  * modify it under the terms of the GNU Lesser General Public
00014  * License as published by the Free Software Foundation; either
00015  * version 2 of the License, or (at your option) any later version.
00016  *
00017  * This library is distributed in the hope that it will be useful,
00018  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00019  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00020  * Lesser General Public License for more details.
00021  *
00022  * You should have received a copy of the GNU Lesser General Public
00023  * License along with this library; if not, write to the
00024  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00025  * Boston, MA 02111-1307, USA.
00026  */
00027 
00028 #ifndef __XDG_MIME_MAGIC_H__
00029 #define __XDG_MIME_MAGIC_H__
00030 
00031 #include <unistd.h>
00032 #include "xdgmime.h"
00033 typedef struct XdgMimeMagic XdgMimeMagic;
00034 
00035 #ifdef XDG_PREFIX
00036 #define _xdg_mime_magic_new                       XDG_RESERVED_ENTRY(mime_magic_new)
00037 #define _xdg_mime_magic_read_from_file            XDG_RESERVED_ENTRY(mime_magic_read_from_file)
00038 #define _xdg_mime_magic_free                      XDG_RESERVED_ENTRY(mime_magic_free)
00039 #define _xdg_mime_magic_get_buffer_extents        XDG_RESERVED_ENTRY(mime_magic_get_buffer_extents)
00040 #define _xdg_mime_magic_lookup_data               XDG_RESERVED_ENTRY(mime_magic_lookup_data)
00041 #endif
00042 
00043 
00044 XdgMimeMagic *_xdg_mime_magic_new                (void);
00045 void          _xdg_mime_magic_read_from_file     (XdgMimeMagic *mime_magic,
00046                                             const char   *file_name);
00047 void          _xdg_mime_magic_free               (XdgMimeMagic *mime_magic);
00048 int           _xdg_mime_magic_get_buffer_extents (XdgMimeMagic *mime_magic);
00049 const char   *_xdg_mime_magic_lookup_data        (XdgMimeMagic *mime_magic,
00050                                             const void   *data,
00051                                             size_t        len,
00052                                             const char   *mime_types[],
00053                                             int           n_mime_types);
00054 
00055 #endif /* __XDG_MIME_MAGIC_H__ */