]> arthur.barton.de Git - netatalk.git/blob - etc/spotlight/slmod_rdf_map.h
4bfc78a6e80526e594df04d1b32fe33b17db7393
[netatalk.git] / etc / spotlight / slmod_rdf_map.h
1 /*
2   Copyright (c) 2012 Frank Lahm <franklahm@gmail.com>
3
4   This program is free software; you can redistribute it and/or modify
5   it under the terms of the GNU General Public License as published by
6   the Free Software Foundation; either version 2 of the License, or
7   (at your option) any later version.
8
9   This program is distributed in the hope that it will be useful,
10   but WITHOUT ANY WARRANTY; without even the implied warranty of
11   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12   GNU General Public License for more details.
13 */
14
15 #ifdef HAVE_CONFIG_H
16 #include "config.h"
17 #endif /* HAVE_CONFIG_H */
18
19 #ifndef SLMOD_RDF_MAP_H
20 #define SLMOD_RDF_MAP_H
21
22 /* Spotlight -> RDF mapping (srm) */
23 enum srm_type {
24     srmt_bool,   /* a boolean value */
25     srmt_num,    /* a numeric value */
26     srmt_str,    /* a string value */
27     srmt_fts,    /* a string value for full text search */
28     srmt_date,   /* date values are handled in a special map function map_daterange() */
29     srmt_type    /* kMDItemContentType, requires special mapping */
30 };
31
32 struct spotlight_rdf_map {
33     const char    *srm_spotlight_attr;
34     enum srm_type  srm_type;
35     const char    *srm_rdf_attr;
36 };
37
38 struct MDTypeMap {
39     const char  *mdtm_value;     /* Value of '_kMDItemGroupId' or 'kMDItemContentTypeTree' */
40     const char  *mdtm_rdfop;     /* RDF query operator */
41     const char  *mdtm_type;      /* MIME type */
42 };
43
44 extern struct spotlight_rdf_map spotlight_rdf_map[];
45 extern struct MDTypeMap MDTypeMap[];
46 #endif