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

Public Types | |
| enum | { kDefaultIID = IID_ICONVERSIONMGR } |
| enum | ConversionStatus { kUnknownConvert, kDontConvert, kMustConvert, kCantConvert } |
Public Member Functions | |
| virtual ConversionStatus | GetStatus (IContentMgr *contentMgr)=0 |
| virtual void | GetRemovedPlugins (K2Vector< PluginID > &list)=0 |
| virtual void | GetIgnoredPlugins (K2Vector< PluginID > &list)=0 |
| virtual void | ConvertDocument (IDataBase *dbToConvert)=0 |
| virtual void | Open (IContentMgr *contentMgr)=0 |
| virtual void | Close ()=0 |
| virtual ClassID | ConvertClass (ClassID inClass, ImplementationID parentContext, IPMStream *inStream, IPMStream *outStream, int32 length)=0 |
| virtual bool16 | CopyClassData (ClassID inClass, const VersionID &version, bool16 isEmbedded, uint32 inLength, IPMStream *inStream, IPMStream *outStream)=0 |
| virtual ImplementationID | ConvertTag (ImplementationID inTag, ClassID parentContext, IPMStream *inStream, IPMStream *outStream, int32 length)=0 |
| virtual bool16 | CopyTagData (ImplementationID inImpl, const VersionID &version, uint32 inLength, IPMStream *inStream, IPMStream *outStream)=0 |
| virtual IDataBase * | GetConvertingDataBase ()=0 |
| virtual UID | GetConvertingUID ()=0 |
| virtual int32 | CountConversionFailures ()=0 |
| virtual PluginID | GetNthFailedConversion (int32 n)=0 |
| virtual PluginID | GetSourcePluginIDForClass (ClassID id)=0 |
| virtual PluginID | GetSourcePluginIDForImplementation (ImplementationID id)=0 |
| virtual bool16 | GetSourcePluginFormatNumber (PluginID plugin, FormatID &format) const =0 |
| virtual bool16 | ReadSourceData (UID uid, ImplementationID implID, const FormatID &format, IPMStream *outStream)=0 |
| virtual PluginID | GetTargetPluginIDForClass (ClassID id)=0 |
| virtual PluginID | GetTargetPluginIDForImplementation (ImplementationID id)=0 |
| virtual bool16 | GetTargetPluginFormatNumber (PluginID plugin, FormatID &format)=0 |
| virtual void | RemoveClass (ClassID clsID)=0 |
| virtual void | RemoveImplementation (ImplementationID implID)=0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
IConversionMgr is the key interface in the binary database conversion process. Although it is public, you are unlikely to need to call it directly. Conversion is a complex process. The methods in this interface must be called in a particular context and in a particular order. Caution is advised.
Values returned by GetStatus()
| pure virtual |
Close the conversion session. Call this to complete a conversion session.
| pure virtual |
ConvertClass converts from the original format in the document to the current running format. No conversion is performed if the classID does not need conversion.
| inClass | IN ClassID of the data in the stream |
| parentContext | IN Containing context, or kInvalidImpl if it is in a UID |
| inStream | IN Stream containing data to be converted |
| outStream | IN Converted data is streamed out here |
| length | IN Number of bytes of incoming data |
| pure virtual |
Performs any neccessary conversion from the existing database format to the most recent format.
| dbToConvert | IN A pointer to the database to be converted. |
| pure virtual |
ConvertTag converts from the original format in the document to the current running format. No conversion is performed if the ImplementationID does not need conversion.
| inTag | IN ImplementationID of the data in the stream |
| parentContext | IN Containing context |
| inStream | IN Stream containing data to be converted |
| outStream | IN Converted data is streamed out here |
| length | IN Number of bytes of incoming data |
| pure virtual |
Copies a Class' data from the input to the output stream, converting embedded objects, if necessary.
| inClass | IN ClassID of the data in the stream |
| version | IN Version of the data |
| isEmbedded | IN kTrue if this data is embedded inside of another object |
| inLength | IN Number of bytes of incoming data |
| inStream | IN Stream containing data to be copied |
| outStream | IN Data is copied here |
| pure virtual |
Copies an Implementation's data from the input to the output stream, converting embedded objects, if necessary.
| inImpl | IN ImplementationID of the data in the stream |
| version | IN Version of the data |
| inLength | IN Number of bytes of incoming data |
| inStream | IN Stream containing data to be copied |
| outStream | IN Data is copied here |
| pure virtual |
Get the number of plugins that can't be converted.
| pure virtual |
Gets a pointer to the database that is currently being converted, or nil if there is no conversion session active.
| pure virtual |
Gets the UID of the object currently being converted, or kInvalidUID. Note that this will return the enclosing UID even if the object currently being converted is an embedded object inside a UID.
This method must be called after GetStatus. It returns a list of plugins that would have their priority reset to "Ignore" by the conversion if ConvertDocument is called.
| list | OUT A list of the IDs of plugins that would be ignored. |
| pure virtual |
Get the n-th plugin that can't be converted.
| n | IN Which plugin |
This method must be called after GetStatus. It returns a list of plugins that would be removed by the conversion if ConvertDocument is called.
| list | OUT A list of the IDs of plugins that would be removed. |
| pure virtual |
Get the source format number for a particular plugin.
| plugin | IN The plugin |
| format | OUT The source format number |
Determine which plugin supplied a particular class in the source document.
| id | IN The class ID |
| pure virtual |
Determine which plugin supplied a particular implementation in the source document.
| id | IN The implementation ID |
| pure virtual |
This method is used to determine whether conversion is necessary and possible. Each plug-in's source format number can be found in the document's Content Manager.
| contentMgr | IN The Content Manager associated with the database to be checked. |
| pure virtual |
Get the target format number for a particular plugin.
| plugin | IN The plugin |
| format | OUT The target format number |
Determine which plugin will supply a particular class in the target document.
| id | IN The class ID |
| pure virtual |
Determine which plugin will supply a particular implementation in the target document.
| id | IN The implementation ID |
| pure virtual |
Open a session on the conversion manager. Compiles information about what data needs to be converted.
| contentMgr | IN The Content Manager associated with the database to be checked. |
| pure virtual |
Fill a stream with an object's data as it existed prior to the start of conversion.
| uid | IN The object's UID |
| implID | IN Which implementation |
| format | IN Which format |
| outStream | IN The stream that will receive the data |
| pure virtual |
Notify the Conversion Manager that a Class has been completely removed from the database during Phase Two conversion. NOTE: Removal is normally done during Phase One conversion. This method is for unusual circumstances.
| clsID | IN The class that was removed |
| pure virtual |
Notify the Conversion Manager that an Implementation has been completely removed from the database during Phase Two conversion. NOTE: Removal is normally done during Phase One conversion. This method is for unusual circumstances.
| implID | IN The implementation that was removed |