|
IDataLinkHelper Class ReferenceThis interface contains helper methods related to IDataLink. More...#include <IDataLinkHelper.h>
Inheritance diagram for IDataLinkHelper: List of all members. |
Public Types | | enum | { kDefaultIID = IID_IDATALINKHELPER } |
Public Methods | | virtual int32 | AddDataLink (IDataBase *db, UID pageitem, IDataLink *dl, ClassID provider=0, PMString *formatName=nil)=0 | | | Add the specified data link to a document.
| | virtual int32 | AddMultipleDataLinks (IDataBase *db, UID pageitem, K2Vector< PMString * > *stringList, K2Vector< PMString * > *formatNameList, ICommand **pCommand, IDataLink *defaultPath)=0 | | | Add multiple data links to a document.
| | virtual int32 | RemoveDataLink (const UIDList *itemList)=0 | | | Remove one or more data links from a document.
| | virtual int32 | GetLinkedFile (IDataBase *db, UID pageitem, SysFile *sysfile)=0 | | | Get the data link's SysFile if the file exists and it is a file type data link (kDataLinkBoss).
| | virtual IPMStream * | CreateLinkedStream (IDataBase *db, UID pageitem)=0 | | | Create a stream that contains the data link's data.
| | virtual UID | GetFirstPageItemUID (IDataBase *db, UID pageItemUID)=0 | | | Get the first page item UID associated with the linked item.
| | virtual void | GetAssociatedDataLinks (IDataBase *db, UID pageitemUID, UIDList *list)=0 | | | Get all the data links associated with the given page item.
| | virtual void | GetPageNumber (IDataLink *dl, PMString *pagenumber, int32 *pgNumber, bool16 bAbbreviate=kTrue, bool16 bReversePref=kFalse)=0 | | | Get the page number of the given data link.
| | virtual bool16 | HasInternalDataChanged (IDataLink *dl)=0 | | | Determine whether the internal data we maintain has been edited by the user.
| | virtual bool16 | IsLinkNeeded (IDataLink *dl)=0 | | | Determine whether the link is needed.
| | virtual void | GetExtension (PMString &basename, PMString &extension)=0 | | | Get the file extension for the given base name.
| | virtual IDataLink * | CreateDataLink (const SysFile &file, PMString *formatName=nil)=0 | | | Create a data link given a SysFile.
| | virtual ErrorCode | InitializeDataLink (IPMUnknown *boss, const SysFile &file, PMString *formatName=nil)=0 | | | Set up a data link off the given boss with the given SysFile and format string.
| | virtual UID | NewDataLinkUID (IDataBase *db, IDataLink *dl)=0 | | | Create a new data link based on the given datalink in the given database.
| | virtual UID | FindAssociatedPageItem (IDataBase *db, UID uid)=0 | | | Find a page item in the page item hierarchy that has an associated IDataLink.
| | virtual int32 | SetFormatName (IDataLink *dl, PMString &formatName)=0 | | | Set the format string of the given data link.
| | virtual bool16 | IsLinkMissing (IDataBase *db, UID pageItemUID)=0 | | | Return whether a link is missing or not.
| | virtual void | GetSelectedDataLinks (UIDList *pageItemUIDs, UIDList *dataLinkUIDs)=0 | | | Given a list of page item UIDs, return all their associated data links including data links of their children.
| | virtual bool16 | CheckLinks (IDocument *document)=0 | | | Check links before printing.
| | virtual IDataLink * | CreateDataLinkFromString (const PMString &filename, const PMString &formatName, IDataLink *defaultPath)=0 | | | Create a data link given a filename string.
| | virtual ICoreFilename * | CreatePublicationDir (IDataBase *db)=0 | | | Get the publication's directory.
| | virtual void | GetNameInfoFromEmbedded (IDataBase *db, UID pageitem, NameInfo *ni, PMString *formatName, uint32 *filetype)=0 | | | Get the page item's provider and ask it for the format name and type.
| | virtual ErrorCode | CreateFileFromEmbedded (IDataBase *db, UID pageitem, ICoreFilename *cfn)=0 | | | Create a file from the embedded data.
| | virtual ICoreFilename * | CreateCoreFilename (IDataLink *dl)=0 | | | Create a ICoreFilename from the given data link for file type links (kDataLinkBoss).
| | virtual IDataLink::StateType | AutoFindFile (NameInfo *pubdirni, IDataLink *dl, IMissingLink *missingLink=nil)=0 | | | Search for a data link using several fast search strategies.
| | virtual void | GetOPIName (IDataBase *db, UID pageitem, PMString &name)=0 | | | Get the OPI name of the given page item.
| | virtual uint64 | GetUIDSize (IDataBase *db, UID uid)=0 | | | Get the size of a UID.
| | virtual UID | GetAssociatedPageItem (IDataLink *dl)=0 | | | Get the page item associated with the given data link.
| | virtual PMString | GetPageItemName (IDataLink *dl)=0 | | | Get the name of the page item.
| | virtual ErrorCode | GetSysFile (IDataLink *dl, SysFile &sysFile)=0 | | | Get the data link's SysFile for file type links (kDataLinkBoss).
|
Detailed Description This interface contains helper methods related to IDataLink.
Member Enumeration Documentation
Member Function Documentation| | Add the specified data link to a document. - Parameters:
| IDataBase | *db: The document where the data link is added. | | UID | pageitem: The page item of the associated data link. | | ClassID | provider: The ClassID of the import provider used to import the data. | | PMString | *formatName: The format of the linked data. This string is shown in the Link Information dialog. |
- Returns:
- int32: Return 0 when successful.
|
| | Add multiple data links to a document. For example, OPI links of a placed EPS file. - Parameters:
| IDataBase | *db: The document where the data links are added. | | UID | pageitem: The page item of the associated data links. | | K2Vector<PMString | *> *stringList: A list of file specifications. One string for each data link. If full paths are not specified and defaultPath is specified, it used for the path. | | K2Vector<PMString | *> *formatNameList: A list of formats, one for each data link. | | ICommand | **pCommand: Pass nil, or to take owner ship of the command for release later pass in a command pointer. | | IDataLink | *defaultPath: Pass nil, or pass a data link pointer to use as the directory to look for the links when they are specified without path information. |
- Returns:
- int32: Return 0 when successful.
|
| | Search for a data link using several fast search strategies. - Parameters:
| NameInfo | *pubdirni: Directory to use when looking for relative positioned links. | | IDataLink | *dl: Data link pointer. | | IMissingLink | *missingLink = nil: Optional parameter to speed up searching when repeatedly calling AutoFindFile for many missing links. Can use InterfacePtr<IMissingLink> missingLink((IMissingLink *)CreateObject(kMissingLinkBoss, IID_IMISSINGLINK)); |
- Returns:
- IDataLink::StateType: The state of the link, found, missing or modified.
|
| | Check links before printing. Return true when it is OK to print without warning. - Parameters:
- Returns:
- bool16: Return true when it is OK to print.
|
| | Create a ICoreFilename from the given data link for file type links (kDataLinkBoss). - Parameters:
- Returns:
- ICoreFilename *: Return nil on failure.
|
| | Create a data link given a SysFile. - Parameters:
| const | SysFile &file: The SysFile. | | PMString | *formatName = nil: The optional format string of describing the file data. |
- Returns:
- IDataLink *: Return nil on failure.
|
| | Create a data link given a filename string. - Parameters:
| const | PMString &filename: The filename string. | | PMString | &formatName: The format string of describing the file data. | | IDataLink | *defaultPath: The path to use when the filename doesn't contain a path. |
- Returns:
- IDataLink *: New data link, return nil on failure.
|
| | Create a file from the embedded data. - Parameters:
| IDataBase | *db: The document containing the page item. | | UID | pageitem: The page item of the associated data link. | | ICoreFilename | *cfn: The file to create. |
- Returns:
- ErrorCode: kSuccess when successful.
|
| | Create a stream that contains the data link's data. - Parameters:
| IDataBase | *db: The document containing the page item and data link. | | UID | pageitem: The page item of the associated data link. |
- Returns:
- IPMStream *: Return nil on failure.
|
| | Get the publication's directory. - Parameters:
- Returns:
- ICoreFilename *: Return nil on failure.
|
| virtual UID FindAssociatedPageItem | ( | IDataBase * | db, | | | UID | uid | | ) | [pure virtual] |
|
| | Find a page item in the page item hierarchy that has an associated IDataLink. Look first at the given page item then its children. Return the first page item that has a data link. - Parameters:
| IDataBase | *db: The document containing the page item and data link. | | UID: | Page item UID. |
- Returns:
- UID: Return page item UID.
|
| virtual void GetAssociatedDataLinks | ( | IDataBase * | db, | | | UID | pageitemUID, | | | UIDList * | list | | ) | [pure virtual] |
|
| | Get all the data links associated with the given page item. - Parameters:
| IDataBase | *db: The document containing the page item and data link. | | UID | pageitemUID: The page item of the associated data link. | | UIDList | *list: The list is filled in with IDataLink UIDs. |
|
| virtual UID GetAssociatedPageItem | ( | IDataLink * | dl | ) | [pure virtual] |
|
| | Get the page item associated with the given data link. The page item is in the same data base as the data link. - Parameters:
- Returns:
- UID: Page item UID.
|
| virtual void GetExtension | ( | PMString & | basename, | | | PMString & | extension | | ) | [pure virtual] |
|
| | Get the file extension for the given base name. - Parameters:
| PMString | &basename: The base name. | | PMString | &extension: Return the file extension. |
|
| virtual UID GetFirstPageItemUID | ( | IDataBase * | db, | | | UID | pageItemUID | | ) | [pure virtual] |
|
| | Get the first page item UID associated with the linked item. For non-text items it just returns the given UID. For text items it returns the UID of the first frame that contains the text. - Parameters:
| IDataBase | *db: The document containing the page item and data link. | | UID | pageitem: The page item of the associated data link. |
- Returns:
- UID: Return kInvalidUID on failure.
|
| | Get the data link's SysFile if the file exists and it is a file type data link (kDataLinkBoss). - Parameters:
| IDataBase | *db: The document containing the page item and data link. | | UID | pageitem: The page item of the associated data link. |
- Returns:
- int32: Return 0 when successful.
|
| virtual void GetNameInfoFromEmbedded | ( | IDataBase * | db, | | | UID | pageitem, | | | NameInfo * | ni, | | | PMString * | formatName, | | | uint32 * | filetype | | ) | [pure virtual] |
|
| | Get the page item's provider and ask it for the format name and type. Make up the name. - Parameters:
| IDataBase | *db: The document containing the page item and data link. | | UID | pageitemUID: The page item of the associated data link. | | NameInfo | *ni: Return name information. | | PMString | *formatName: Return format string. | | uint32 | *filetype: Return file type. |
|
| | Get the OPI name of the given page item. If there is no OPI name, the empty string is returned. - Parameters:
| IDataBase | *db: The document containing the page item. | | UID | pageItemUID: Page item UID. | | PMString | &name: Return the OPI filename string, or an empty string. |
|
| | Get the name of the page item. This is the name displayed in the Links palette. - Parameters:
- Returns:
- PMString: Name of the page item.
|
| | Get the page number of the given data link. - Parameters:
| IDataLink | *dl: Data link pointer. | | PMString | *pagenumber: Return parameter, the page number string. | | int32 | *pgNumber: Return parameter, the page number as a number. | | bool16 | bAbbreviate = kTrue: Whether to abbreviate the page number string. | | bool16 | bReversePref = kFalse: Whether to reverse the numbering style for the page number string. |
|
| virtual void GetSelectedDataLinks | ( | UIDList * | pageItemUIDs, | | | UIDList * | dataLinkUIDs | | ) | [pure virtual] |
|
| | Given a list of page item UIDs, return all their associated data links including data links of their children. - Parameters:
|
| | Get the data link's SysFile for file type links (kDataLinkBoss). - Parameters:
- Returns:
- ErrorCode: kSuccess when successful.
|
| | Get the size of a UID. - Parameters:
| IDataBase | *db: The document containing the UID. | | UID | uid: UID. |
- Returns:
- uint64: Size of the UID.
|
| | Determine whether the internal data we maintain has been edited by the user. For example, whether the user has edited text using InDesign. - Parameters:
- Returns:
- bool16: Return whether the internal data has been changed.
|
| | Set up a data link off the given boss with the given SysFile and format string. - Parameters:
- Returns:
- ErrorCode: Return kSuccess when successful.
|
| | Return whether a link is missing or not. - Parameters:
| IDataBase | *db: The document containing the page item and data link. | | UID | pageitemUID: The page item of the associated data link. |
- Returns:
- bool16: Return true when the link is missing (not found).
|
| | Determine whether the link is needed. For small images the proxy image contains all the data exactly as on disk. - Parameters:
- Returns:
- bool16: Return whether the link is needed.
|
| | Create a new data link based on the given datalink in the given database. - Parameters:
- Returns:
- UID: UID of a new IDataLink or kInvalidUID on failure.
|
| virtual int32 RemoveDataLink | ( | const UIDList * | itemList | ) | [pure virtual] |
|
| | Remove one or more data links from a document. Embedded data is removed for embedded links. - Parameters:
| const | UIDList* itemList: A list of page items. The associated data links of these page items are deleted. |
- Returns:
- int32: Return 0 when successful.
|
| | Set the format string of the given data link. - Parameters:
| IDataLink | *dl: Data link pointer. | | PMString | &formatName: The format string describing the data. |
- Returns:
- int32: Return 0 when successful.
|
The documentation for this class was generated from the following file:
Boss classes that aggregate this interface
|