From 176dbb5557196453046fbae656b20c08a28bf95c Mon Sep 17 00:00:00 2001 From: David Rowe Date: Sun, 13 May 2018 11:02:09 +1200 Subject: [PATCH] Wallet API JSDoc stubs --- .../src/scripting/WalletScriptingInterface.h | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/interface/src/scripting/WalletScriptingInterface.h b/interface/src/scripting/WalletScriptingInterface.h index 9e40aad087..45661d939b 100644 --- a/interface/src/scripting/WalletScriptingInterface.h +++ b/interface/src/scripting/WalletScriptingInterface.h @@ -30,6 +30,14 @@ public: }; +/**jsdoc + * @namespace Wallet + * + * @hifi-interface + * @hifi-client-entity + * + * @property {number} walletStatus + */ class WalletScriptingInterface : public QObject, public Dependency { Q_OBJECT @@ -38,17 +46,53 @@ class WalletScriptingInterface : public QObject, public Dependency { public: WalletScriptingInterface(); + /**jsdoc + * @function Wallet.refreshWalletStatus + */ Q_INVOKABLE void refreshWalletStatus(); + + /**jsdoc + * @function Wallet.getWalletStatus + * @returns {number} + */ Q_INVOKABLE uint getWalletStatus() { return _walletStatus; } + + /**jsdoc + * @function Wallet.proveAvatarEntityOwnershipVerification + * @param {Uuid} entityID + */ Q_INVOKABLE void proveAvatarEntityOwnershipVerification(const QUuid& entityID); + // setWalletStatus() should never be made Q_INVOKABLE. If it were, // scripts could cause the Wallet to incorrectly report its status. void setWalletStatus(const uint& status); signals: + + /**jsdoc + * @function Wallet.walletStatusChanged + * @returns {Signal} + */ void walletStatusChanged(); + + /**jsdoc + * @function Wallet.walletNotSetup + * @returns {Signal} + */ void walletNotSetup(); + + /**jsdoc + * @function Wallet.ownershipVerificationSuccess + * @property {Uuid} entityID + * @returns {Signal} + */ void ownershipVerificationSuccess(const QUuid& entityID); + + /**jsdoc + * @function Wallet.ownershipVerificationFailed + * @property {Uuid} entityID + * @returns {Signal} + */ void ownershipVerificationFailed(const QUuid& entityID); private: