From 942347158a482e1366fc34f5e3f058a722f25797 Mon Sep 17 00:00:00 2001 From: David Rowe Date: Thu, 22 Aug 2019 10:16:56 +1200 Subject: [PATCH] Collapse some function signatures' JSDoc --- .../src/AssetScriptingInterface.h | 54 ++++--------------- 1 file changed, 10 insertions(+), 44 deletions(-) diff --git a/libraries/script-engine/src/AssetScriptingInterface.h b/libraries/script-engine/src/AssetScriptingInterface.h index a4363fd19a..bb98f32131 100644 --- a/libraries/script-engine/src/AssetScriptingInterface.h +++ b/libraries/script-engine/src/AssetScriptingInterface.h @@ -219,8 +219,8 @@ public: * @function Assets.getAsset * @param {Assets.GetOptions|string} source - What to download and download options. If a string, the mapped path or hash * to download, optionally including a leading "atp:". - * @param {Assets~getAssetCallback} callback - The function to call upon completion. May be a function identifier or an - * inline function. + * @param {Assets.CallbackDetails|Assets~getAssetCallback} callback - The function to call upon completion. May be a + * function identifier or an inline function. * @example Retrieve a string from the asset server. * Assets.getAsset( * { @@ -247,13 +247,6 @@ public: * identifier, or the name of a function in a string. If the name of a function or a function identifier, it must be * a member of scope. */ - /**jsdoc - * Downloads content from the asset server. - * @function Assets.getAsset - * @param {Assets.GetOptions|string} source - What to download and download options. If a string, the mapped path or hash - * to download, optionally including a leading "atp:". - * @param {Assets.CallbackDetails} callbackDetails - Details of the function to call upon completion. - */ Q_INVOKABLE void getAsset(QScriptValue options, QScriptValue scope, QScriptValue callback = QScriptValue()); /**jsdoc @@ -289,8 +282,8 @@ public: * @function Assets.putAsset * @param {Assets.PutOptions|string} options - The content to upload and upload options. If a string, the value of the * string is uploaded but a path-to-hash mapping is not set. - * @param {Assets~putAssetCallback} callback - The function to call upon completion. May be an inline function or a - * function identifier. + * @param {Assets.CallbackDetails|Assets~putAssetCallback} callback - The function to call upon completion. May be an + * inline function or a function identifier. * @example Store a string in the asset server. * Assets.putAsset( * { @@ -317,13 +310,6 @@ public: * identifier, or the name of a function in a string. If the name of a function or a function identifier, it must be * a member of scope. */ - /**jsdoc - * Uploads content to the assert server and sets a path-to-hash mapping. - * @function Assets.putAsset - * @param {Assets.PutOptions|string} options - The content to upload and upload options. If a string, the value of the - * string is uploaded but a path-to-hash mapping is not set. - * @param {Assets.CallbackDetails} callbackDetails - Details of the function to call upon completion. - */ Q_INVOKABLE void putAsset(QScriptValue options, QScriptValue scope, QScriptValue callback = QScriptValue()); /**jsdoc @@ -370,8 +356,8 @@ public: * @function Assets.resolveAsset * @param {string|Assets.ResolveOptions} source - The hash or path to resolve if a string, otherwise an object specifying * what to resolve. If a string, it may have a leading "atp:". - * @param {Assets~resolveAssetCallback} callback - The function to call upon completion. May be a function identifier or - * an inline function. + * @param {Assets.CallbackDetails|Assets~resolveAssetCallback} callback - The function to call upon completion. May be a + * function identifier or an inline function. * @example Get the hash and URL for a path. * Assets.resolveAsset( * "/assetsExamples/helloWorld.txt", @@ -396,13 +382,6 @@ public: * function identifier, or the name of a function in a string. If the name of a function or a function identifier, it * must be a member of scope. */ - /**jsdoc - * Resolves and returns information on a hash or a path in the asset server. - * @function Assets.resolveAsset - * @param {string|Assets.ResolveOptions} source - The hash or path to resolve if a string, otherwise an object specifying - * what to resolve. If a string, it may have a leading "atp:". - * @param {Assets.CallbackDetails} callbackDetails - Details of the function to call upon completion. - */ Q_INVOKABLE void resolveAsset(QScriptValue options, QScriptValue scope, QScriptValue callback = QScriptValue()); /**jsdoc @@ -430,8 +409,8 @@ public: * Decompresses data in memory using gunzip. * @function Assets.decompressData * @param {Assets.DecompressOptions} source - What to decompress and decompression options. - * @param {Assets~decompressDataCallback} callback - The function to call upon completion. May be a function identifier or - * an inline function. + * @param {Assets.CallbackDetails|Assets~decompressDataCallback} callback - The function to call upon completion. May be a + * function identifier or an inline function. */ /**jsdoc * Decompresses data in memory using gunzip. @@ -443,12 +422,6 @@ public: * function identifier, or the name of a function in a string. If the name of a function or a function identifier, it * must be a member of scope. */ - /**jsdoc - * Decompresses data in memory using gunzip. - * @function Assets.decompressData - * @param {Assets.DecompressOptions} source - What to decompress and decompression options. - * @param {Assets.CallbackDetails} callbackDetails - Details of the function to call upon completion. - */ Q_INVOKABLE void decompressData(QScriptValue options, QScriptValue scope, QScriptValue callback = QScriptValue()); /**jsdoc @@ -478,8 +451,8 @@ public: * @function Assets.compressData * @param {Assets.CompressOptions|ArrayBuffer|string} source - What to compress and compression options. If an ArrayBuffer * or a string, the data to compress. - * @param {Assets~compressDataCallback} callback - The function to call upon completion. May be a function identifier or an - * inline function. + * @param {Assets.CallbackDetails|Assets~compressDataCallback} callback - The function to call upon completion. May be a + * function identifier or an inline function. */ /**jsdoc * Compresses data in memory using gzip. @@ -492,13 +465,6 @@ public: * function identifier, or the name of a function in a string. If the name of a function or a function identifier, it * must be a member of scope. */ - /**jsdoc - * Compresses data in memory using gzip. - * @function Assets.compressData - * @param {Assets.CompressOptions|ArrayBuffer|string} source - What to compress and compressopn options. If an ArrayBuffer - * or a string, the data to compress. - * @param {Assets.CallbackDetails} callbackDetails - Details of the function to call upon completion. - */ Q_INVOKABLE void compressData(QScriptValue options, QScriptValue scope, QScriptValue callback = QScriptValue()); /**jsdoc