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

#include <ICatalog.h>

Inheritance diagram for ICatalog:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_ICATALOG }
 
enum  LibVersion { CURRENT = 0, ANNABETA = 1, ANNARELEASE = 2 }
 

Public Member Functions

virtual void Init ()=0
 
virtual UID NewLibAsset ()=0
 
virtual ILibraryAssetAcquire (const LibraryAssetID &id)=0
 
virtual bool16 Remove (const UID id)=0
 
virtual UID GetNthAssetUID (int32 pos)=0
 
virtual int32 GetAssetCount ()=0
 
virtual bool16 IsWritable ()=0
 
virtual void SetReadOnly (bool16 flag)=0
 
virtual void Close ()=0
 
virtual IDataBase::DBResultCode Save ()=0
 
virtual void SetPreferences (const PMString &propKey, const PMString &propValue)=0
 
virtual void GetPreferences (const PMString &propKey, PMString &propValue) const =0
 
virtual K2Vector< UID > & GetSearchResults ()=0
 
virtual void SetUseSubsetSearch (bool16 useSubsetSearch=kTrue)=0
 
virtual bool16 GetUseSubsetSearch ()=0
 
virtual void InitializeSearchResults (int16 booleanOp, PropUIDList *fromList=nil)=0
 
virtual int16 Search (IProperty *property, int32 whichComparator, IPMUnknown *value, int16 booleanOp, PropUIDList *fromList=nil)
 
virtual LibVersion GetLibraryVersion ()=0
 
virtual void SetLibraryVersion (LibVersion libV)=0
 
virtual bool16 IsValid (const LibraryAssetID &id) const =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 access to assets in an InDesign library.

Member Function Documentation

virtual ILibraryAsset* ICatalog::Acquire (const LibraryAssetIDid)
pure virtual

Acquire access to an asset.

Parameters
idIN LibraryAssetID of the asset desired
Returns
interface pointer to the asset's ILibraryAsset interface
virtual void ICatalog::Close ()
pure virtual

Close the catalog.

virtual int32 ICatalog::GetAssetCount ()
pure virtual

Get the number of assets.

Returns
the number of assets in the catalog
virtual LibVersion ICatalog::GetLibraryVersion ()
pure virtual

For internal use only. Used for identifying older-version libraries.

virtual UID ICatalog::GetNthAssetUID (int32 pos)
pure virtual

Get the UID of an asset.

Parameters
posIN the index of the asset
Returns
UID value for found asset
virtual void ICatalog::GetPreferences (const PMStringpropKey,
PMStringpropValue 
) const
pure virtual

Get a catalog preference key/value pair.

Parameters
propKeyIN the key
propValueIN the value
virtual K2Vector<UID>& ICatalog::GetSearchResults ()
pure virtual

Return the results from the most recent property search.

Returns
K2Vector of UIDs for the assets found.
virtual bool16 ICatalog::GetUseSubsetSearch ()
pure virtual

Get whether a subset property search is being used.

Returns
kTrue for a subset search.
virtual void ICatalog::Init ()
pure virtual

Initializes the catalog. Call this after creating a new catalog.

virtual void ICatalog::InitializeSearchResults (int16 booleanOp,
PropUIDListfromList = nil 
)
pure virtual

Initialize a property search.

Parameters
booleanOpIN the boolean operation to use in the search – either ILibraryComplexFilterData::Conjunction_And or ILibraryComplexFilterData::Conjunction_Or
fromListIN property list for search if other than all items; use nil for all items
virtual bool16 ICatalog::IsValid (const LibraryAssetIDid) const
pure virtual

Tell whether an asset with the given LibraryAssetID exists.

Parameters
idIN the LibraryAssetID of the asset
Returns
kTrue for valid, kFalse otherwise
virtual bool16 ICatalog::IsWritable ()
pure virtual

Get whether the catalog is writable.

Returns
whether the catalog is writable.
virtual UID ICatalog::NewLibAsset ()
pure virtual

Create a new asset in the catalog file.

Returns
a UID value to be passed to CreateLibraryAssetID for construction of a LibraryAssetID
virtual bool16 ICatalog::Remove (const UID id)
pure virtual

Remove an asset from the catalog.

Parameters
idIN the UID of the asset to remove
Returns
kFalse for asset not found; kTrue otherwise
virtual IDataBase::DBResultCode ICatalog::Save ()
pure virtual

Save the catalog.

Returns
result code from save operation
virtual int16 ICatalog::Search (IPropertyproperty,
int32 whichComparator,
IPMUnknownvalue,
int16 booleanOp,
PropUIDListfromList = nil 
)
inlinevirtual

Perform a property search.

Parameters
propertyIN property a pointer to the property
whichComparatorIN the comparator index for the property
valueIN interface pointer to the value to compare
booleanOpIN the boolean operation to use in the search – either ILibraryComplexFilterData::Conjunction_And or ILibraryComplexFilterData::Conjunction_Or
fromListIN property list for search; may be nil if searching all property items
Returns
always returns zero
virtual void ICatalog::SetLibraryVersion (LibVersion libV)
pure virtual

For internal use only. Used for identifying older-version libraries.

virtual void ICatalog::SetPreferences (const PMStringpropKey,
const PMStringpropValue 
)
pure virtual

Set a catalog preference key/value pair.

Parameters
propKeyIN the key
propValueIN the value
virtual void ICatalog::SetReadOnly (bool16 flag)
pure virtual

Set the read-only status of the catalog.

Parameters
flagIN kTrue for set to read-only, kFalse for writable
virtual void ICatalog::SetUseSubsetSearch (bool16 useSubsetSearch = kTrue)
pure virtual

Set whether to use a subset property search.

Parameters
useSubsetSearchIN kTrue for subset search; kFalse otherwise