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

#include <ILink.h>

Inheritance diagram for ILink:
IPMUnknownCPMUnknown< ILink >CusDtLnkImportLinkConverter

Public Types

enum  { kDefaultIID = IID_ILINK }
 
enum  LinkType { kImport = 0, kExport, kBidirectional, kChild }
 
enum  ResourceModificationState { kResourceModified = 0, kResourceUnmodified }
 
enum  ObjectModificationState { kObjectModified = 0, kObjectUnmodified }
 
enum  ImportPolicy { kNoAutoImport = 0, kImportOnModify }
 
enum  ExportPolicy { kNoAutoExport = 0, kExportOnModify, kExportOnClose, kExportOnSave }
 

Public Member Functions

virtual LinkType GetLinkType () const =0
 
virtual LinkClientID GetClientID () const =0
 
virtual UID GetResource () const =0
 
virtual void SetResource (UID resourceUID)=0
 
virtual ResourceModificationState GetResourceModificationState () const =0
 
virtual void SetResourceModificationState (ResourceModificationState modState)=0
 
virtual UID GetObject () const =0
 
virtual void SetObject (UID objectUID)=0
 
virtual ObjectModificationState GetObjectModificationState () const =0
 
virtual void SetObjectModificationState (ObjectModificationState modState)=0
 
virtual bool16 GetShowInUI () const =0
 
virtual void SetShowInUI (bool16 bShowInUI)=0
 
virtual bool16 GetCanEmbed () const =0
 
virtual void SetCanEmbed (bool16 bCanEmbed)=0
 
virtual bool16 GetCanUnembed () const =0
 
virtual void SetCanUnembed (bool16 bCanUnembed)=0
 
virtual bool16 GetCanPackage () const =0
 
virtual void SetCanPackage (bool16 bCanPackage)=0
 
virtual ImportPolicy GetImportPolicy () const =0
 
virtual void SetImportPolicy (ImportPolicy policy)=0
 
virtual WideString GetImportStamp () const =0
 
virtual IDTime GetImportModTime () const =0
 
virtual IDTime GetLastImportTime () const =0
 
virtual ExportPolicy GetExportPolicy () const =0
 
virtual void SetExportPolicy (ExportPolicy policy)=0
 
virtual IDTime GetLastExportTime () const =0
 
virtual void AddChildren (const UIDList &children)=0
 
virtual void DeleteChildren (const UIDList &children)=0
 
virtual uint32 GetChildren (UIDList &children) const =0
 
virtual uint32 GetNumChildren () const =0
 
virtual UID GetParent () const =0
 
virtual ErrorCode Update (bool bForceUpdate, UIFlags uiFlags, UID &linkUID)=0
 
virtual ErrorCode CopyAttributes (const UIDRef &linkRef)=0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Friends

class LinkManager
 
class ScrapLinkManager
 
class LinkScriptProvider
 

Detailed Description

Interface used to establish a relationship between an ILinkObject and an ILinkResource. \ Three types of object and resource relationships are supported: import, export and bi-directional (import/export). \ An import link updates the object when the resource changes. \ An export link updates the resource when the object changes. \ A bi-directional link updates the object when the resource changes, and updates the resource when the object changes. If both the resource and object change, it is the responsibility of the link object to determine how to handle the confict. For example, a naive approach may be to always update the resource from the object if both the resource and object have changed. \ \ There are also special links only used to track when a resource's modification state changes. These links do not link to an object, only to a resource. Two types of resource only links are supported: child and unplaced. When a child or unplaced link is updated it only refreshes the resource stamp and resource modification date/time stored by the link.

See Also
ILinkObject
ILinkResource
IDTime
UID

Member Enumeration Documentation

Identifiers that denote the policy used to specify when to automatically update the link resource via an export when the object is modified.
Enumerator
kNoAutoExport 

Never automatically export to the resource.

kExportOnModify 

Update the resource via an export when the object is marked modified.

kExportOnClose 

Update the resource via an export on close.

kExportOnSave 

Update the resource via an export on save.

Identifiers that denote the policy used to specify when to automatically update the link object via an import when the resource is modified.
Enumerator
kNoAutoImport 

Never automatically update the object.

kImportOnModify 

Update the object via an import when the resource is marked modified.

Identifiers that denote the type of the link.
Enumerator
kImport 

Link is an import link. \ An import link updates the object when the resource changes.

kExport 

Link is an export link. \ An export link updates the resource when the object changes.

kBidirectional 

Link is a bi-directional link. \ A bi-directional link updates the object when the resource changes, and updates the resource when the object changes. If both the resource and object change, conflict resolution rules will need to be applied.

kChild 

Link is a child link. \ A child link is never linked to an object, only to a resource that has a parent resource linked to an object. It is linked to a child resource so it can keep track of when the resource's modification state changes. Updating a child link only refreshes the resource stamp and resource modification date/time stored by the link.

Identifiers that denote the modification state of the linked object. The identifiers are used to get and set the modification state of a linked object.
Enumerator
kObjectModified 

Object has been modified since the last update.

kObjectUnmodified 

Object has not been modified since the last update.

Identifiers that denote the modification state of the linked resource. The identifiers are used to get and set the modification state of a linked resource.
Enumerator
kResourceModified 

Resource has been modified since the last update.

kResourceUnmodified 

Resource has not been modified since the last update.

Member Function Documentation

virtual void ILink::AddChildren (const UIDListchildren)
pure virtual

Adds child links to the link's hierarchy.

Parameters
children[IN] UIDs of the child links to add to the link's hierarchy.
Returns
kSuccess if the child links were successfully added, else an error code.

Implemented in CusDtLnkImportLinkConverter.

virtual ErrorCode ILink::CopyAttributes (const UIDReflinkRef)
pure virtual

Copies the attributes of the link referenced by the given UIDRef to this link.

Parameters
linkRef[IN] UIDRef of the link to copy. \ The UIDRef may reference a link in a different database.
Returns
kSuccess if the link attributes were successfuly copied, else an error code.

Implemented in CusDtLnkImportLinkConverter.

virtual void ILink::DeleteChildren (const UIDListchildren)
pure virtual

Deletes child links from the link's hierarchy.

Parameters
children[IN] UIDs of the child links to deleted from the link's hierarchy.
Returns
kSuccess if the child links were successfully deleted, else an error code.

Implemented in CusDtLnkImportLinkConverter.

virtual bool16 ILink::GetCanEmbed () const
pure virtual

Returns whether the link allows the resource to be embedded.

Returns
True if the link allows the resource to be embedded, else false.

Implemented in CusDtLnkImportLinkConverter.

virtual bool16 ILink::GetCanPackage () const
pure virtual

Returns whether the link allows the resource to be packaged.

Returns
True if the link allows the resource to be packaged, else false.

Implemented in CusDtLnkImportLinkConverter.

virtual bool16 ILink::GetCanUnembed () const
pure virtual

Returns whether the link allows the resource to be unembedded.

Returns
True if the link allows the resource to be unembedded, else false.

Implemented in CusDtLnkImportLinkConverter.

virtual uint32 ILink::GetChildren (UIDListchildren) const
pure virtual

Gets direct descendant child links from the link's hierarchy.

Parameters
children[OUT] UIDs of the child links in the link's hierarchy.
Returns
Number of direct descendant child links in the link's hierarchy that were retrieved.

Implemented in CusDtLnkImportLinkConverter.

virtual LinkClientID ILink::GetClientID () const
pure virtual

Returns the link's link client identifier.

Returns
Link's link client identifier.

Implemented in CusDtLnkImportLinkConverter.

virtual ExportPolicy ILink::GetExportPolicy () const
pure virtual

Returns the policy specifying when to update the link resource via an export when the object is marked modified. \ The export policy is always kNoAutoExport for an import link.

Returns
Link's update export policy.

Implemented in CusDtLnkImportLinkConverter.

virtual IDTime ILink::GetImportModTime () const
pure virtual

Returns the resource's modification date/time when it was last imported.

Returns
Resource's modification date/time when it was last imported. \ 0 if the link type is kExport, the resource has never been imported.

Implemented in CusDtLnkImportLinkConverter.

virtual ImportPolicy ILink::GetImportPolicy () const
pure virtual

Returns the policy specifying when to update the link object via an import when the resource is marked modified. \ The import policy is always kNoAutoImport for an export link.

Returns
Link's update export policy.

Implemented in CusDtLnkImportLinkConverter.

virtual WideString ILink::GetImportStamp () const
pure virtual

Returns the resource's stamp when it was last imported.

Returns
Resource's stamp when it was last imported. \ Undefined if the link type is kExport, or the resource has never been imported.

Implemented in CusDtLnkImportLinkConverter.

virtual IDTime ILink::GetLastExportTime () const
pure virtual

Returns the date and time that the object was last exported to the resource.

Returns
Date and time that the object was last exported to the resource. \ 0 if the link type is kImport, or the object has never been exported.

Implemented in CusDtLnkImportLinkConverter.

virtual IDTime ILink::GetLastImportTime () const
pure virtual

Returns the date and time the resource was the last imported into the object.

Returns
Date and time the resource was the last imported into the object. \ 0 if the link type is kExport, or the resource has never been imported.

Implemented in CusDtLnkImportLinkConverter.

virtual LinkType ILink::GetLinkType () const
pure virtual

Returns the type of the link.

Returns
Type of the link.

Implemented in CusDtLnkImportLinkConverter.

virtual uint32 ILink::GetNumChildren () const
pure virtual

Returns the number of direct descendant child links in the link's hierarchy.

Returns
Number of direct descendant child links in the link's hierarchy.

Implemented in CusDtLnkImportLinkConverter.

virtual UID ILink::GetObject () const
pure virtual

Returns the UID of the link object associated with the link.

Returns
UID of the linked object. \ kInvalidUID if the link object UID has not been set.

Implemented in CusDtLnkImportLinkConverter.

virtual ObjectModificationState ILink::GetObjectModificationState () const
pure virtual

Returns the linked object's modification state. \ The object modification state is always kObjectUnmodified for import links.

Returns
Linked object's modification state.

Implemented in CusDtLnkImportLinkConverter.

virtual UID ILink::GetParent () const
pure virtual

Gets links that are direct parents the link.

Returns
UID of the link's parent link, else kInvalidUID.

Implemented in CusDtLnkImportLinkConverter.

virtual UID ILink::GetResource () const
pure virtual

Returns the UID of the resource associated with the link.

Returns
UID of the linked resource. \ kInvalidUID if the resource UID has not been set.

Implemented in CusDtLnkImportLinkConverter.

virtual ResourceModificationState ILink::GetResourceModificationState () const
pure virtual

Returns the linked resource's modification state. The resource modification state is always kResourceUnmodified for export links.

Returns
Linked resource's modification state.

Implemented in CusDtLnkImportLinkConverter.

virtual bool16 ILink::GetShowInUI () const
pure virtual

Returns whether the link should be displayed in the Links UI.

Returns
True if the link should be displayed in the Links UI, else false.

Implemented in CusDtLnkImportLinkConverter.

virtual void ILink::SetCanEmbed (bool16 bCanEmbed)
pure virtual

Sets whether the link allows the resource to be embedded.

Parameters
bCanEmbed[IN] Boolean denoting whether the link's resource can be embedded.

Implemented in CusDtLnkImportLinkConverter.

virtual void ILink::SetCanPackage (bool16 bCanPackage)
pure virtual

Sets whether the link allows the resource to be packaged.

Parameters
bCanPackage[IN] Boolean denoting whether the link's resource can be packaged.

Implemented in CusDtLnkImportLinkConverter.

virtual void ILink::SetCanUnembed (bool16 bCanUnembed)
pure virtual

Sets whether the link allows the resource to be unembedded.

Parameters
bCanUnembed[IN] Boolean denoting whether the link's resource can be unembedded.

Implemented in CusDtLnkImportLinkConverter.

virtual void ILink::SetExportPolicy (ExportPolicy policy)
pure virtual

Sets the policy specifying when to update the link resource via an export when the object is marked modified. \ The update export policy is ignored for import links.

Parameters
policy[IN] Link's update export policy.

Implemented in CusDtLnkImportLinkConverter.

virtual void ILink::SetImportPolicy (ImportPolicy policy)
pure virtual

Sets the policy specifying when to update the link object via an import when the resource is marked modified. \ The update import policy is ignored for export links.

Parameters
policy[IN] Link's update import policy.

Implemented in CusDtLnkImportLinkConverter.

virtual void ILink::SetObject (UID objectUID)
pure virtual

Sets the UID of the link object associated with the link.

Parameters
objectUID[IN] UID of the linked object.

Implemented in CusDtLnkImportLinkConverter.

virtual void ILink::SetObjectModificationState (ObjectModificationState modState)
pure virtual

Sets the linked object's modification state. \ The object modification state is ignored for import links.

Parameters
modState[IN] Modification state of the linked object.

Implemented in CusDtLnkImportLinkConverter.

virtual void ILink::SetResource (UID resourceUID)
pure virtual

Sets the UID of the link resource associated with the link.

Parameters
resourceUID[IN] UID of the linked resource.

Implemented in CusDtLnkImportLinkConverter.

virtual void ILink::SetResourceModificationState (ResourceModificationState modState)
pure virtual

Sets the linked resource's modification state. The resource modification state is ignored for export links.

Parameters
modState[IN] Modification state of the linked resource.

Implemented in CusDtLnkImportLinkConverter.

virtual void ILink::SetShowInUI (bool16 bShowInUI)
pure virtual

Sets whether the link should be displayed in the Links UI.

Parameters
bShowInUI[IN] Boolean denoting whether the link should be displayed in the Links UI.

Implemented in CusDtLnkImportLinkConverter.

virtual ErrorCode ILink::Update (bool bForceUpdate,
UIFlags uiFlags,
UIDlinkUID 
)
pure virtual

Updates the link resource or object, as determined by the link's type.

Parameters
bForceUpdate[IN] Denotes whether to force an update, or to only update if needed. \ True to force an update, false to only update if needed.
uiFlags[IN] Denotes whether to allow UI during the update operation.
linkUID[OUT] UID of the link as a result of the update, which may or may not be the same as the UID of the link before the update operation.
Returns
kSuccess if the update succeeds, else an error code.