Merge pull request #15008 from ctrlaltdavid/M21128-a

Case 21128: AccountServices, HifiAbout, and WalletScriptingInterface JSDoc review
This commit is contained in:
Shannon Romano 2019-03-05 11:58:37 -08:00 committed by GitHub
commit 3eff5d269f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 41 additions and 41 deletions

View file

@ -16,8 +16,8 @@
#include <QObject>
/**jsdoc
* The <code>HifiAbout</code> API provides information about the version of Interface that is currently running. It also
* provides the ability to open a Web page in an Interface browser window.
* The <code>HifiAbout</code> API provides information about the version of Interface that is currently running. It also
* has the functionality to open a web page in an Interface browser window.
*
* @namespace HifiAbout
*
@ -30,9 +30,9 @@
* @property {string} qtVersion - The Qt version used in Interface that is currently running. <em>Read-only.</em>
*
* @example <caption>Report build information for the version of Interface currently running.</caption>
* print("HiFi build date: " + HifiAbout.buildDate); // 11 Feb 2019
* print("HiFi version: " + HifiAbout.buildVersion); // 0.78.0
* print("Qt version: " + HifiAbout.qtVersion); // 5.10.1
* print("HiFi build date: " + HifiAbout.buildDate); // Returns the build date of the version of Interface currently running on your machine.
* print("HiFi version: " + HifiAbout.buildVersion); // Returns the build version of Interface currently running on your machine.
* print("Qt version: " + HifiAbout.qtVersion); // Returns the Qt version details of the version of Interface currently running on your machine.
*/
class AboutUtil : public QObject {
@ -52,9 +52,9 @@ public:
public slots:
/**jsdoc
* Display a Web page in an Interface browser window.
* Display a web page in an Interface browser window.
* @function HifiAbout.openUrl
* @param {string} url - The URL of the Web page to display.
* @param {string} url - The URL of the web page you want to view in Interface.
*/
void openUrl(const QString &url) const;
private:

View file

@ -62,8 +62,8 @@ public:
* <tr><th>Value</th><th>Meaning</th><th>Description</th></tr>
* </thead>
* <tbody>
* <tr><td><code>0</code></td><td>Not logged in</td><td>The user isn't logged in.</td></tr>
* <tr><td><code>1</code></td><td>Not set up</td><td>The user's wallet isn't set up.</td></tr>
* <tr><td><code>0</code></td><td>Not logged in</td><td>The user is not logged in.</td></tr>
* <tr><td><code>1</code></td><td>Not set up</td><td>The user's wallet has not been set up.</td></tr>
* <tr><td><code>2</code></td><td>Pre-existing</td><td>There is a wallet present on the server but not one
* locally.</td></tr>
* <tr><td><code>3</code></td><td>Conflicting</td><td>There is a wallet present on the server plus one present locally,
@ -73,8 +73,8 @@ public:
* <tr><td><code>5</code></td><td>Ready</td><td>The wallet is ready for use.</td></tr>
* </tbody>
* </table>
* <p>Wallets used to be stored locally but now they're stored on the server, unless the computer once had a wallet stored
* locally in which case the wallet may be present in both places.</p>
* <p>Wallets used to be stored locally but now they're only stored on the server. A wallet is present in both places if
* your computer previously stored its information locally.</p>
* @typedef {number} WalletScriptingInterface.WalletStatus
*/
enum WalletStatus {

View file

@ -115,8 +115,8 @@ DownloadInfoResult::DownloadInfoResult() :
/**jsdoc
* Information on the assets currently being downloaded and pending download.
* @typedef {object} AccountServices.DownloadInfoResult
* @property {number[]} downloading - The percentage complete for each asset currently being downloaded.
* @property {number} pending - The number of assets waiting to be download.
* @property {number[]} downloading - The download percentage remaining of each asset currently downloading.
* @property {number} pending - The number of assets pending download.
*/
QScriptValue DownloadInfoResultToScriptValue(QScriptEngine* engine, const DownloadInfoResult& result) {
QScriptValue object = engine->newObject();

View file

@ -38,19 +38,19 @@ class AccountServicesScriptingInterface : public QObject {
Q_OBJECT
/**jsdoc
* The <code>AccountServices</code> API provides functions related to user connectivity, visibility, and asset download
* progress.
* The <code>AccountServices</code> API provides functions that give information on user connectivity, visibility, and
* asset download progress.
*
* @hifi-interface
* @hifi-client-entity
* @hifi-avatar
*
* @namespace AccountServices
* @property {string} username - The user name if the user is logged in, otherwise <code>"Unknown user"</code>.
* <em>Read-only.</em>
* @property {string} username - The user name of the user logged in. If there is no user logged in, it is
* <code>"Unknown user"</code>. <em>Read-only.</em>
* @property {boolean} loggedIn - <code>true</code> if the user is logged in, otherwise <code>false</code>.
* <em>Read-only.</em>
* @property {string} findableBy - The user's visibility to other people:<br />
* @property {string} findableBy - The user's visibility to other users:<br />
* <code>"none"</code> - user appears offline.<br />
* <code>"friends"</code> - user is visible only to friends.<br />
* <code>"connections"</code> - user is visible to friends and connections.<br />
@ -74,23 +74,23 @@ public:
public slots:
/**jsdoc
* Get information on the progress of downloading assets in the domain.
* Gets information on the download progress of assets in the domain.
* @function AccountServices.getDownloadInfo
* @returns {AccountServices.DownloadInfoResult} Information on the progress of assets download.
* @returns {AccountServices.DownloadInfoResult} Information on the download progress of assets.
*/
DownloadInfoResult getDownloadInfo();
/**jsdoc
* Cause a {@link AccountServices.downloadInfoChanged|downloadInfoChanged} signal to be triggered with information on the
* current progress of the download of assets in the domain.
* Triggers a {@link AccountServices.downloadInfoChanged|downloadInfoChanged} signal with information on the current
* download progress of the assets in the domain.
* @function AccountServices.updateDownloadInfo
*/
void updateDownloadInfo();
/**jsdoc
* Check whether the user is logged in.
* Checks whether the user is logged in.
* @function AccountServices.isLoggedIn
* @returns {boolean} <code>true</code> if the user is logged in, <code>false</code> otherwise.
* @returns {boolean} <code>true</code> if the user is logged in, <code>false</code> if not.
* @example <caption>Report whether you are logged in.</caption>
* var isLoggedIn = AccountServices.isLoggedIn();
* print("You are logged in: " + isLoggedIn); // true or false
@ -98,9 +98,9 @@ public slots:
bool isLoggedIn();
/**jsdoc
* Prompts the user to log in (the login dialog is displayed) if they're not already logged in.
* The function returns the login status of the user and prompts the user to log in (with a login dialog) if they're not already logged in.
* @function AccountServices.checkAndSignalForAccessToken
* @returns {boolean} <code>true</code> if the user is already logged in, <code>false</code> otherwise.
* @returns {boolean} <code>true</code> if the user is logged in, <code>false</code> if not.
*/
bool checkAndSignalForAccessToken();
@ -140,7 +140,7 @@ signals:
/**jsdoc
* Triggered when the username logged in with changes, i.e., when the user logs in or out.
* @function AccountServices.myUsernameChanged
* @param {string} username - The username logged in with if the user is logged in, otherwise <code>""</code>.
* @param {string} username - The user name of the user logged in. If there is no user logged in, it is <code>""</code>.
* @returns {Signal}
* @example <caption>Report when your username changes.</caption>
* AccountServices.myUsernameChanged.connect(function (username) {
@ -150,9 +150,9 @@ signals:
void myUsernameChanged(const QString& username);
/**jsdoc
* Triggered when the progress of the download of assets for the domain changes.
* Triggered when the download progress of the assets in the domain changes.
* @function AccountServices.downloadInfoChanged
* @param {AccountServices.DownloadInfoResult} downloadInfo - Information on the progress of assets download.
* @param {AccountServices.DownloadInfoResult} downloadInfo - Information on the download progress of assets.
* @returns {Signal}
*/
void downloadInfoChanged(DownloadInfoResult info);
@ -186,7 +186,7 @@ signals:
/**jsdoc
* Triggered when the login status of the user changes.
* @function AccountServices.loggedInChanged
* @param {boolean} loggedIn - <code>true</code> if the user is logged in, otherwise <code>false</code>.
* @param {boolean} loggedIn - <code>true</code> if the user is logged in, <code>false</code> if not.
* @returns {Signal}
* @example <caption>Report when your login status changes.</caption>
* AccountServices.loggedInChanged.connect(function(loggedIn) {

View file

@ -41,8 +41,8 @@ public:
*
* @property {WalletScriptingInterface.WalletStatus} walletStatus - The status of the user's wallet. <em>Read-only.</em>
* @property {boolean} limitedCommerce - <code>true</code> if Interface is running in limited commerce mode. In limited commerce
* mode, certain Interface functionality is disabled, e.g., users can't buy non-free items from the Marketplace. The Oculus
* Store version of Interface runs in limited commerce mode. <em>Read-only.</em>
* mode, certain Interface functionalities are disabled, e.g., users can't buy items that are not free from the Marketplace.
* The Oculus Store version of Interface runs in limited commerce mode. <em>Read-only.</em>
*/
class WalletScriptingInterface : public QObject, public Dependency {
Q_OBJECT
@ -55,16 +55,16 @@ public:
WalletScriptingInterface();
/**jsdoc
* Check and update the user's wallet status.
* Checks and updates the user's wallet status.
* @function WalletScriptingInterface.refreshWalletStatus
*/
Q_INVOKABLE void refreshWalletStatus();
/**jsdoc
* Get the current status of the user's wallet.
* Gets the current status of the user's wallet.
* @function WalletScriptingInterface.getWalletStatus
* @returns {WalletScriptingInterface.WalletStatus}
* @example <caption>Two ways to report your wallet status.</caption>
* @example <caption>Use two methods to report your wallet's status.</caption>
* print("Wallet status: " + WalletScriptingInterface.walletStatus); // Same value as next line.
* print("Wallet status: " + WalletScriptingInterface.getWalletStatus());
*/
@ -74,11 +74,11 @@ public:
* Check that a certified avatar entity is owned by the avatar whose entity it is. The result of the check is provided via
* the {@link WalletScriptingInterface.ownershipVerificationSuccess|ownershipVerificationSuccess} and
* {@link WalletScriptingInterface.ownershipVerificationFailed|ownershipVerificationFailed} signals.<br />
* <strong>Warning:</strong> Neither of these signals fire if the entity is not an avatar entity or it's not a certified
* entity.
* <strong>Warning:</strong> Neither of these signals are triggered if the entity is not an avatar entity or is not
* certified.
* @function WalletScriptingInterface.proveAvatarEntityOwnershipVerification
* @param {Uuid} entityID - The ID of the avatar entity to check.
* @example <caption>Check ownership of all nearby certified avatar entities.</caption>
* @param {Uuid} entityID - The avatar entity's ID.
* @example <caption>Check the ownership of all nearby certified avatar entities.</caption>
* // Set up response handling.
* function ownershipSuccess(entityID) {
* print("Ownership test succeeded for: " + entityID);
@ -118,7 +118,7 @@ public:
signals:
/**jsdoc
* Triggered when the status of the user's wallet changes.
* Triggered when the user's wallet status changes.
* @function WalletScriptingInterface.walletStatusChanged
* @returns {Signal}
* @example <caption>Report when your wallet status changes, e.g., when you log in and out.</caption>
@ -136,7 +136,7 @@ signals:
void limitedCommerceChanged();
/**jsdoc
* Triggered when the user rezzes a certified entity but the user's wallet is not ready and so the certified location of the
* Triggered when the user rezzes a certified entity but the user's wallet is not ready. So the certified location of the
* entity cannot be updated in the metaverse.
* @function WalletScriptingInterface.walletNotSetup
* @returns {Signal}