![]() | InDesign SDK 20.5 |
#include <ISaveAssetContent.h>

Public Types | |
| enum | { kDefaultIID = IID_ISAVEASSETCONTENT } |
Public Member Functions | |
| virtual ErrorCode | Do (UIDRef assetRef, const IDFile &destination)=0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
This is a call-back interface that is responsible for saving (writing) asset content. It may be used by IAMServiceProvider::enCheckIn services to assure that an asset's model changes are applied as part of the check in. For example, an ISaveAssetContent implementation for stories would export a story page item. Similarly, an implementation for InDesign documents would write the document to an indd file. The ISaveAssetContent hook is useful for complicated checkin rules that involve displaying UI with a Cancel option. Thus, should the user cancel the operation, the checkin can be aborted without the unwanted side-effect writing the content.
To enable this callback during the enCheckIn service, add this interface to the service boss.
Example:
The following boss checks in an InDesign document to Version Cue:
Class
{
kVCCheckInServiceBoss,
kInvalidClass,
{
IID_IAMSERVICE, kVCCheckInServiceImpl,
IID_IAMSERVICEDATA, kAMServiceDataImpl,
IID_ISAVEASSETCONTENT, kSaveDocumentContentImpl, // Saves an indd document
}
},
Example:
The following boss checks in a LiveEdit story (does not use Version Cue):
Class
{
kICCheckInServiceBoss,
kInvalidClass,
{
IID_IAMSERVICE, kICCheckInServiceImpl,
IID_IAMSERVICEDATA, kAMServiceDataImpl,
IID_ISAVEASSETCONTENT, kSaveStoryContentImpl, // Exports a story
}
},Writes asset content to secure storage.
| assetRef | is the UIDRef of a boss that aggregates the IManageableAsset interface. |
| destination | is the IDFile to write the content data to. The file need not exist beforehand. For an asset that is not file-based, the file path may be empty. In this case, an implementation of this method must be able to determine the destination from the UIDRef alone. |