| Framework |
CoreServices/CoreServices.h |
| Declared in | MDImporter.h |
| Companion guides |
An MDImporter is responsible for returning the metadata contained with a file. The Spotlight server is notified when a file is changed and loads the appropriate importer to extract the metadata. An importer is implemented as a CFPlugin.
Defines a pointer to an importer import callback that imports importers.
typedef Boolean (* ImporterImportData) ( void *thisInterface, CFMutableDictionaryRef attributes, CFStringRef contentTypeUTI, CFStringRef pathToFile )
If you name your function GetMetadataForFile,
you would declare it like this:
Boolean GetMetadataForFile ( void *thisInterface, CFMutableDictionaryRef attributes, CFStringRef contentTypeUTI, CFStringRef pathToFile )
The CFPlugin object that is called. This value is passed to the callback function.
A mutable dictionary that you should populate with the metadata key/value pairs. This dictionary is created and passed to the callback function.
The content type of the file as a uniform type identifier. This value is passed to the callback function.
The full path to the file. This value is passed to the callback function.
Your callback function
should return true if the metadata
was successfully returned, false if
the metadata was not returned.
Type ID of an importer plug-in.
#define kMDImporterTypeID CFUUIDGetConstantUUIDWithBytes(kCFAllocatorDefault, 0x8B, 0x08, 0xC4, 0xBF, 0x41, 0x5 B, 0x11, 0xD8, 0xB3, 0xF9, 0x00, 0x03, 0x93, 0x67, 0x26, 0xFC);
kMDImporterTypeIDOnly importers with this type ID are loaded.
Available in Mac OS X v10.4 and later.
Declared in MDImporter.h.
The string representation of this UUID is 8B08C4BF-415B-11D8-B3F9-0003936726FC.
Interface required by a importer plug-in.
#define kMDImporterInterfaceID CFUUIDGetConstantUUIDWithBytes(kCFAllocatorDefault, 0x6E, 0xBC, 0x27, 0xC4, 0x89, 0x9 C, 0x11, 0xD8, 0x84, 0xAE, 0x00, 0x03, 0x93, 0x67, 0x26, 0xFC);
kMDImporterInterfaceIDImporters must implement an interface corresponding to this UUID.
Available in Mac OS X v10.4 and later.
Declared in MDImporter.h.
The string representation of this UUID is 6EBC27C4-899C-11D8-84A3-0003936726FC.
Last updated: 2005-04-29