]> arthur.barton.de Git - netatalk.git/blob - etc/afpd/spotlight_SPARQL_map.c
Add lots of mappings and dont ignore case stuff
[netatalk.git] / etc / afpd / spotlight_SPARQL_map.c
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 #include <unistd.h>
20
21 #include "spotlight_SPARQL_map.h"
22
23 struct spotlight_sparql_map spotlight_sparql_map[] = {
24     /* ssm_spotlight_attr               ssm_type,   ssm_sparql_attr */
25     {"*",                               ssmt_fts,   "fts:match"},
26
27     /* Filesystem metadata */
28     {"kMDItemFSLabel", ssmt_num, ""},
29     {"kMDItemDisplayName",              ssmt_str,   "nfo:fileName"},
30     {"kMDItemFSName",                   ssmt_str,   "nfo:fileName"},
31     {"kMDItemFSContentChangeDate",      ssmt_date,  "nfo:fileLastModified"},
32
33     /* Common metadata */
34     {"kMDItemTextContent",              ssmt_fts,   "fts:match"},
35     {"kMDItemContentCreationDate",      ssmt_date,  "nie:contentCreated"},
36     {"kMDItemContentModificationDate",  ssmt_date,  "nfo:fileLastModified"},
37     {"kMDItemAttributeChangeDate",      ssmt_date,  "nfo:fileLastModified"},
38     {"kMDItemAuthors",                  ssmt_str,   "dc:creator"},
39     {"kMDItemContentType",              ssmt_cnt,   "nie:mimeType"},
40     {"kMDItemCopyright",                ssmt_str,   "nie:copyright"},
41     {"kMDItemCountry",                  ssmt_str,   "nco:country"},
42     {"kMDItemCreator",                  ssmt_str,   "dc:creator"},
43     {"kMDItemDurationSeconds",          ssmt_num,   "nfo:duration"},
44     {"kMDItemNumberOfPages",            ssmt_num,   "nfo:pageCount"},
45     {"kMDItemTitle",                    ssmt_str,   "nie:title"},
46
47     /* Image metadata */
48     {"kMDItemPixelWidth",               ssmt_num,   "nfo:width"},
49     {"kMDItemPixelHeight",              ssmt_num,   "nfo:height"},
50     {"kMDItemColorSpace",               ssmt_str,   "nexif:colorSpace"},
51     {"kMDItemBitsPerSample",            ssmt_num,   "nfo:colorDepth"},
52     {"kMDItemFocalLength",              ssmt_num,   "nmm:focalLength"},
53     {"kMDItemISOSpeed",                 ssmt_num,   "nmm:isoSpeed"},
54     {"kMDItemOrientation",              ssmt_bool,  "nfo:orientation"},
55     {"kMDItemResolutionWidthDPI",       ssmt_num,   "nfo:horizontalResolution"},
56     {"kMDItemResolutionHeightDPI",      ssmt_num,   "nfo:verticalResolution"},
57     {"kMDItemExposureTimeSeconds",      ssmt_num,   "nmm:exposureTime"},
58
59     /* Audio metadata */
60     {"kMDItemComposer",                 ssmt_str,   "nmm:composer"},
61     {"kMDItemMusicalGenre",             ssmt_str,   "nfo:genre"},
62
63     {NULL, ssmt_str, NULL}
64 };