(root)/
glib-2.79.0/
gio/
xdgmime/
xdgmimemagic.h
       1  /* -*- mode: C; c-file-style: "gnu" -*- */
       2  /* xdgmimemagic.h: Private file.  Datastructure for storing the magic files.
       3   *
       4   * More info can be found at http://www.freedesktop.org/standards/
       5   *
       6   * Copyright (C) 2003  Red Hat, Inc.
       7   * Copyright (C) 2003  Jonathan Blandford <jrb@alum.mit.edu>
       8   *
       9   * SPDX-License-Identifier: LGPL-2.1-or-later or AFL-2.0
      10   */
      11  
      12  #ifndef __XDG_MIME_MAGIC_H__
      13  #define __XDG_MIME_MAGIC_H__
      14  
      15  #include <unistd.h>
      16  #include "xdgmime.h"
      17  typedef struct XdgMimeMagic XdgMimeMagic;
      18  
      19  #ifdef XDG_PREFIX
      20  #define _xdg_mime_glob_read_from_file             XDG_RESERVED_ENTRY(glob_read_from_file)
      21  #define _xdg_mime_magic_new                       XDG_RESERVED_ENTRY(magic_new)
      22  #define _xdg_mime_magic_read_from_file            XDG_RESERVED_ENTRY(magic_read_from_file)
      23  #define _xdg_mime_magic_free                      XDG_RESERVED_ENTRY(magic_free)
      24  #define _xdg_mime_magic_get_buffer_extents        XDG_RESERVED_ENTRY(magic_get_buffer_extents)
      25  #define _xdg_mime_magic_lookup_data               XDG_RESERVED_ENTRY(magic_lookup_data)
      26  #endif
      27  
      28  
      29  XdgMimeMagic *_xdg_mime_magic_new                (void);
      30  void          _xdg_mime_magic_read_from_file     (XdgMimeMagic *mime_magic,
      31  						  const char   *file_name);
      32  void          _xdg_mime_magic_free               (XdgMimeMagic *mime_magic);
      33  int           _xdg_mime_magic_get_buffer_extents (XdgMimeMagic *mime_magic);
      34  const char   *_xdg_mime_magic_lookup_data        (XdgMimeMagic *mime_magic,
      35  						  const void   *data,
      36  						  size_t        len,
      37  						  int          *result_prio,
      38  						  const char   *mime_types[],
      39  						  int           n_mime_types);
      40  
      41  #endif /* __XDG_MIME_MAGIC_H__ */