summaryrefslogtreecommitdiffstats
path: root/base/third_party/xdg_mime/xdgmimeglob.h
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-16 04:30:05 +0000
committerthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-16 04:30:05 +0000
commitbff1ddf84a4743c05f754cf55875b7f510dbb364 (patch)
tree10ccf3c02a1d510ea0c6c9282b192a20b2063497 /base/third_party/xdg_mime/xdgmimeglob.h
parent85b9984be3cf3566ab3bb6f9b719876b551525f3 (diff)
downloadchromium_src-bff1ddf84a4743c05f754cf55875b7f510dbb364.zip
chromium_src-bff1ddf84a4743c05f754cf55875b7f510dbb364.tar.gz
chromium_src-bff1ddf84a4743c05f754cf55875b7f510dbb364.tar.bz2
Add xdg mime support on Linux.
BUG=10049 Review URL: http://codereview.chromium.org/113168 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16227 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/third_party/xdg_mime/xdgmimeglob.h')
-rw-r--r--base/third_party/xdg_mime/xdgmimeglob.h68
1 files changed, 68 insertions, 0 deletions
diff --git a/base/third_party/xdg_mime/xdgmimeglob.h b/base/third_party/xdg_mime/xdgmimeglob.h
new file mode 100644
index 0000000..df8dc79
--- /dev/null
+++ b/base/third_party/xdg_mime/xdgmimeglob.h
@@ -0,0 +1,68 @@
+/* -*- mode: C; c-file-style: "gnu" -*- */
+/* xdgmimeglob.h: Private file. Datastructure for storing the globs.
+ *
+ * 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_GLOB_H__
+#define __XDG_MIME_GLOB_H__
+
+#include "xdgmime.h"
+
+typedef struct XdgGlobHash XdgGlobHash;
+
+typedef enum
+{
+ XDG_GLOB_LITERAL, /* Makefile */
+ XDG_GLOB_SIMPLE, /* *.gif */
+ XDG_GLOB_FULL /* x*.[ch] */
+} XdgGlobType;
+
+
+#ifdef XDG_PREFIX
+#define _xdg_mime_glob_read_from_file XDG_RESERVED_ENTRY(glob_read_from_file)
+#define _xdg_glob_hash_new XDG_RESERVED_ENTRY(hash_new)
+#define _xdg_glob_hash_free XDG_RESERVED_ENTRY(hash_free)
+#define _xdg_glob_hash_lookup_file_name XDG_RESERVED_ENTRY(hash_lookup_file_name)
+#define _xdg_glob_hash_append_glob XDG_RESERVED_ENTRY(hash_append_glob)
+#define _xdg_glob_determine_type XDG_RESERVED_ENTRY(determine_type)
+#define _xdg_glob_hash_dump XDG_RESERVED_ENTRY(hash_dump)
+#endif
+
+void _xdg_mime_glob_read_from_file (XdgGlobHash *glob_hash,
+ const char *file_name);
+XdgGlobHash *_xdg_glob_hash_new (void);
+void _xdg_glob_hash_free (XdgGlobHash *glob_hash);
+int _xdg_glob_hash_lookup_file_name (XdgGlobHash *glob_hash,
+ const char *text,
+ const char *mime_types[],
+ int n_mime_types);
+void _xdg_glob_hash_append_glob (XdgGlobHash *glob_hash,
+ const char *glob,
+ const char *mime_type,
+ int weight);
+XdgGlobType _xdg_glob_determine_type (const char *glob);
+void _xdg_glob_hash_dump (XdgGlobHash *glob_hash);
+
+#endif /* __XDG_MIME_GLOB_H__ */