InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IINXManager Class Referenceabstract

#include <IINXManager.h>

Inheritance diagram for IINXManager:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IINXMANAGER }
 
typedef IINXErrorHandler *(* CreateINXErrorHandler )()
 

Public Member Functions

virtual ErrorCode ExportINX (const IDOMElement::ElementList &roots, IINXExportPolicy *policy, IPMStream *stream, UIFlags uiFlags=kFullUI)=0
 
virtual void BeginExportSession ()=0
 
virtual void EndExportSession ()=0
 
virtual ErrorCode ValidateINX (IPMStream *stream, IINXImportValidation *validation=nil)=0
 
virtual ErrorCode ImportINX (IDOMElement *root, IINXImportPolicy *policy, IPMStream *stream, const PMString *progressBarTitle=nil, UIFlags uiFlags=kFullUI, IDOMElement **object=nil)=0
 
virtual void BeginImportSession ()=0
 
virtual void EndImportSession ()=0
 
virtual void SetINXErrorHandler (CreateINXErrorHandler handlerOwner)=0
 
virtual IINXErrorHandlerGetINXErrorHandler (CreateINXErrorHandler *fnPointer=nil) const =0
 
virtual void ImportHelperAddCacheEntry (const PMString &inKey, const PMString &inValue)=0
 
virtual PMString ImportHelperGetCacheEntry (const PMString &inKey)=0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Detailed Description

Provides service for INX import and export.

This interface is the only access point for core INX functionality (both import and export).

Member Typedef Documentation

typedef IINXErrorHandler*(* IINXManager::CreateINXErrorHandler)()

Callback function used for INXError Handling. See and below.

Member Function Documentation

virtual void IINXManager::BeginExportSession ()
pure virtual

Begin multiple INX export session. Using multiple export session can improve performance if you need to export multiple snippet based files (snippet, incopy story et al). Code assumes that document is not changed during inx export operation. All export session should use the same INXOptions.

virtual void IINXManager::BeginImportSession ()
pure virtual

Begin multiple INX import session. Using multiple import session can improve performance if you need to import multiple snippet files. Code assumes that document is not changed except inx operation. All inx file should have the same scripting context and inx options. Otherwise, you won't get any performance improvement.

virtual void IINXManager::EndExportSession ()
pure virtual

End multiple INX export session. Must be paired with BeginExportSession

virtual void IINXManager::EndImportSession ()
pure virtual

End multiple INX import session. Must be paired with BeginImportSession.

virtual ErrorCode IINXManager::ExportINX (const IDOMElement::ElementListroots,
IINXExportPolicy * policy,
IPMStreamstream,
UIFlags uiFlags = kFullUI 
)
pure virtual

Writes the INX representation of a set of rooted object trees to a stream. Callback allows the client to guide the export operation.

Parameters
rootsIN A list of root objects to be exported
policyIN Pointer to an Export Policy object, or nil.
streamIN The stream to write info
encodingIN Output stream encoding type (UTF8, UTF16, etc.)
uiFlagsIN UI Flags. Determines whether dialog boxes are displayed, etc.
Returns
kSuccess, kCancel if aborted by policy or user, or an error code kFailure
See Also
INXOptions.h
IINXExportPolicy.h
virtual IINXErrorHandler* IINXManager::GetINXErrorHandler (CreateINXErrorHandlerfnPointer = nil) const
pure virtual

Get installed INX error handler.

Parameters
fnPointerOUT Contains the CreateINXErrorHandler callback reference if one is installed, nil otherwise.
Returns
pointer to installed inx error handler. nil if no error handler installed
virtual ErrorCode IINXManager::ImportINX (IDOMElementroot,
IINXImportPolicy * policy,
IPMStreamstream,
const PMStringprogressBarTitle = nil,
UIFlags uiFlags = kFullUI,
IDOMElement ** object = nil 
)
pure virtual

Construct a DOM tree from information found in an INX file.

Parameters
parentIN An object that will serve as the parent of the imported DOM tree.
policyIN A pointer to an import policy object, or nil.
streamIN The input stream containing INX data.
progressBarTitleIN A pointer to a PMString object to be used as the title of the progress bar, or nil.
uiFlagsIN How to handle UI events during the import operation.
objectIN A pointer to an interface pointer that will contain the root object of the imported DOM tree.
Returns
kSuccess or an error code.
See Also
IINXImportPolicy.h
virtual void IINXManager::SetINXErrorHandler (CreateINXErrorHandler handlerOwner)
pure virtual

Installs a callback handler function that will be called to create the INX Error Handler. The callback function will be called for every IDML export/import that happens in a different thread. Note that the ownership of releasing the INXErrorHandler object created by the CreateINXErrorHandler lies with the INXManager and not with the client.

Parameters
handlerOwnerIN The callback handler to be installed. nil to remove existing callback handler.
See Also
IINXErrorHandler.h
virtual ErrorCode IINXManager::ValidateINX (IPMStreamstream,
IINXImportValidationvalidation = nil 
)
pure virtual

Construct a DOM tree from information found in an INX file.

Parameters
streamIN The input stream containing INX data.
validationIN A pointer to an import validation object, or nil
Returns
kSuccess or an error code.
See Also
IINXImportValidation.h