1 #include <CoreFoundation/CoreFoundation.h>
2 #include <CoreServices/CoreServices.h>
4 /* -----------------------------------------------------------------------------
6 Set the UTI types the importer supports
8 Modify the CFBundleDocumentTypes entry in Info.plist to contain
9 an array of Uniform Type Identifiers (UTI) for the LSItemContentTypes
10 that your importer can handle
12 ----------------------------------------------------------------------------- */
14 /* -----------------------------------------------------------------------------
16 Implement the GetMetadataForFile function
18 Implement the GetMetadataForFile function below to scrape the relevant
19 metadata from your document and return it as a CFDictionary using standard keys
20 (defined in MDItem.h) whenever possible.
21 ----------------------------------------------------------------------------- */
23 /* -----------------------------------------------------------------------------
25 If you have defined new attributes, update the schema.xml file
27 Edit the schema.xml file to include the metadata keys that your importer returns.
28 Add them to the <allattrs> and <displayattrs> elements.
30 Add any custom types that your importer requires to the <attributes> element
32 <attribute name="com_mycompany_metadatakey" type="CFString" multivalued="true"/>
34 ----------------------------------------------------------------------------- */
38 /* -----------------------------------------------------------------------------
39 Get metadata attributes from file
41 This function's job is to extract useful information your file format supports
42 and return it as a dictionary
43 ----------------------------------------------------------------------------- */
45 Boolean GetMetadataForFile(void* thisInterface,
46 CFMutableDictionaryRef attributes,
47 CFStringRef contentTypeUTI,
48 CFStringRef pathToFile)
50 /* Pull any available metadata from the file at the specified path */
51 /* Return the attribute keys and attribute values in the dict */
52 /* Return TRUE if successful, FALSE if there was no data provided */
54 #warning To complete your importer please implement the function GetMetadataForFile in GetMetadataForFile.c