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

Public Types | |
| enum | { kDefaultIID = IID_IDATAEXCHANGEHANDLERFLAVORHELPER } |
Public Member Functions | |
| virtual DataExchange::eHelperType | GetHelperType () const =0 |
| virtual DataExchangeResponse | CanConvertExternalFlavor (const IDataExchangeHandler *, ExternalPMFlavor fromWhichFlavor) const =0 |
| virtual DataExchangeResponse | CanProduceExternalFlavor (const IDataExchangeHandler *, ExternalPMFlavor toWhichFlavor) const =0 |
| virtual void | AddPromisesForExternalize (IDataExchangeHandler *, const IPMDataObject *whichItem, OrderedPromiseList &orderedPromiseList)=0 |
| virtual void | AddInternalizeableFlavorsToList (const IDataExchangeHandler *, OrderedFlavorList &flavorList) const =0 |
| virtual void | AddExternalizeableFlavorsToList (const IDataExchangeHandler *, OrderedFlavorList &flavorList) const =0 |
| virtual ErrorCode | Externalize (IDataExchangeHandler *, IPMDataObject *whichItem, ExternalPMFlavor toWhichFlavor, IPMStream *s)=0 |
| virtual ErrorCode | Internalize (IDataExchangeHandler *, IPMDataObject *whichItem, ExternalPMFlavor fromWhichFlavor, IPMStream *s)=0 |
| virtual void | ReorderFlavors (const IDataExchangeHandler *, OrderedFlavorList &) |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
The IDataExchangeHandlerFlavorHelper interface provides extensibility for data exchange handlers.
Data exchange handler extensibility requires the handler be derived from CDataExchangeHandler_Extensible. Create a new boss with an IDataExchangeHandlerFlavorHelper implementation combined with a IK2ServiceProvider implementation that corresponds to the service ID defined by the extensible handler. When the framework asks an extensible data exchange handler if it can internalize (or externalize) data, the extensible handler then asks each of it's flavor helpers if they could perform the conversion. One helper is chosen based on it's willingness to perform the conversion, and in the case of multiple helpers, prioritized by helper type and the priority of the flavor they propose to conversion. The extensible handler then forwards the subsequent method calls that occur during the conversion to the chosen helper.
| pure virtual |
Get the external flavors that can be produced in Externalize Flavors should be added to the end of the list, in order by quality of the conversion (highest quality first). The helper function AppendFlavorIfUnique should be used.
| handler | IN handler this helper is associated with |
| flavorList | IN/OUT add flavors to the end of list |
| pure virtual |
Get the external flavors that can be converted during Internalize Flavors should be added to the end of the list, in order by quality of the conversion (highest quality first). The helper function AppendFlavorIfUnique should be used.
| handler | IN handler this helper is associated with |
| flavorList | IN/OUT add flavors to the end of list |
| pure virtual |
Add promises for flavors that can be produced externalization promises (for clipboard , drag/drop, services, etc). Promised should be added to the end of the list, in order by quality of the conversion. Override handlers may also reorder exiting items and/or remove previously added promises at this time. The helper function AppendPromiseIfUnique should be used.
| handler | IN handler this helper is associated with |
| whichItem | IN item the flavors will be added to (not not here) |
| orderedPromiseList | IN/OUT add promises to the end of list |
| pure virtual |
Can this helper convert the given external flavor to the handlers native type?
| handler | IN handler this helper is associated with |
| fromWhichFlavor | IN the external flavor to be converted |
| pure virtual |
Can this helper produce the given external flavor from the handlers native type?
| handler | IN handler this helper is associated with |
| toWhichFlavor | IN the external flavor to be produced |
| pure virtual |
Externalize the contents into the given flavor on a stream (for clipboard and drag/drop).
| handler | IN handler this helper is associated with |
| whichItem | IN item the data is associated with |
| toWhichFlavor | IN the type of flavor data to write on the stream |
| s | IN stream on which to write the data |
| pure virtual |
Return the type or priority of the helper. This is used to resolve conflicts that can arise when more than one handler flavor helper is capable of responding to a request. The presence of multiple helpers is not a conflict, a conflict would arise when one helper wants to replace or augment what another helper already does.
| pure virtual |
Internalize the contents of a stream as the given flavor (for clipboard or drag/drop).
| handler | IN handler this helper is associated with |
| whichItem | IN item the data is associated with |
| fromWhichFlavor | IN the type of flavor data in on the stream |
| s | IN stream from which to read the data |
| inlinevirtual |
kOverrideFlavorPriorityHelpers Only: Prior to Internalizing, these helpers are given an opportunity to reorder the available flavors advertised by the data exchange handler this helper is associated with. Reordering should be limited to reordering similar flavors (ie. to put PDF before PICT, or RFT before TEXT).
| handler | IN handler this helper is associated with |
| flavorList | IN/OUT flavorlist to manipulate |