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

#include <IHTTPAssetDownloadManager.h>

Inheritance diagram for IHTTPAssetDownloadManager:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IHTTPASSETDOWNLOADMANAGER }
 
typedef boost::function< void(const
URI &inURI, const IDFile
&cachedFilePath,
HTTPLinkSubsystemTypes::HTTPAssetDownloadState
inState, const float
inProgress)> 
AssetDownloadProgressCallback
 
typedef boost::function< void(const
URI &inURI,
HTTPLinkSubsystemTypes::HTTPAssetDownloadState
inState, const IDFile
&cachedFilePath)> 
AssetDownloadCompletionCallback
 

Public Member Functions

virtual bool16 Initialize ()=0
 
virtual bool16 Shutdown ()=0
 
virtual bool16 StartDownload (const URI &inUri, HTTPLinkSubsystemTypes::AssetDownloadMode inDownloadMode, IHTTPAssetDownloadManager::AssetDownloadProgressCallback progressCallback=NULL, IHTTPAssetDownloadManager::AssetDownloadCompletionCallback completionCallback=NULL)=0
 
virtual bool16 StartDownload (const URI &inUri, HTTPLinkSubsystemTypes::AssetDownloadMode inDownloadMode, const IDFile &downloadPath, IHTTPAssetDownloadManager::AssetDownloadProgressCallback progressCallback=NULL, IHTTPAssetDownloadManager::AssetDownloadCompletionCallback completionCallback=NULL)=0
 
virtual bool16 PauseDownload (const URI &inUri)=0
 
virtual bool16 ResumeDownload (const URI &inUri)=0
 
virtual bool16 CancelDownload (const URI &inUri)=0
 
virtual bool16 PauseAllDownloads ()=0
 
virtual bool16 ResumeAllDownloads ()=0
 
virtual bool16 CancelAllDownloads ()=0
 
virtual
HTTPLinkSubsystemTypes::HTTPAssetDownloadState 
GetDownloadState (const URI &inUri) const =0
 
virtual bool16 GetProgress (const URI &inUri, float &outProgress) const =0
 
virtual bool16 InProgress (const URI &inUri) const =0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Detailed Description

IHTTPAssetDownloadManager manages downloads for http link assets(see IHTTPLinkSubsystemObjectFactory.h for more details). It is called when specific asset is not found in cache from IHTTPLinkResourceServerCache. Include this interface on http asset link resource server helper boss which is registered as kHTTPAssetLinkResourceServerHelperBoss. For custom implementation derive from above specified boss and override this interface. Also custom implementations should aggregate this interface on the boss serving IID_IHTTPLINKRESOURCESERVERAPIWRAPPER.

Member Typedef Documentation

typedef boost::function<void ( const URI& inURI, HTTPLinkSubsystemTypes::HTTPAssetDownloadState inState, const IDFile& cachedFilePath)> IHTTPAssetDownloadManager::AssetDownloadCompletionCallback

AssetDownload completion callback definition

Parameters
inUri[IN] Input URI whose download progress is to be started
inState[IN] Download state for the given input URI
cachedFilePath[IN] Download path for the given input URI
typedef boost::function<void ( const URI& inURI, const IDFile& cachedFilePath, HTTPLinkSubsystemTypes::HTTPAssetDownloadState inState, const float inProgress)> IHTTPAssetDownloadManager::AssetDownloadProgressCallback

AssetDownload progress callback definition

Parameters
inUri[IN] Input URI whose download progress is to be started
cachedFilePath[IN] Download path for the given input URI
inState[IN] Download state for the given input URI
inProgress[IN] Download progress for the given input URI

Member Function Documentation

virtual bool16 IHTTPAssetDownloadManager::CancelAllDownloads ()
pure virtual

Cancels all the downloads currently running

Returns
kTrue if this operation is successful
virtual bool16 IHTTPAssetDownloadManager::CancelDownload (const URIinUri)
pure virtual

Cancels the download for the input URI.

Parameters
inUri[IN] Input URI whose download progress is to be cancelled
Returns
kTrue if the download for input uri is cancelled
virtual HTTPLinkSubsystemTypes::HTTPAssetDownloadState IHTTPAssetDownloadManager::GetDownloadState (const URIinUri) const
pure virtual

Fetches the download state for the input URI.

Parameters
inUri[IN] Input URI whose download state is to be fetched
Returns
HTTPAssetDownloadState the download state for input uri
virtual bool16 IHTTPAssetDownloadManager::GetProgress (const URIinUri,
float & outProgress 
) const
pure virtual

Fetches the download progress for the input URI.

Parameters
inUri[IN] Input URI whose download progress is to be fetched
outProgress[OUT] Download progress
Returns
kTrue if the download for input uri is in progress else kFalse
virtual bool16 IHTTPAssetDownloadManager::Initialize ()
pure virtual

Initializes the download manager

Returns
kTrue if the download manager initialization is successful esle kFalse
virtual bool16 IHTTPAssetDownloadManager::InProgress (const URIinUri) const
pure virtual

Checks if the download is in progress for the input URI.

Parameters
inUri[IN] Input URI whose download progress is to be checked.
Returns
kTrue if the download for input uri is in progress else kFalse
virtual bool16 IHTTPAssetDownloadManager::PauseAllDownloads ()
pure virtual

Pauses all the downloads

Returns
kTrue if this operation is successful
virtual bool16 IHTTPAssetDownloadManager::PauseDownload (const URIinUri)
pure virtual

Pauses the download for the input URI.

Parameters
inUri[IN] Input URI whose download progress is to be paused
Returns
kTrue if the download for input uri is paused
virtual bool16 IHTTPAssetDownloadManager::ResumeAllDownloads ()
pure virtual

Resumes all the downloads

Returns
kTrue if this operation is successful
virtual bool16 IHTTPAssetDownloadManager::ResumeDownload (const URIinUri)
pure virtual

Resumes the download for the input URI.

Parameters
inUri[IN] Input URI whose download progress is to be resumed
Returns
kTrue if the download for input uri is resumed
virtual bool16 IHTTPAssetDownloadManager::Shutdown ()
pure virtual

Shuts down the download manager

Returns
kTrue if the download manager shutdown is successful else kFalse
virtual bool16 IHTTPAssetDownloadManager::StartDownload (const URIinUri,
HTTPLinkSubsystemTypes::AssetDownloadMode inDownloadMode,
IHTTPAssetDownloadManager::AssetDownloadProgressCallback progressCallback = NULL,
IHTTPAssetDownloadManager::AssetDownloadCompletionCallback completionCallback = NULL 
)
pure virtual

Starts the download for the input URI

Parameters
inUri[IN] Input URI whose download progress is to be started
inDownloadMode[IN] Download mode(sync/async) for the given input URI
progressCallback[IN] Download progress callback
completionCallback[IN] Download completion callback
Returns
kTrue if the download for input uri is started else kFalse
virtual bool16 IHTTPAssetDownloadManager::StartDownload (const URIinUri,
HTTPLinkSubsystemTypes::AssetDownloadMode inDownloadMode,
const IDFiledownloadPath,
IHTTPAssetDownloadManager::AssetDownloadProgressCallback progressCallback = NULL,
IHTTPAssetDownloadManager::AssetDownloadCompletionCallback completionCallback = NULL 
)
pure virtual

Starts the download for the input URI with download path specified

Parameters
inUri[IN] Input URI whose download progress is to be started
inDownloadMode[IN] Download mode(sync/async) for the given input URI
downloadPath[IN] Download path for the given input URI
progressCallback[IN] Download progress callback
completionCallback[IN] Download completion callback
Returns
kTrue if the download for input uri is started else kFalse