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

Public Types | |
| typedef CPMUnknown < ILinkResourceHandler > | inherited |
| typedef object_type | data_type |
Public Member Functions | |
| FileLinkResourceHandler (IPMUnknown *boss) | |
| virtual bool | Init (const UIDRef &ref, const URI &uri) |
| virtual bool | IsResourceURIValid (const UIDRef &ref, const URI &uri) const |
| virtual bool | AreResourceIdsEquivalent (const ILinkResource::ResourceId &id1, const ILinkResource::ResourceId &id2) const |
| virtual FileTypeInfo | GetResourceDataType (const UIDRef &ref, const URI &uri) const |
| virtual WideString | GetShortResourceName (const UIDRef &ref, const URI &uri, bool bUIName) const |
| virtual WideString | GetLongResourceName (const UIDRef &ref, const URI &uri, bool bUIName) const |
| virtual PMString | GetResourceStateInfo (const UIDRef &ref, const URI &uri, ILinkResource::ResourceState state, ILinkResource::ResourceStoreState storeState) const |
| virtual bool | AreStampsEquivalent (const WideString &stamp1, const WideString &stamp2) const |
| virtual bool | CanReadResource (const UIDRef &ref, const URI &uri) const |
| virtual bool | CanWriteResource (const UIDRef &ref, const URI &uri) const |
| virtual bool | CanReadWriteResource (const UIDRef &ref, const URI &uri) const |
| virtual bool | CanCreateResourceStream (const UIDRef &ref, const URI &uri, ILinkResource::AccessMode mode) const |
| virtual IPMStream * | CreateResourceReadStream (const UIDRef &ref, const URI &uri) const |
| virtual IPMStream * | CreateResourceWriteStream (const UIDRef &ref, const URI &uri) const |
| virtual IPMStream * | CreateResourceReadWriteStream (const UIDRef &ref, const URI &uri) const |
| virtual bool | CanCacheResource (const UIDRef &ref, const URI &uri) const |
| virtual bool | CanEmbedResource (const UIDRef &ref, const URI &uri) const |
| virtual bool | CanUnembedResource (const UIDRef &ref, const URI &uri) const |
| virtual bool | CanCopyToFile (const UIDRef &ref, const URI &uri) const |
| virtual ErrorCode | CopyToFile (const UIDRef &ref, const URI &uri, IDFile &file) const |
| virtual bool | CanEditResource (const UIDRef &ref, const URI &uri) const |
| virtual ErrorCode | EditResource (const UIDRef &ref, const URI &uri, const AppInfo &appInfo, PMString *errorString) const |
| virtual bool | CanRevealResource (const UIDRef &ref, const URI &uri) const |
| virtual ErrorCode | RevealResource (const UIDRef &ref, const URI &uri) const |
| virtual bool | CanRevealResourceInBridge (const UIDRef &ref, const URI &uri) const |
| virtual ErrorCode | RevealResourceInBridge (const UIDRef &ref, const URI &uri) const |
| virtual bool | CanRevealResourceInCloudLibraries (const UIDRef &ref, const URI &uri) const |
| virtual ErrorCode | RevealResourceInCloudLibraries (const UIDRef &ref, const URI &uri) const |
| virtual bool | GetXMPPacketInfo (const UIDRef &resourceRef, const URI &uri, std::string &packet) const |
| virtual bool | CanGetXMPPacketInfo (const UIDRef &ref, const URI &uri) const |
| virtual bool | CanReplaceFPOWithOriginalResource (const UIDRef &ref, const URI &uri) const |
| virtual bool | CanDownloadOriginalResource (const UIDRef &ref, const URI &uri) const |
| virtual ErrorCode | DownloadOriginalResource (const UIDRef &ref, const URI &uri) const |
| virtual ErrorCode | AsyncDownloadOriginalResource (const UIDRef &ref, const URI &uri, ILinkResource::DownloadCompletionFunction completionFunction) const |
| virtual ILinkResource::ResourceDownloadState | GetResourceDownloadProgress (const UIDRef &ref, const URI &uri, PMReal &progress) const |
| virtual bool | CanProvideFile (const UIDRef &ref, const URI &uri) const |
| virtual ErrorCode | GetFile (const UIDRef &ref, const URI &uri, IDFile &idFile) const |
| virtual bool | canGetInstanceName () const |
| virtual ErrorCode | GetInstanceName (PMString &uri) const |
Public Member Functions inherited from CPMUnknown< ILinkResourceHandler > | |
| IPMUnknown * | QueryInterface (PMIID interfaceID) const |
| void | AddRef () const |
| void | Release () const |
| void | PreDirty (ImplementationID prop=kInvalidImpl, bool16 allowModification=kTrue) |
| void | PreDirtyNoMessage (ImplementationID prop=kInvalidImpl, bool16 allowModification=kTrue) |
| CPMUnknown (const CPMUnknown &)=delete | |
| CPMUnknown & | operator= (const CPMUnknown &)=delete |
Protected Attributes | |
| bool | fbInited |
| IDFile | fFile |
| FileTypeInfoID | fFileTypeInfoID |
| WideString | fShortNameCache |
| WideString | fShortUINameCache |
| WideString | fLongNameCache |
| WideString | fLongUINameCache |
Protected Attributes inherited from CPMUnknown< ILinkResourceHandler > | |
| HelperInterface | fHelperInterface |
Additional Inherited Members | |
Protected Member Functions inherited from CPMUnknown< ILinkResourceHandler > | |
| CPMUnknown (IPMUnknown *boss) | |
Implementation of ILinkResourceHandler for a file based link resources. This class serves as the resource handler for all link resources with a URI scheme of 'file', and can be utilized as a base implementation for any link resource that is file based.
| virtual |
Called to determine if the given resource references are equivalent.
| id1 | [IN] Resource identifier to compare with id2. |
| id2 | [IN] Resource identifier to compare with id1. |
Implements ILinkResourceHandler.
| virtual |
Called to determine if the given resource stamps are equivalent.
| stamp1 | [IN] Stamp to compare with stamp2. |
| stamp2 | [IN] Stamp to compare with stamp1. |
Implements ILinkResourceHandler.
| virtual |
Called to download original asynchronously for an FPO resource.
| ref | [IN] UID reference of the link resource. |
| uri | [IN] URI of the resource to be downloaded. |
| completionFunction | [IN] completion function to be called at the end of download. |
Implements ILinkResourceHandler.
| inlinevirtual |
Called to determine if a resource can be cached.
| ref | [IN] UID reference of the link resource. |
| uri | [IN] URI of the resource to check. |
Implements ILinkResourceHandler.
| virtual |
Called to determine if a resource can be copied to a file.
| ref | [IN] UID reference of the link resource. |
| uri | [IN] URI of the resource to check. |
Implements ILinkResourceHandler.
| virtual |
Called to determine if a resource can currently be opened with the given access mode.
| ref | [IN] UID reference of the link resource. |
| uri | [IN] URI of the resource to check. |
| access | [IN] Type of access desired. |
Implements ILinkResourceHandler.
| virtual |
Called to determine if the original for an FPO resource can be downloaded.
| ref | [IN] UID reference of the link resource. |
| uri | [IN] URI of the link resource. |
Implements ILinkResourceHandler.
| virtual |
Called to determine if a resource can be edited.
| ref | [IN] UID reference of the link resource. |
| uri | [IN] URI of the resource to check. |
Implements ILinkResourceHandler.
| inlinevirtual |
Called to determine if a resource can be embedded.
| ref | [IN] UID reference of the link resource. |
| uri | [IN] URI of the resource to check. |
Implements ILinkResourceHandler.
| virtual |
Determines if we can get the XMP Info for the resource.
| ref | [IN] UID reference of the link resource. |
| uri | [IN] URI of the link resource. |
Implements ILinkResourceHandler.
| virtual |
Determines if a resource can provide the underlying file or not.
| ref | [IN] UID reference of the link resource. |
| uri | [IN] URI of the link resource. |
Implements ILinkResourceHandler.
| virtual |
Called to determine if a resource can be read.
| ref | [IN] UID reference of the link resource. |
| uri | [IN] URI of the resource to check. |
Implements ILinkResourceHandler.
| virtual |
Called to determine if a resource can be read and written simultaneously.
| ref | [IN] UID reference of the link resource. |
| uri | [IN] URI of the resource to check. |
Implements ILinkResourceHandler.
| virtual |
Called to determine if the FPO resource can be replaced with original.
| ref | [IN] UID reference of the link resource. |
| uri | [IN] URI of the link resource. |
Implements ILinkResourceHandler.
| virtual |
Called to determine if a resource can be revealed.
| ref | [IN] UID reference of the link resource. |
| uri | [IN] URI of the resource to check. |
Implements ILinkResourceHandler.
| virtual |
Called to determine if a resource can be revealed in Adobe Bridge
| ref | [IN] UID reference of the link resource. |
| uri | [IN] URI of the resource to check. |
Implements ILinkResourceHandler.
| inlinevirtual |
Called to determine if a resource can be revealed in CC Libraries panel
| ref | [IN] UID reference of the link resource. |
| uri | [IN] URI of the resource to check. |
Implements ILinkResourceHandler.
| inlinevirtual |
Called to determine if a resource can be unembedded.
| ref | [IN] UID reference of the link resource. |
| uri | [IN] URI of the resource to check. |
Implements ILinkResourceHandler.
| virtual |
Called to determine if a resource can be written.
| ref | [IN] UID reference of the link resource. |
| uri | [IN] URI of the resource to check. |
Implements ILinkResourceHandler.
| virtual |
Called to copy a resource to the given file.
| ref | [IN] UID reference of the link resource. |
| uri | [IN] URI of the resource to copy. |
| file | [IN] File to copy the resource to. |
Implements ILinkResourceHandler.
| virtual |
Called to create a stream that can be used to read data from a resource. \ The caller assumes responsibility for deleting the stream.
| ref | [IN] UID reference of the link resource. |
| uri | [IN] URI of the resource to create a read stream for. |
Implements ILinkResourceHandler.
| virtual |
Called to create a stream that can be used to read and write data from/to a resource. \ The caller assumes responsibility for deleting the stream.
| ref | [IN] UID reference of the link resource. |
| uri | [IN] URI of the resource to create a read/write stream for. |
Implements ILinkResourceHandler.
| virtual |
Called to create a stream that can be used to write data to a resource. \ The caller assumes responsibility for deleting the stream.
| ref | [IN] UID reference of the link resource. |
| uri | [IN] URI of the resource to create a write stream for. |
Implements ILinkResourceHandler.
| virtual |
Called to download original synchronously for an FPO resource.
| ref | [IN] UID reference of the link resource. |
| uri | [IN] URI of the resource to be downloaded. |
Implements ILinkResourceHandler.
| virtual |
Called to edit a resource.
| ref | [IN] UID reference of the link resource. |
| uri | [IN] URI of the resource to edit. |
| appInfo | [IN] Indicates which app to edit the resource with. kNullAppInfo means use the default editor. |
| errorString | [OUT] If editing fails, this fills out an error message when the string pointer is non-nil |
Implements ILinkResourceHandler.
| virtual |
Get the underlying file from the link resource.
| ref | [IN] UID reference of the link resource. |
| uri | [IN] URI of the link resource. |
| idFile | [OUT] IDFile of the underlying link resource. |
Implements ILinkResourceHandler.
| virtual |
Called to get a resource's long name. \ For example, the long name for a file resource is the file's full path.
| ref | [IN] UID reference of the link resource. |
| uri | [IN] URI of the resource to get a long name for. |
| bUIName | [IN] Denotes to return the resource's long UI name if different from the resource's actual long name.\ In some cases, resources may want to have long UI name that differs from the resource's actual long name. For example, file resources on the Mac return a POSIX path as the resource's actual long name, and a HFS/POSIX path as the resource's long UI name. |
Implements ILinkResourceHandler.
| virtual |
Called to get a resource's data/file type.
| ref | [IN] UID reference of the link resource. |
| uri | [IN] URI of the resource to get the data/file type for. |
Implements ILinkResourceHandler.
| inlinevirtual |
Return resource's download state and fill progress
| ref | [IN] UID reference of the link resource. |
| uri | [IN] URI of the link resource. |
| progress | [OUT] the download progress, currently unused. resource's download state |
Implements ILinkResourceHandler.
| inlinevirtual |
Called to get additional information about a resource's state. \ The additional information is added to state string the Links UI displays in the link information pane and the status tooltip.
| ref | [IN] UID reference of the link resource. |
| uri | [IN] URI of the resource to get a state informational string for. |
| state | [IN] Resource's current availability state. |
| storeState | [IN] Resource's current store state. |
Implements ILinkResourceHandler.
| virtual |
Called to get a resource's short name. \ For example, the short name for a file resource is the file's name.
| ref | [IN] UID reference of the link resource. |
| uri | [IN] URI of the resource to get a short name for. |
| bUIName | [IN] Denotes to return the resource's short UI name if different from the resource's actual short name.\ In some cases, resources may want to have short UI name that differs from the resource's actual short name. For example, file resources on the Mac return a POSIX file name as the resource's actual short name, and a HFS/POSIX file name as the resource's short UI name. |
Implements ILinkResourceHandler.
| virtual |
Get the XMP Info for the resource
| resourceRef | [IN] UID reference of the link resource. |
| uri | [IN] URI of the link resource. |
| packet | [OUT] the resource's XMP info |
Implements ILinkResourceHandler.
Called by the LinkResource to allow the handler to initialize itself. This method can be used by the handler to optimize its resource handling. For example, the handler may want to parse the URI in this method so that calls to other methods can used the parsed information.
| ref | [IN] UID reference of the link resource. |
| uri | [IN] URI of the link resource. |
Implements ILinkResourceHandler.
| virtual |
Called to determine if the provider supports the given URI.
| ref | [IN] UID reference of the link resource. |
| uri | [IN] URI to check. |
Implements ILinkResourceHandler.
| virtual |
Called to reveal a resource.
| ref | [IN] UID reference of the link resource. |
| uri | [IN] URI of the resource to reveal. |
Implements ILinkResourceHandler.
| virtual |
Called to reveal a resource in Adobe Bridge
| ref | [IN] UID reference of the link resource. |
| uri | [IN] URI of the resource to reveal. |
Implements ILinkResourceHandler.
| inlinevirtual |
Called to reveal a resource in CC Libraries panel
| ref | [IN] UID reference of the link resource. |
| uri | [IN] URI of the resource to reveal. |
Implements ILinkResourceHandler.
| protected |
| mutableprotected |
Key used to access the file's type, creator, file extension, and mime type from the FileTypeRegistry.
| mutableprotected |
Caches used to store the resource's short and long names so that they don't have to regenerated every time. The caches should always be invalidated every time the handler is initialized.