InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IHTTPAssetDownloadManager.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Sanyam Jain
6 //
7 // $Author$
8 //
9 // $DateTime$
10 //
11 // $Revision$
12 //
13 // $Change$
14 //
15 // ADOBE CONFIDENTIAL
16 //
17 // Copyright 2016 Adobe
18 // All Rights Reserved.
19 //
20 // NOTICE: Adobe permits you to use, modify, and distribute this file in
21 // accordance with the terms of the Adobe license agreement accompanying
22 // it. If you have received this file from a source other than Adobe,
23 // then your use, modification, or distribution of it requires the prior
24 // written permission of Adobe.
25 //
26 //========================================================================================
27 #ifndef __IHTTPAssetDownloadManager__
28 #define __IHTTPAssetDownloadManager__
29 
30 #include "IPMUnknown.h"
31 #include "LinksID.h"
32 #include "HTTPLinkSubsystemTypes.h"
33 #include "URI.h"
34 
35 #include "boost/config.hpp"
36 #include "boost/shared_ptr.hpp"
37 #include "boost/function.hpp"
38 
39 /*
40  AdobePatentID="P7137-US"
41  AdobePatentID="P7225-US"
42  AdobePatentID="P7609-US"
43 */
44 
54 {
55 public:
56  enum { kDefaultIID = IID_IHTTPASSETDOWNLOADMANAGER };
57 
65  typedef boost::function<void (
66  const URI& inURI,
67  const IDFile& cachedFilePath,
69  const float inProgress)> AssetDownloadProgressCallback;
70 
77  typedef boost::function<void (
78  const URI& inURI,
80  const IDFile& cachedFilePath)> AssetDownloadCompletionCallback;
81 
86  virtual bool16 Initialize() = 0;
87 
92  virtual bool16 Shutdown() = 0;
93 
102  virtual bool16 StartDownload(const URI& inUri,
105  IHTTPAssetDownloadManager::AssetDownloadCompletionCallback completionCallback = NULL) = 0;
106 
116  virtual bool16 StartDownload(const URI& inUri,
118  const IDFile& downloadPath,
120  IHTTPAssetDownloadManager::AssetDownloadCompletionCallback completionCallback = NULL) = 0;
121 
127  virtual bool16 PauseDownload(const URI& inUri) = 0;
128 
134  virtual bool16 ResumeDownload(const URI& inUri) = 0;
135 
141  virtual bool16 CancelDownload(const URI& inUri) = 0;
142 
147  virtual bool16 PauseAllDownloads() = 0;
148 
153  virtual bool16 ResumeAllDownloads() = 0;
154 
159  virtual bool16 CancelAllDownloads() = 0;
160 
167 
174  virtual bool16 GetProgress(const URI& inUri, float& outProgress) const = 0;
175 
181  virtual bool16 InProgress(const URI& inUri) const = 0;
182 };
183 
184 #endif // __IHTTPAssetDownloadManager__