Apple Developer Connection
Advanced Search
Member Login Log In | Not a Member? Contact ADC
ADC Home > Reference Library > Reference > Apple Applications > Aperture > Aperture 2.1 SDK Reference

 


ApertureExportManager

Declared In:

Overview

Protocol definition for the Aperture export interface. You use this protocol to communicate with the Aperture application.



Methods

-addCustomMetadataKeyValues:toImageAtIndex:
Adds custom metadata to a Version image.
-addHierarchicalKeywords:toImageAtIndex:
Adds keyword hierarchies to a Version image.
-addKeywords:toImageAtIndex:
Adds keywords to a Version image.
-imageCount
Returns the number of images the user wants to export.
-isMasterExport
Indicates whether Aperture is exporting Master or Version images.
-propertiesForImageAtIndex:
Returns a dictionary containing all the properties for an image.
-propertiesWithoutThumbnailForImageAtIndex:
Returns a dictionary containing all the properties for an image, but without a value for the kExportKeyThumbnailImage key.
-selectedExportPresetDictionary
Returns the key-value pairs defining the currently-selected export presets for a Version export.
-shouldBeginExport
Tells Aperture to start the export process.
-shouldCancelExport
Tells Aperture to cancel the export process.
-shouldFinishExport
Signals that Aperture can deallocate the plug-in.
-thumbnailForImageAtIndex:size:
(Version 2) Returns a small version of the specified image.
-window
Provides reference to frontmost window.

addCustomMetadataKeyValues:toImageAtIndex:


Adds custom metadata to a Version image.

- (void)addCustomMetadataKeyValues:(NSDictionary *)customMetadata toImageAtIndex:(unsigned)index; 
Parameters
customMetadata
An NSDictionary containing NSString key-value pairs representing the custom metadata.
index
The index of the target image.
Discussion

This method has no effect if called on a Master image.


addHierarchicalKeywords:toImageAtIndex:


Adds keyword hierarchies to a Version image.

- (void)addHierarchicalKeywords:(NSArray *)hierarchicalKeywords toImageAtIndex:(unsigned)index; 
Parameters
hierarchicalKeywords
This is an NSArray of NSArray objects, each containing NSString objects representing the hierarchy of a single keyword. For each NSArray, the NSString at index 0 is the keyword, with the item at index 1 being its parent, and so on.
index
The index of the target image.
Discussion

This method has no effect if called on a Master image.


addKeywords:toImageAtIndex:


Adds keywords to a Version image.

- (void)addKeywords:(NSArray *)keywords toImageAtIndex:(unsigned)index; 
Parameters
keywords
An NSArray of NSString objects representing the keywords to add.
index
The index of the target image.
Discussion

This method has no effect if called on a Master image.


imageCount


Returns the number of images the user wants to export.

- (unsigned)imageCount; 
Return Value

An unsigned integer indicating the number of images the user wants to export.

Discussion

Note that the image count may change if the user is allowed to choose between Master and Version export (see -allowsMasterExport). If the user switches, the Aperture export manager sends the plug-in a message (see -exportManagerExportTypeDidChange). The plug-in should then call -imageCount to make sure the number of images to export is correct.


isMasterExport


Indicates whether Aperture is exporting Master or Version images.

- (BOOL)isMasterExport; 
Return Value

Returns YES if Aperture is exporting Master images. Returns NO if Aperture is exporting Version images.


propertiesForImageAtIndex:


Returns a dictionary containing all the properties for an image.

- (NSDictionary *)propertiesForImageAtIndex:(unsigned)index; 
Parameters
index
The index of the target image.
Return Value

A dictionary containing the available properties for the specified image. The returned dictionary contains a thumbnail image whose size is kExportThumbnailSizeMini.

Discussion

For Master images, the returned properties come from the original import properties. These include properties from the image file and camera as well as any IPTC values the user added on import. The keys contained in the properties dictionary are defined at the beginning of this header file.


propertiesWithoutThumbnailForImageAtIndex:


Returns a dictionary containing all the properties for an image, but without a value for the kExportKeyThumbnailImage key.

- (NSDictionary *)propertiesWithoutThumbnailForImageAtIndex:(unsigned)index; 
Parameters
index
The index of the target image.
Return Value

A dictionary containing all the available properties for the specified image, except a thumbnail. You may obtain a thumbnail separately using the -thumbnailImageForImageAtIndex:size: method.

Discussion

For Master images, the returned properties come from the original import properties. These include properties from the image file and camera as well as any IPTC values the user added on import. The keys contained in the properties dictionary are defined at the beginning of this header file. This method is available in version 2 of the ApertureExportManager protocol in Aperture 1.5.1. Your plug-in must specify support for this version in its Info.plist, and you can ask the export manager which version it is by calling -conformsToProtocol:version: (defined in the PROAPIObject PROAPIAccessing.h)


selectedExportPresetDictionary


Returns the key-value pairs defining the currently-selected export presets for a Version export.

- (NSDictionary *)selectedExportPresetDictionary; 
Return Value

A pointer to an NSDictionary structure.

Discussion

Returns the key-value pairs defining the currently-selected export presets for a Version export. Returns nil if the user is exporting a Master image.


shouldBeginExport


Tells Aperture to start the export process.

- (void)shouldBeginExport; 
Discussion

Calling this method causes Aperture to determine the destination path for export, confirm the images to export, put away the export window, and begin the export process. A plug-in should call this method only in response to -exportManagerShouldBeginExport and after performing any necessary validations, network checks, and so on.


shouldCancelExport


Tells Aperture to cancel the export process.

- (void)shouldCancelExport; 
Discussion

The plug-in can call this method at any time to have Aperture put away all export windows, stop the export process, and return the user to the workspace. Additionally, if Aperture calls -exportManagerShouldCancelExport, Aperture then halts all activity and waits for the plug-in to call this method.


shouldFinishExport


Signals that Aperture can deallocate the plug-in.

- (void)shouldFinishExport; 
Discussion

When Aperture finishes processing the export image data, it calls -exportManagerDidFinishExport. It continues to ask the plug-in for progress updates until the plug-in calls this method. Once this happens, Aperture closes the export modal window and deallocates the plug-in.


thumbnailForImageAtIndex:size:


(Version 2) Returns a small version of the specified image.

- (NSImage *)thumbnailForImageAtIndex:(unsigned)index size:(ApertureExportThumbnailSize)size; 
Parameters
index
The index of the target image
size
The constant indicating how large of a thumbnail image Aperture should return.
Return Value

An image object containing the thumbnail data

Discussion

New in version 2 of the ApertureExportManager protocol. Supported by Aperture 1.5.1 and later. For master images, this method may return nil. You may check if the Aperture your plug-in is running in supports version 2 by using the PROAPIAccessing protocol.


window


Provides reference to frontmost window.

- (id)window; 
Return Value

A reference to the current frontmost window.

Discussion

Until the plug-in calls -shouldBeginExport, the reference points to the export window. After the export process begins, the reference points to the progress sheet or to Aperture's main window.




Did this document help you?
Yes: Tell us what works for you.

It’s good, but: Report typos, inaccuracies, and so forth.

It wasn’t helpful: Tell us what would have helped.
Last Updated: 2008-04-18