Showing the changes to libraries/script-engine/src/ScriptManagerScriptingInterface.h (1 of 3 files). Show all
Unified · Split
| @@ -581,6 +581,22 @@ public: · 580 unmodified lines | ||
| 581 | 581 | Q_INVOKABLE void removeServerEntityScriptMessagesRequest(); |
| 582 | 582 | Q_INVOKABLE void removeServerEntityScriptMessagesRequest(const QUuid& entityID); |
| 583 | 583 | |
| 584 | + /*@jsdoc | |
| 585 | + * This decodes Base64 string and returns contents as ArrayBuffer. | |
| 586 | + * @function Script.atob | |
| 587 | + * @param {String} base64 - String with Base64-encoded binary data. | |
| 588 | + * @returns {ArrayBuffer} Decoded binary data. | |
| 589 | + */ | |
| 590 | + Q_INVOKABLE QByteArray atob(const QString &base64); | |
| 591 | + | |
| 592 | + /*@jsdoc | |
| 593 | + * This encodes ArrayBuffer and returns Base64-encoded string. | |
| 594 | + * @function Script.btoa | |
| 595 | + * @param {ArrayBuffer} binary - Data to be encoded. | |
| 596 | + * @returns {String} String with Base64-encoded binary data. | |
| 597 | + */ | |
| 598 | + Q_INVOKABLE QString btoa(const QByteArray &binary); | |
| 599 | + | |
| 584 | 600 | signals: |
| 585 | 601 | |
| 586 | 602 | /*@jsdoc |