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

Public Types | |
| enum | { kDefaultIID = IID_IHTTPLINKRESOURCESERVERCACHE } |
| typedef boost::function< void(const URI &inUri, const HTTPLinkSubsystemTypes::HTTPAssetDownloadState &inState, const float inProgress)> | AssetDownloadProgressCallback |
| typedef boost::function< void(const URI &inUri, const HTTPLinkSubsystemTypes::HTTPAssetDownloadState &inState, std::shared_ptr < IHTTPLinkCachedAssetEntry > cachedAssetEntry)> | AssetDownloadCompletionCallback |
Public Member Functions | |
| virtual bool16 | Initialize ()=0 |
| virtual bool16 | Shutdown ()=0 |
| virtual std::shared_ptr < IHTTPLinkCachedAssetEntry > | GetCachedAssetEntry (const URI &inUri, bool16 inDownloadIfMissing=kTrue, HTTPLinkSubsystemTypes::AssetDownloadMode inDownloadMode=HTTPLinkSubsystemTypes::kAssetDownloadMode_Sync, IHTTPLinkResourceServerCache::AssetDownloadProgressCallback downloadProgressCallback=NULL, IHTTPLinkResourceServerCache::AssetDownloadCompletionCallback downloadCompletionCallback=NULL)=0 |
| virtual bool16 | InvalidateCacheForURI (const URI &inUri)=0 |
| virtual bool16 | IsCachedAssetEntryStale (const URI &inUri, const IHTTPLinkResourceServerAPIWrapper::AssetMetadataPtr assetCurrentAttributes)=0 |
| virtual bool16 | PurgeCache (bool16 forcePurgeAll=kFalse)=0 |
| virtual HTTPLinkSubsystemTypes::HTTPAssetDownloadState | GetDownloadState (const URI &inUri)=0 |
| virtual void | ReadWriteSnapshotForBackgroundThread (IPMStream *s)=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 interface provides deals with caching mechanism for files and metadata for HTTP links. This interface is responsible for storing asset metadata. Ideally it should persist across the session. Also it should clear cache and metadata also, so that it doesn't bloat.
To subclass create a boss based on kHTTPAssetLinkResourceServerHelperBoss with the implementation of this interface. And return this connection instance from the IHTTPLinkSubsystemObjectFactory.
| typedef boost::function<void( const URI& inUri, const HTTPLinkSubsystemTypes::HTTPAssetDownloadState& inState, std::shared_ptr<IHTTPLinkCachedAssetEntry> cachedAssetEntry)> IHTTPLinkResourceServerCache::AssetDownloadCompletionCallback |
| typedef boost::function<void( const URI& inUri, const HTTPLinkSubsystemTypes::HTTPAssetDownloadState& inState, const float inProgress)> IHTTPLinkResourceServerCache::AssetDownloadProgressCallback |
| pure virtual |
Fetches the the cached entry of the file downloaded for the input URI.
| inUri | [IN] input Uri. |
| inDownloadIfMissing | [IN] asset corresponding to input Uri requres download or not. |
| inDownloadMode | [IN] sync/async mode. |
| downloadProgressCallback | [IN] download progress callback |
| downloadCompletionCallback | [IN] download completion callback |
| pure virtual |
| pure virtual |
Initializes the HTTP Link Resource Server Cache
| pure virtual |
Invalidate the cache entry of the file downloaded for the input URI.
| inUri | [IN] inUri. |
| pure virtual |
Checks if the cached asset entry is stale
| inUri | [IN] input URI for the cached asset entry. |
| serverAssetAttribute | [IN] current HTTP Asset Attribute. |
| pure virtual |
Purges the cache.
| forcePurgeAll | [IN] true if we want forceful purging. |
| pure virtual |
Used when snapshot is created for the object for running in background thread. Snapshots are used in some of the InDesign workflows like PDF export, to pass objects for processing in background thread. In this function, object should write relevant data into stream or read from it to create necessary data depending on type of stream.
| s | stream for reading/writing object's data |
| pure virtual |
Shuts down the HTTP Link Resource Server Cache