mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-12 01:26:31 +01:00
Merged with trunk R1393.
git-svn-id: svn://localhost/ardour2/branches/midi@1395 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
cd37c36326
commit
f9f5ec85fb
85 changed files with 5136 additions and 2848 deletions
56
tools/Spotlight Importer/GetMetadataForFile.c
Normal file
56
tools/Spotlight Importer/GetMetadataForFile.c
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
#include <CoreFoundation/CoreFoundation.h>
|
||||
#include <CoreServices/CoreServices.h>
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
Step 1
|
||||
Set the UTI types the importer supports
|
||||
|
||||
Modify the CFBundleDocumentTypes entry in Info.plist to contain
|
||||
an array of Uniform Type Identifiers (UTI) for the LSItemContentTypes
|
||||
that your importer can handle
|
||||
|
||||
----------------------------------------------------------------------------- */
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
Step 2
|
||||
Implement the GetMetadataForFile function
|
||||
|
||||
Implement the GetMetadataForFile function below to scrape the relevant
|
||||
metadata from your document and return it as a CFDictionary using standard keys
|
||||
(defined in MDItem.h) whenever possible.
|
||||
----------------------------------------------------------------------------- */
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
Step 3 (optional)
|
||||
If you have defined new attributes, update the schema.xml file
|
||||
|
||||
Edit the schema.xml file to include the metadata keys that your importer returns.
|
||||
Add them to the <allattrs> and <displayattrs> elements.
|
||||
|
||||
Add any custom types that your importer requires to the <attributes> element
|
||||
|
||||
<attribute name="com_mycompany_metadatakey" type="CFString" multivalued="true"/>
|
||||
|
||||
----------------------------------------------------------------------------- */
|
||||
|
||||
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
Get metadata attributes from file
|
||||
|
||||
This function's job is to extract useful information your file format supports
|
||||
and return it as a dictionary
|
||||
----------------------------------------------------------------------------- */
|
||||
|
||||
Boolean GetMetadataForFile(void* thisInterface,
|
||||
CFMutableDictionaryRef attributes,
|
||||
CFStringRef contentTypeUTI,
|
||||
CFStringRef pathToFile)
|
||||
{
|
||||
/* Pull any available metadata from the file at the specified path */
|
||||
/* Return the attribute keys and attribute values in the dict */
|
||||
/* Return TRUE if successful, FALSE if there was no data provided */
|
||||
|
||||
#warning To complete your importer please implement the function GetMetadataForFile in GetMetadataForFile.c
|
||||
return FALSE;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue