Wallet API JSDoc stubs

This commit is contained in:
David Rowe 2018-05-13 11:02:09 +12:00
parent 46ebb0457e
commit 176dbb5557

View file

@ -30,6 +30,14 @@ public:
}; };
/**jsdoc
* @namespace Wallet
*
* @hifi-interface
* @hifi-client-entity
*
* @property {number} walletStatus
*/
class WalletScriptingInterface : public QObject, public Dependency { class WalletScriptingInterface : public QObject, public Dependency {
Q_OBJECT Q_OBJECT
@ -38,17 +46,53 @@ class WalletScriptingInterface : public QObject, public Dependency {
public: public:
WalletScriptingInterface(); WalletScriptingInterface();
/**jsdoc
* @function Wallet.refreshWalletStatus
*/
Q_INVOKABLE void refreshWalletStatus(); Q_INVOKABLE void refreshWalletStatus();
/**jsdoc
* @function Wallet.getWalletStatus
* @returns {number}
*/
Q_INVOKABLE uint getWalletStatus() { return _walletStatus; } Q_INVOKABLE uint getWalletStatus() { return _walletStatus; }
/**jsdoc
* @function Wallet.proveAvatarEntityOwnershipVerification
* @param {Uuid} entityID
*/
Q_INVOKABLE void proveAvatarEntityOwnershipVerification(const QUuid& entityID); Q_INVOKABLE void proveAvatarEntityOwnershipVerification(const QUuid& entityID);
// setWalletStatus() should never be made Q_INVOKABLE. If it were, // setWalletStatus() should never be made Q_INVOKABLE. If it were,
// scripts could cause the Wallet to incorrectly report its status. // scripts could cause the Wallet to incorrectly report its status.
void setWalletStatus(const uint& status); void setWalletStatus(const uint& status);
signals: signals:
/**jsdoc
* @function Wallet.walletStatusChanged
* @returns {Signal}
*/
void walletStatusChanged(); void walletStatusChanged();
/**jsdoc
* @function Wallet.walletNotSetup
* @returns {Signal}
*/
void walletNotSetup(); void walletNotSetup();
/**jsdoc
* @function Wallet.ownershipVerificationSuccess
* @property {Uuid} entityID
* @returns {Signal}
*/
void ownershipVerificationSuccess(const QUuid& entityID); void ownershipVerificationSuccess(const QUuid& entityID);
/**jsdoc
* @function Wallet.ownershipVerificationFailed
* @property {Uuid} entityID
* @returns {Signal}
*/
void ownershipVerificationFailed(const QUuid& entityID); void ownershipVerificationFailed(const QUuid& entityID);
private: private: