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
6868 return assetClient()->queryCacheMetaAsync(url, makePromise(__FUNCTION__));
6969 }
7070
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+ */
7182 Promise BaseAssetScriptingInterface::loadFromCache(const QUrl& url, bool decompress, const QString& responseType) {
7283 QVariantMap metaData = {
7384 { "_type", "cache" },