mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 00:36:30 +02:00
Add API call to retrieve user agent.
This commit is contained in:
parent
647b45323e
commit
f4016bb0d5
2 changed files with 12 additions and 0 deletions
|
@ -29,6 +29,7 @@
|
||||||
#include "Menu.h"
|
#include "Menu.h"
|
||||||
#include "OffscreenUi.h"
|
#include "OffscreenUi.h"
|
||||||
#include "commerce/QmlCommerce.h"
|
#include "commerce/QmlCommerce.h"
|
||||||
|
#include "NetworkingConstants.h"
|
||||||
|
|
||||||
static const QString DESKTOP_LOCATION = QStandardPaths::writableLocation(QStandardPaths::DesktopLocation);
|
static const QString DESKTOP_LOCATION = QStandardPaths::writableLocation(QStandardPaths::DesktopLocation);
|
||||||
static const QString LAST_BROWSE_LOCATION_SETTING = "LastBrowseLocation";
|
static const QString LAST_BROWSE_LOCATION_SETTING = "LastBrowseLocation";
|
||||||
|
@ -411,6 +412,10 @@ QString WindowScriptingInterface::checkVersion() {
|
||||||
return QCoreApplication::applicationVersion();
|
return QCoreApplication::applicationVersion();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString WindowScriptingInterface::getUserAgent() {
|
||||||
|
return NetworkingConstants::VIRCADIA_USER_AGENT;
|
||||||
|
}
|
||||||
|
|
||||||
QString WindowScriptingInterface::protocolSignature() {
|
QString WindowScriptingInterface::protocolSignature() {
|
||||||
return protocolVersionsSignatureBase64();
|
return protocolVersionsSignatureBase64();
|
||||||
}
|
}
|
||||||
|
|
|
@ -295,6 +295,13 @@ public slots:
|
||||||
*/
|
*/
|
||||||
QString checkVersion();
|
QString checkVersion();
|
||||||
|
|
||||||
|
/**jsdoc
|
||||||
|
* Gets Interface's user agent.
|
||||||
|
* @function Window.getUserAgent
|
||||||
|
* @returns {string} Interface's user agent.
|
||||||
|
*/
|
||||||
|
QString getUserAgent();
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* Gets the signature for Interface's protocol version.
|
* Gets the signature for Interface's protocol version.
|
||||||
* @function Window.protocolSignature
|
* @function Window.protocolSignature
|
||||||
|
|
Loading…
Reference in a new issue