History

Assets API cache methods

David Rowe committed 7 years ago

Commit 8820d1d1 parent 2ad1d7a4 files · +212 −26Browse files

Showing the changes to libraries/networking/src/BaseAssetScriptingInterface.cpp (1 of 4 files). Show all

Unified · Split

libraries/networking/src/BaseAssetScriptingInterface.cpp+11−0
@@ -68,6 +68,17 @@ Promise BaseAssetScriptingInterface::queryCacheMeta(const QUrl& url) { · 67 unmodified lines
68 return assetClient()->queryCacheMetaAsync(url, makePromise(__FUNCTION__));68 return assetClient()->queryCacheMetaAsync(url, makePromise(__FUNCTION__));
69}69}
70 70
71/**jsdoc
72 * Data and information returned by {@link Assets.loadFromCache}.
73 * @typedef {object} Assets.LoadFromCacheResult
74 * @property {number} [byteLength] - The number of bytes in the retrieved data.
75 * @property {string} [contentType] - The automatically detected MIME type of the content.
76 * @property {ArrayBuffer} data - The data bytes.
77 * @property {Assets.CacheItemMetaData} metadata - Information on the cache item.
78 * @property {string|object|ArrayBuffer} [response] - The content of the response.
79 * @property {Assets.ResponseType} responseType - The type of the content in <code>response</code>.
80 * @property {string} url - The URL of the cache item.
81 */
71Promise BaseAssetScriptingInterface::loadFromCache(const QUrl& url, bool decompress, const QString& responseType) {82Promise BaseAssetScriptingInterface::loadFromCache(const QUrl& url, bool decompress, const QString& responseType) {
72 QVariantMap metaData = {83 QVariantMap metaData = {
73 { "_type", "cache" },84 { "_type", "cache" },