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

#include <ILinkObject.h>

Inheritance diagram for ILinkObject:
IPMUnknownCPMUnknown< ILinkObject >CLinkObject

Public Types

enum  { kDefaultIID = IID_ILINKOBJECT }
 

Public Member Functions

virtual LinkClientID GetClientID () const =0
 
virtual bool IsDirectLink () const =0
 
virtual IPMUnknownQueryLinkedObject (const PMIID &interfaceId) const =0
 
virtual bool CanGotoLinkedObject () const =0
 
virtual ErrorCode GotoLinkedObject (PMString *errorString) const =0
 
virtual bool CanUpdate (const ILinkResource *iResource, UID linkUID, UIFlags uiFlags, ErrorCode &err) const =0
 
virtual ClassID GetImportProvider (const ILinkResource *iResource, UID linkUID) const =0
 
virtual ErrorCode Import (const ILinkResource *iResource, UID &linkUID, UIFlags uiFlags)=0
 
virtual ClassID GetExportProvider (const ILinkResource *iResource, UID linkUID) const =0
 
virtual ErrorCode Export (const ILinkResource *iResource, UID &linkUID, UIFlags uiFlags) const =0
 
virtual ClassID GetResolveProvider (const ILinkResource *iResource, UID linkUID) const =0
 
virtual ErrorCode Resolve (const ILinkResource *iResource, UID &linkUID, UIFlags uiFlags)=0
 
virtual UIDList GetLinks () const =0
 
virtual void MarkLinksModified () const =0
 
virtual void ClearLinksModified () const =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
 

Detailed Description

Proxy used to represent the item in an InDesign database being linked to. For example, a page item, an XML element, a style, or a range of text.

See Also
ILink

Member Function Documentation

virtual bool ILinkObject::CanGotoLinkedObject () const
pure virtual

Determines whether the goto linked object operation link is supported.

Returns
True if the operation is supported, else false.
virtual bool ILinkObject::CanUpdate (const ILinkResourceiResource,
UID linkUID,
UIFlags uiFlags,
ErrorCode & err 
) const
pure virtual

Determines if an update should be allowed to proceed.

Parameters
iResource[IN] Associated link resource.
linkUID[IN] UID of the associated link.
uiFlags[IN] Denotes whether to allow UI.
err[OUT] Error code.
Returns
True to proceed with the update, else false.

Implemented in CLinkObject.

virtual void ILinkObject::ClearLinksModified () const
pure virtual

Called to notify all associated links that the object in no longer modified.

Implemented in CLinkObject.

virtual ErrorCode ILinkObject::Export (const ILinkResourceiResource,
UIDlinkUID,
UIFlags uiFlags 
) const
pure virtual

Called by the associated link to initiate an export of the contents of the object out to an resource. \ NOTE: Export() should not be called directly, instead call Update() on the associated link.

Parameters
iResource[IN] Link resource to export to.
linkUID[IN/OUT] UID of the associated link. \ If a new link is created as a result of the export, then the returned UID will be the UID of the new link.
uiFlags[IN] Denotes whether to allow UI during the export operation.
Returns
kSuccess if the export succeeds, else an error code.
virtual LinkClientID ILinkObject::GetClientID () const
pure virtual

Returns the object's link client identifier.

Returns
Object's link client identifier.

Implemented in CLinkObject.

virtual ClassID ILinkObject::GetExportProvider (const ILinkResourceiResource,
UID linkUID 
) const
pure virtual

Returns the class id of the update link service provider used to export the contents of the object out to an resource.

Parameters
iResource[IN] Link resource to export to.
linkUID[IN] UID of the associated link.
Returns
Id of the update link service provider to use to export. kInvalidClass if no provider is available and the object should do the export.

Implemented in CLinkObject.

virtual ClassID ILinkObject::GetImportProvider (const ILinkResourceiResource,
UID linkUID 
) const
pure virtual

Returns the class id of the update link service provider used to import the contents of an resource into the object.

Parameters
iResource[IN] Link resource to import from.
linkUID[IN] UID of the associated link.
Returns
Id of the update link service provider to use to import. kInvalidClass if no provider is available and the object should do the import.

Implemented in CLinkObject.

virtual UIDList ILinkObject::GetLinks () const
pure virtual

Gets the list of links that reference the object.

Returns
List of links that reference the object.

Implemented in CLinkObject.

virtual ClassID ILinkObject::GetResolveProvider (const ILinkResourceiResource,
UID linkUID 
) const
pure virtual

Returns the class id of the update link service provider used to export and/or an import when both the object and the link resource have changed and the link needs to perform an update

Parameters
iResource[IN] Link resource that has also changed.
linkUID[IN] UID of the associated link.
Returns
Id of the update link service provider to use to resolve. kInvalidClass if no provider is available and the object should do the resolve.

Implemented in CLinkObject.

virtual ErrorCode ILinkObject::GotoLinkedObject (PMStringerrorString) const
pure virtual

Displays the object that is linked.

Parameters
errorString[OUT] If the goto fails, this fills out an error message when the string pointer is non-nil
Returns
kSuccess if the goto operation succeeds, else an error code.
virtual ErrorCode ILinkObject::Import (const ILinkResourceiResource,
UIDlinkUID,
UIFlags uiFlags 
)
pure virtual

Called by the associated link to initiate an import of the contents of an resource into the object. \ NOTE: Import() should not be called directly, instead call Update() on the associated link.

Parameters
iResource[IN] Link resource to import from.
linkUID[IN/OUT] UID of the associated link. \ If a new link is created as a result of the import, then the returned UID will be the UID of the new link.
uiFlags[IN] Denotes whether to allow UI during the import operation.
Returns
kSuccess if the import succeeds, else an error code.
virtual bool ILinkObject::IsDirectLink () const
pure virtual

Determines whether this object is on the same boss as the object that owns the link (a direct link), or is on a different boss than the object that owns the link (an indirect link). \ A UID based object like a page item is an example of a direct link. A non-UID based object like an XML element is an example of an indirect link.

Returns
True if the link is a direct link, else false if an indirect link.

Implemented in CLinkObject.

virtual void ILinkObject::MarkLinksModified () const
pure virtual

Called to notify all associated links that the object has been modified.

Implemented in CLinkObject.

virtual IPMUnknown* ILinkObject::QueryLinkedObject (const PMIIDinterfaceId) const
pure virtual

Returns the object with the given interface identifier that is on the same boss as the object that owns the link. \ If a direct link, the returned object will be on the same boss as this object. If an indirect link, the returned object will be on a different boss.

Parameters
interfaceId[IN] Interface identifier of the object to retrieve.
Returns
Object with the given interface identifier. \ Nil if the no object can be instantiated.

Implemented in CLinkObject.

virtual ErrorCode ILinkObject::Resolve (const ILinkResourceiResource,
UIDlinkUID,
UIFlags uiFlags 
)
pure virtual

Called by the associated link to initiate an export and/or an import when both the object and the link resource have changed and the link needs to perform an update. \ NOTE: Resolve() should not be called directly, instead call Update() on the associated link.

Parameters
iResource[IN] Link resource that has also changed.
linkUID[IN/OUT] UID of the associated link. \ If a new link is created as a result of the resolve, then the returned UID will be the UID of the new link.
uiFlags[IN] Denotes whether to allow UI during the resolve operation.
Returns
kSuccess if the resolve succeeds, else an error code.