InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IPreflightProfileUtils Class Referenceabstract
Inheritance diagram for IPreflightProfileUtils:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IPREFLIGHTPROFILEUTILS }
 
enum  ProfileChangeFlags { kChangedNothing = 0, kChangedName = (1L<<0), kChangedDescription = (1L<<1), kChangedRules = (1L<<2) }
 

Public Member Functions

virtual IPreflightProfileDuplicateProfile (const IPreflightProfile *iSrcProfile, IDataBase *destDB) const =0
 
virtual void CopyProfileData (const IPreflightProfile *iSrcProfile, IPreflightProfile *iDstProfile, bool copyNamesOnly=kFalse, ProfileChangeFlags *pChanges=nil) const =0
 
virtual IPreflightProfileCreateEmptyProfile (IDataBase *db) const =0
 
virtual IPreflightProfileCreatePopulatedProfile (IDataBase *db) const =0
 
virtual void DestroyProfile (const UIDRef &profileRef) const =0
 
virtual ErrorCode ExportProfileAsINX (const IPreflightProfile *iProfile, const IDFile &exportFile) const =0
 
virtual IPreflightProfileImportProfileFromINX (const IDFile &sourceFile) const =0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Member Enumeration Documentation

Change flags. Note that these are bitfields.

Member Function Documentation

virtual void IPreflightProfileUtils::CopyProfileData (const IPreflightProfileiSrcProfile,
IPreflightProfileiDstProfile,
bool copyNamesOnly = kFalse,
ProfileChangeFlagspChanges = nil 
) const
pure virtual

Copy the profile data from one profile to another. You can choose whether to copy only names, or copy names and all other data (basically, rules).

Parameters
iSrcProfileis the profile from which the data is to be copied.
iDstProfileis the profile to which the data is to be copied.
copyNamesOnlyIN True to copy only the names in IPreflightProfile. False to do a complete, deep copy including rules.
pChangesOUT If not nil, receives the change flags. Note that this is somewhat expensive to calculate if there are rule settings involved (involves deep comparisons) so you should pass nil unless you really care to know this.
virtual IPreflightProfile* IPreflightProfileUtils::CreateEmptyProfile (IDataBasedb) const
pure virtual

Create a new preflight profile with no rules attached. Note that this does NOT automatically add the profile to the profile list for the database (if any).

Parameters
dbThe database in which to create the profile. If nil, the profile is in-memory.
virtual IPreflightProfile* IPreflightProfileUtils::CreatePopulatedProfile (IDataBasedb) const
pure virtual

Create a new preflight profile with a full set of rules attached. Note that this does NOT automatically add the profile to the profile list for the database (if any).

Parameters
dbThe database in which to create the profile. If nil, the profile is in-memory.
virtual void IPreflightProfileUtils::DestroyProfile (const UIDRefprofileRef) const
pure virtual

Destroy a profile, ie delete all its children (rules mainly) and then delete the UID. The UID of the profile and all child objects (eg rules) will no longer be valid, so be sure it has been fully removed from any references first!

Note that for in-memory profiles all the rules are also in memory so this method does not need to be called (since it takes a UIDRef you couldn't if you wanted to). Simply derefing the profile down to zero will auto-delete the children.

Parameters
profileRefThe profile you want to destroy.
virtual IPreflightProfile* IPreflightProfileUtils::DuplicateProfile (const IPreflightProfileiSrcProfile,
IDataBasedestDB 
) const
pure virtual

Create a new profile in the specified database and then copy all the parameters from the source profile (via CopyProfileData).

Note
The new profile will NOT be added to the destination database's profile manager.
If the destination datbase is nil the new profile will be an in-memory profile; it does NOT use the application level defaults doc. If you want to create a profile in the defaults doc you need to pass the database of the defaults doc!
Parameters
iSrcProfileis the profile from which the data is to be copied.
destDBis the destination database in which to create the profile. If nil the profile will be created in memory.
Returns
A refcounted IPreflightProfile interface on the new profile.
virtual ErrorCode IPreflightProfileUtils::ExportProfileAsINX (const IPreflightProfileiProfile,
const IDFileexportFile 
) const
pure virtual

Export the specified profile as an InDesign preflight profile file.

Parameters
iProfileis the preflight profile to export.
exporFileis the file spec to export the profile to.
Returns
kSuccess if no error; otherwise returs an error code.
virtual IPreflightProfile* IPreflightProfileUtils::ImportProfileFromINX (const IDFilesourceFile) const
pure virtual

Import the specified source InDesign preflight profile file.

Parameters
sourceFileis the file spec to import.
Returns
the profile created from this INX file. Returns nil if import failed.