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

#include <IContentMgr.h>

Inheritance diagram for IContentMgr:
IPMUnknown

Classes

struct  PluginInfo
 

Public Types

enum  { kDefaultIID = IID_ICONTENTMGR }
 
typedef K2Vector< PluginIDPluginIDList
 

Public Member Functions

virtual ErrorCode GetStatus () const =0
 
virtual bool16 AlertMissingPlugins (const IDFile *sourcePub, const PluginIDList &alertOnList, std::string assetRef="")=0
 
virtual void GatherMissingPlugins (PluginIDList *alertOnList)=0
 
virtual void CheckForMissingPlugins (const K2Vector< PluginID > *removedPlugins=nil, const K2Vector< PluginID > *ignoredPlugins=nil)=0
 
virtual void FixupMissingPlugins (IDocument *doc, const K2Vector< PluginID > &list)=0
 
virtual bool16 IgnoreAllMissingPlugins () const =0
 
virtual void SetIgnoreAllMissingPlugins ()=0
 
virtual void MarkAllPluginsUntouched ()=0
 
virtual void RemoveUntouchedPlugins ()=0
 
virtual void AddTag (ImplementationID newTag, ClassID context)=0
 
virtual void AddClass (ClassID clsID)=0
 
virtual int32 GetMissingPluginCount () const =0
 
virtual PluginID GetNthMissingPlugin (int32 n, PluginInfo *info) const =0
 
virtual void GetMissingPlugins (K2Vector< PluginID > &list) const =0
 
virtual int32 GetPluginCount () const =0
 
virtual PluginID GetFirstPlugin (PluginInfo *info=nil) const =0
 
virtual PluginID GetNextPlugin (PluginID plugin, PluginInfo *info=nil) const =0
 
virtual bool16 GetPluginInfo (PluginID plugin, PluginInfo *info) const =0
 
virtual bool16 IsMissingCriticalPlugins () const =0
 
virtual bool16 IsMissingDefaultPlugins () const =0
 
virtual ErrorCode GetPluginForClass (ClassID clsID, PluginID &plugin) const =0
 
virtual ErrorCode GetPluginForImplementation (ImplementationID implID, PluginID &plugin) const =0
 
virtual void SetCheckUIDsOnNextOpen (bool16 doIt)=0
 
virtual bool16 GetCheckUIDsOnNextOpen () const =0
 
virtual void VerifyPluginFormatNumber (PluginID plugin, const FormatID &format)=0
 
virtual void RemovePlugin (PluginID plugin)=0
 
virtual void IgnorePlugin (PluginID plugin)=0
 
virtual void ProcessDeferredContent ()=0
 
virtual void Clear ()=0
 
virtual const PMStringGetApplicationName () const =0
 
virtual void SetApplicationName (const PMString &newName)=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

Manages all content added to the document. Keeps track of what classes and tags are in the document, what plug-ins added them, etc.

Member Function Documentation

virtual void IContentMgr::AddClass (ClassID clsID)
pure virtual

Declares that the tag has been written into the document. This is usually called from the database when a UID is allocated.

Parameters
clsID- The classID to be added.
virtual void IContentMgr::AddTag (ImplementationID newTag,
ClassID context 
)
pure virtual

Declares that the tag has been written into the document. This is usually called from IPMPersist at the time the tag is first written out

Parameters
newTag- The implementation ID to add
context- The class that owns the tag being written
virtual bool16 IContentMgr::AlertMissingPlugins (const IDFilesourcePub,
const PluginIDListalertOnList,
std::string assetRef = "" 
)
pure virtual

If there are plug-ins missing, put up an alert asking user if they want to continue with the open. FOR INTERNAL USE ONLY

Parameters
*sourcePub- The file we are checking the status on
alertOnList- the list of the plug-ins to show in the alert
assetRef- assetRef of the cloud doc we are checking status on
Returns
- kTrue if the open should be continued (or if no plug-ins are missing) otherwise false.
virtual void IContentMgr::CheckForMissingPlugins (const K2Vector< PluginID > * removedPlugins = nil,
const K2Vector< PluginID > * ignoredPlugins = nil 
)
pure virtual

Figure out if document contains plug-ins that were missing last time document was edited.

Parameters
*removedPlugins- Plug-ins in this list will be removed by the current conversion
*ignoredPlugins- Plug-ins in this list will be marked as ignorable by the current conversion
virtual void IContentMgr::Clear ()
pure virtual

Clear internal data for this class

virtual void IContentMgr::FixupMissingPlugins (IDocumentdoc,
const K2Vector< PluginID > & list 
)
pure virtual

If a missing plugin is now present, call it's FixUpData function to inform it. Mark the plugin as no longer missing; this information will be saved with the document if the document is saved.

Parameters
*doc- The document we are fixing plug-ins in
&list- The list of plug-ins last known to be missing.
virtual const PMString& IContentMgr::GetApplicationName () const
pure virtual

Returns the name of the application that the file was created in. When a file is first opened, the application name of the file may be different than the application name of the running program while conversion is taking place. Once the file has been converted, the content mgr application name and the running application will always be the same.

Returns
- A string containing the name of the application
virtual bool16 IContentMgr::GetCheckUIDsOnNextOpen () const
pure virtual

This method along with SetCheckUIDsOnNextOpen allows support for document recovery.

Returns
- kTrue means that we should check UIDs next time we open this file
See Also
SetCheckUIDsOnNextOpen
virtual PluginID IContentMgr::GetFirstPlugin (PluginInfoinfo = nil) const
pure virtual

Used in cooperation with GetNextPlugin to iterate through the set of plug-ins

Parameters
*info- This optional parameter will be filled with the PluginInfo for the returned plug-in
Returns
- The iD of the first plugin
See Also
GetNextPlugin
virtual int32 IContentMgr::GetMissingPluginCount () const
pure virtual

Returns the number of missign plug-ins

Returns
- The number of missing plug-ins
virtual void IContentMgr::GetMissingPlugins (K2Vector< PluginID > & list) const
pure virtual

Returns a list of all of the missing plugins

Parameters
&list- The list of PluginIDs that are missing
virtual PluginID IContentMgr::GetNextPlugin (PluginID plugin,
PluginInfoinfo = nil 
) const
pure virtual

Used in cooperation with GetFirstPlugin to iterate through the set of plug-ins

Parameters
plugin- The plug-in in the iterator you already have. (The next plugin will be returned)
*info- This optional parameter will be filled with the PluginInfo for the returned plug-in
Returns
- The iD of the next plugin (kInvalidPlugin if at the end of the list)
See Also
GetFirstPlugin
virtual PluginID IContentMgr::GetNthMissingPlugin (int32 n,
PluginInfoinfo 
) const
pure virtual
Returns the ID of the Nth missing plug-in

`

Parameters
n- The index value of the plug-in you want
*info- This optional parameter will be filled with the PluginInfo for the returned plug-in
Returns
- The iD of the plugin
virtual int32 IContentMgr::GetPluginCount () const
pure virtual

returns the number of plugins

virtual ErrorCode IContentMgr::GetPluginForClass (ClassID clsID,
PluginIDplugin 
) const
pure virtual

Find the ID of the plug-in that owned the specified class when it was written to the database

Parameters
clsID- The class that you are looking for a plug-in for
&plugin- Will be filled with the appropriate PluginID
Returns
- Returns an error code if an answer cannot be found, kSuccess otherwise.
virtual ErrorCode IContentMgr::GetPluginForImplementation (ImplementationID implID,
PluginIDplugin 
) const
pure virtual

Find the ID of the plug-in that owned the specified implementation when it was written to the database.

Parameters
implID- The Implementation that you are looking for a plugin for
&plugin- Will be filled with the appropriate PluginID
Returns
- Returns an error code if an answer cannot be found, kSuccess otherwise.
virtual bool16 IContentMgr::GetPluginInfo (PluginID plugin,
PluginInfoinfo 
) const
pure virtual

Returns information about a plug-in

Parameters
plugin- Plug-in for which you want information
*info- Will be filled with the plug-ins information
Returns
- kTrue if the plug-in was found, kFalse if not
virtual ErrorCode IContentMgr::GetStatus () const
pure virtual

–— Conversion of the content manager bybasses the regular conversion manager because the content manager is required for conversion. This means that conversion must happen from the its ReadWrite method, which can be triggered either by instantiating the interface in the case of a read, or by flushing the interface from the object model cache in the case of a write. We must be able to convert the content manager from older versions to the current version. The following methods deal with interagating the content manager for status of conversions.Return the current Content Manager status. It either failed or succeeded while reading its persistent state or while trying to convert state on output.

Returns
- kSuccess = succeeded
virtual bool16 IContentMgr::IgnoreAllMissingPlugins () const
pure virtual

Returns true if warning for missing plug-ins is turned off for this document. For internal use only.

virtual void IContentMgr::IgnorePlugin (PluginID plugin)
pure virtual

Set the plugin's priority to "Ignore".

Parameters
plugin- The PluginID to be changed.
virtual bool16 IContentMgr::IsMissingCriticalPlugins () const
pure virtual

Are there any missing plug-ins that are critical?

Returns
- kTrue if there are critical plug-ins missing
virtual bool16 IContentMgr::IsMissingDefaultPlugins () const
pure virtual

Are there any missing plug-ins that are default plug-ins?

Returns
- kTrue if there are default plug-ins missing
virtual void IContentMgr::MarkAllPluginsUntouched ()
pure virtual

Mark all the Content Manager's plugins as "untouched"

virtual void IContentMgr::ProcessDeferredContent ()
pure virtual

Add plug-in content to the document

virtual void IContentMgr::RemovePlugin (PluginID plugin)
pure virtual

Remove all information associated with the caller's plugin.

Parameters
plugin- The PluginID which you want to remove
virtual void IContentMgr::RemoveUntouchedPlugins ()
pure virtual

Used by the Conversion Manager to strip unused plugins from the list

virtual void IContentMgr::SetApplicationName (const PMStringnewName)
pure virtual

For internal Use only! Set the name of the application

Parameters
&newName- The new name for the app to use
virtual void IContentMgr::SetCheckUIDsOnNextOpen (bool16 doIt)
pure virtual

This method along with GetCheckUIDsOnNextOpen allows support for document recovery. Call this method to indicate that UIDs should be checked next time this document is opened.

Parameters
doIt- kTrue will cause the UIDs to be checked next time this file is opened.
See Also
GetCheckUIDsOnNextOpen
virtual void IContentMgr::SetIgnoreAllMissingPlugins ()
pure virtual

Allows the client to set whether or not we should warn on missing plug-in data

virtual void IContentMgr::VerifyPluginFormatNumber (PluginID plugin,
const FormatIDformat 
)
pure virtual

Update the plig-in's format number, if it changed

Parameters
plugin- The plugin ID we are currently dealing with
&format- The most recent format number for the plugin