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

#include <IHTTPLinkCachedAssetEntry.h>

Public Member Functions

virtual bool16 Exists ()=0
 
virtual bool16 CanRead ()=0
 
virtual bool16 CanCreateReadStream ()=0
 
virtual IPMStreamCreateReadStream ()=0
 
virtual bool16 CanCopyToFile ()=0
 
virtual ErrorCode CopyToFile (IDFile &outFile)=0
 
virtual FileTypeInfo GetFileTypeInfo ()=0
 
virtual bool GetXMPPacketInfo (std::string &packet) const =0
 
virtual bool CanGetFile () const =0
 
virtual bool GetFile (IDFile &file) const =0
 
virtual bool16 IsValid ()
 
virtual bool16 IsStale (const IHTTPLinkResourceServerAPIWrapper::AssetMetadataPtr assetCurrentAttributes)=0
 
virtual void SetValid (bool16 valid)
 
virtual void ReadWrite (IPMStream *s)=0
 

Detailed Description

This abstract class is used by server cache and http links mechanism to refer a downloaded http asset. This is not part of any boss class. It emcompasses one entry in server cache(refer to IHTTPLinkResourceServerCache.h for more details). It contains information about the downloaded asset location and metadata(see AssetMetadata in IHTTPLinkResourceServerAPIWrapper for more details). It contains functions related to operations on asset.

See Also
IHTTPLinkResourceServerAPIWrapper
IHTTPLinkResourceServerCache

Member Function Documentation

virtual bool16 IHTTPLinkCachedAssetEntry::CanCopyToFile ()
pure virtual

Checks if the file in cache can be copied to file.

Returns
kTrue if cached file can be copied to file else kFalse.
virtual bool16 IHTTPLinkCachedAssetEntry::CanCreateReadStream ()
pure virtual

Checks if the file in the cache can be opened or not.

Returns
kTrue if file in cache can be opened else kFalse.
virtual bool16 IHTTPLinkCachedAssetEntry::CanRead ()
pure virtual

Checks if the file in the cache is readable or not.

Returns
kTrue if file in cache is readable else kFalse.
virtual ErrorCode IHTTPLinkCachedAssetEntry::CopyToFile (IDFileoutFile)
pure virtual

Copy to cached file to outFile.

Parameters
outFile[OUT] the output file where the cached file is to be copied
Returns
kSuccess if the operation is successful else kFalse
virtual IPMStream* IHTTPLinkCachedAssetEntry::CreateReadStream ()
pure virtual

Checks if we can create a Stream for the file in cache.

Returns
kTrue if we can create a Stream for the file in cache else kFalse.
virtual bool16 IHTTPLinkCachedAssetEntry::Exists ()
pure virtual

Checks if the file exists in cache

Returns
kTrue if file exists in cache else kFalse.
virtual FileTypeInfo IHTTPLinkCachedAssetEntry::GetFileTypeInfo ()
pure virtual

Gets the file type info for the cached file

Returns
File type info for the specified file.
virtual bool16 IHTTPLinkCachedAssetEntry::IsStale (const IHTTPLinkResourceServerAPIWrapper::AssetMetadataPtr assetCurrentAttributes)
pure virtual

Checks if the cached file is stale.

Parameters
assetCurrentAttributes[IN] the current asset attributes which would be compared with to determine staleness of cached asset file
Returns
kTrue if the file is stale else kFalse
virtual bool16 IHTTPLinkCachedAssetEntry::IsValid ()
inlinevirtual

Checks if the cached file is valid.

Returns
kTrue if the file is valid or not
virtual void IHTTPLinkCachedAssetEntry::SetValid (bool16 valid)
inlinevirtual

Sets the cached file as valid

Parameters
valid[IN] the cached file is valid or not.