![]() | InDesign SDK 20.5 |
#include <IDatalink.h>

Public Types | |
| enum | { kDefaultIID = IID_IDATALINK } |
| enum | StateType { kLinkNormal = 0, kLinkOutOfDate, kLinkMissing, kEmbedded } |
Public Member Functions | |
| virtual void | ReadWrite (IPMStream *s, ImplementationID prop)=0 |
| virtual int32 | GetNameInfo (NameInfo *ni, PMString *formatName, uint32 *filetype)=0 |
| virtual StateType | GetStoredState (uint64 *size, uint64 *time)=0 |
| virtual PMString * | GetBaseName ()=0 |
| virtual PMString * | GetFullName ()=0 |
| virtual int32 | SetNameInfo (NameInfo *ni, PMString *formatName, uint32 filetype, const PMString *fullPath=nil)=0 |
| virtual int32 | SetStoredState (uint64 *size, uint64 *time, StateType state)=0 |
| virtual int32 | Combine (NameInfo *dirname, NameInfo *newname)=0 |
| virtual bool16 | CompareBaseName (NameInfo *ni)=0 |
| virtual bool16 | CompareDirectory (NameInfo *ni)=0 |
| virtual bool16 | FindRelative (NameInfo *dirname, NameInfo *newname, ProgressParam *pp)=0 |
| virtual StateType | GetCurrentState (NameInfo *ni, uint64 *size, uint64 *time, uint32 *filetype, ProgressParam *pp)=0 |
| virtual int32 | Copy (NameInfo *dirname, ProgressParam *pp)=0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
This file defines an interface for linking to data. The links UI uses goes through this interface to get all the information it needs about the link. DataLink.cpp implements this interface for files (Macintosh and Windows files in a core way). Other implementations could be written. In the design I planned for URL files (files on the internet), OLE linked files, and "files" stored in a database.
| enum IDataLink::StateType |
| pure virtual |
Creates new name information for a link by combining the current link's basename with the directory specified by the dirname parameter. Combine is used by the find missing command to look for missing links in other directories.
| dirname | [IN] The directory to prepend to the basename |
| newName | [OUT] The name created by adding dirname to basename |
Implemented in CusDtLnkAliasedDataLink.
| pure virtual |
Determines whether the given name information has the same basename as the current link.
| ni | [IN] The NameInfo to compare this link's basename with |
Implemented in CusDtLnkAliasedDataLink.
| pure virtual |
Determines whether the given directory is the same the the current link.
| ni | [IN] The NameInfo to compare this link's directory with |
Implemented in CusDtLnkAliasedDataLink.
| pure virtual |
Used to make a copy of a link in the specified directory.
| dirname | [OUT] Will be filled with the link information |
| pp | specifies a callback routine that should be called to give the user feedback on slow operations. |
Implemented in CusDtLnkAliasedDataLink.
| pure virtual |
Looks for the current link by looking relative to the given directory. This operation should be fairly fast. Searching the whole disk is currently too slow.
| dirname | [IN] The original nameinfo of the file we are looking for |
| newname | [OUT] Filled with the new name of a link if it is found |
| pp | Specifies a callback routine that should be called to give the user feedback on slow operations |
Implemented in CusDtLnkAliasedDataLink.
| pure virtual |
Returns a string pointer to a short name that identifies the link. This is the string shown in the links palette. For file links the base name is the filename without any directory information.
Implemented in CusDtLnkAliasedDataLink.
| pure virtual |
GetCurrentState gets the link's size, time and type by looking at the link on disk.
| ni | [OUT] The link to get info on. If this is 0 the current link will be used |
| size | [OUT] The number of bytes of data that the link represents |
| time | [OUT] The Windows time value, the number of milliseconds since January 1, 1601 |
| filetype | [OUT] The Macintosh file type or 0 |
| pp | Specifies a callback routine that should be called to give the user feedback on slow operations |
Implemented in CusDtLnkAliasedDataLink.
| pure virtual |
Returns a long name that identifies the link. This is the string shown in the links information dialog. For file links the full name is the complete path name.
Implemented in CusDtLnkAliasedDataLink.
| pure virtual |
Gets the name and type of a link
| ni | [OUT] The name info to be setup |
| formatName | [OUT] The format name of the linked file |
| filetype | [OUT] The file type of the linked file |
Implemented in CusDtLnkAliasedDataLink.
| pure virtual |
If GetCurrentState takes a lot of time and the user cancels it this method can be used to get the state which was last set.
| size | [OUT] The number of bytes of data that the link represents(Optional) |
| time | [OUT] The Windows time value, the number of milliseconds since January 1, 1601 (Optional) |
Implemented in CusDtLnkAliasedDataLink.
| pure virtual |
Persistence related method; reads from or writes to given stream
| s | [IN] the persistent in and out stream. |
| prop | [IN] the implementation ID |
Implemented in CusDtLnkAliasedDataLink.
| pure virtual |
Sets the name and type for the link.
| ni | [IN] The information to use when setting up the NameInfo |
| formatName | [IN] The format name for the link |
| filetype | [IN] The file type of the linked file |
| fullPath | [IN] The path to the file |
Implemented in CusDtLnkAliasedDataLink.
| pure virtual |
Sets the size, time and state information that is stored with the object.
| size | [IN] The number of bytes of data that the link represents (Optional) |
| time | [IN] The Windows time value, the number of milliseconds since January 1, 1601 (Optional) |
| state | [IN] The current state of this link |
Implemented in CusDtLnkAliasedDataLink.