⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xdgmime.h

📁 linux下upnp的源码库
💻 H
字号:
/* -*- mode: C; c-file-style: "gnu" -*- *//* xdgmime.h: XDG Mime Spec mime resolver.  Based on version 0.11 of the spec. * * More info can be found at http://www.freedesktop.org/standards/ *  * Copyright (C) 2003  Red Hat, Inc. * Copyright (C) 2003  Jonathan Blandford <jrb@alum.mit.edu> * * Licensed under the Academic Free License version 2.0 * Or under the following terms: *  * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */#ifndef __XDG_MIME_H__#define __XDG_MIME_H__#include <stdlib.h>#include <sys/stat.h>#ifdef __cplusplusextern "C" {#endif /* __cplusplus */#ifdef XDG_PREFIX#define XDG_ENTRY(func) _XDG_ENTRY2(XDG_PREFIX,func)#define _XDG_ENTRY2(prefix,func) _XDG_ENTRY3(prefix,func)#define _XDG_ENTRY3(prefix,func) prefix##_##func#define XDG_RESERVED_ENTRY(func) _XDG_RESERVED_ENTRY2(XDG_PREFIX,func)#define _XDG_RESERVED_ENTRY2(prefix,func) _XDG_RESERVED_ENTRY3(prefix,func)#define _XDG_RESERVED_ENTRY3(prefix,func) _##prefix##_##func#endiftypedef void (*XdgMimeCallback) (void *user_data);typedef void (*XdgMimeDestroy)  (void *user_data);  #ifdef XDG_PREFIX#define xdg_mime_get_mime_type_for_data       XDG_ENTRY(mime_get_mime_type_for_data)#define xdg_mime_get_mime_type_for_file       XDG_ENTRY(mime_get_mime_type_for_file)#define xdg_mime_get_mime_type_from_file_name XDG_ENTRY(mime_get_mime_type_from_file_name)#define xdg_mime_is_valid_mime_type           XDG_ENTRY(mime_is_valid_mime_type)#define xdg_mime_mime_type_equal              XDG_ENTRY(mime_mime_type_equal)#define xdg_mime_media_type_equal             XDG_ENTRY(mime_media_type_equal)#define xdg_mime_mime_type_subclass           XDG_ENTRY(mime_mime_type_subclass)#define xdg_mime_get_mime_parents             XDG_ENTRY(mime_get_mime_parents)#define xdg_mime_list_mime_parents            XDG_ENTRY(mime_list_mime_parents)#define xdg_mime_unalias_mime_type            XDG_ENTRY(mime_unalias_mime_type)#define xdg_mime_get_max_buffer_extents       XDG_ENTRY(mime_get_max_buffer_extents)#define xdg_mime_shutdown                     XDG_ENTRY(mime_shutdown)#define xdg_mime_dump                         XDG_ENTRY(mime_dump)#define xdg_mime_register_reload_callback     XDG_ENTRY(mime_register_reload_callback)#define xdg_mime_remove_callback              XDG_ENTRY(mime_remove_callback)#define xdg_mime_type_unknown                 XDG_ENTRY(mime_type_unknown)#define _xdg_mime_mime_type_equal             XDG_RESERVED_ENTRY(mime_mime_type_equal)#define _xdg_mime_media_type_equal            XDG_RESERVED_ENTRY(mime_media_type_equal)#define _xdg_mime_mime_type_subclass          XDG_RESERVED_ENTRY(mime_mime_type_subclass)#endifextern const char xdg_mime_type_unknown[];#define XDG_MIME_TYPE_UNKNOWN xdg_mime_type_unknownconst char  *xdg_mime_get_mime_type_for_data       (const void *data,						    size_t      len);const char  *xdg_mime_get_mime_type_for_file       (const char *file_name,                                                    struct stat *statbuf);const char  *xdg_mime_get_mime_type_from_file_name (const char *file_name);int          xdg_mime_is_valid_mime_type           (const char *mime_type);int          xdg_mime_mime_type_equal              (const char *mime_a,						    const char *mime_b);int          xdg_mime_media_type_equal             (const char *mime_a,						    const char *mime_b);int          xdg_mime_mime_type_subclass           (const char *mime_a,						    const char *mime_b);  /* xdg_mime_get_mime_parents() is deprecated since it does   * not work correctly with caches. Use xdg_mime_list_parents()    * instead, but notice that that function expects you to free   * the array it returns.    */const char **xdg_mime_get_mime_parents		   (const char *mime);char **      xdg_mime_list_mime_parents		   (const char *mime);const char  *xdg_mime_unalias_mime_type		   (const char *mime);int          xdg_mime_get_max_buffer_extents       (void);void         xdg_mime_shutdown                     (void);void         xdg_mime_dump                         (void);int          xdg_mime_register_reload_callback     (XdgMimeCallback  callback,						    void            *data,						    XdgMimeDestroy   destroy);void         xdg_mime_remove_callback              (int              callback_id);  /* Private versions of functions that don't call xdg_mime_init () */int          _xdg_mime_mime_type_equal             (const char *mime_a,						    const char *mime_b);int          _xdg_mime_media_type_equal            (const char *mime_a,						    const char *mime_b);int          _xdg_mime_mime_type_subclass          (const char *mime,						    const char *base);#ifdef __cplusplus}#endif /* __cplusplus */#endif /* __XDG_MIME_H__ */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -