Showing the changes to interface/src/scripting/AccountServicesScriptingInterface.cpp (1 of 34 files). Show all
Unified · Split
| @@ -4,6 +4,7 @@ · 3 unmodified lines | |||
| 4 | // | 4 | // |
| 5 | // Created by Thijs Wenker on 9/10/14. | 5 | // Created by Thijs Wenker on 9/10/14. |
| 6 | // Copyright 2014 High Fidelity, Inc. | 6 | // Copyright 2014 High Fidelity, Inc. |
| 7 | // Copyright 2022 Overte e.V. | ||
| 7 | // | 8 | // |
| 8 | // Distributed under the Apache License, Version 2.0. | 9 | // Distributed under the Apache License, Version 2.0. |
| 9 | // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html | 10 | // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html |
| @@ -11,11 +12,19 @@ · 1 unmodified line | |||
| 11 | 12 | ||
| 12 | #include "AccountServicesScriptingInterface.h" | 13 | #include "AccountServicesScriptingInterface.h" |
| 13 | 14 | ||
| 15 | #include <ScriptEngineCast.h> | ||
| 16 | |||
| 14 | #include "AccountManager.h" | 17 | #include "AccountManager.h" |
| 15 | #include "Application.h" | 18 | #include "Application.h" |
| 16 | #include "DiscoverabilityManager.h" | 19 | #include "DiscoverabilityManager.h" |
| 17 | #include "ResourceCache.h" | 20 | #include "ResourceCache.h" |
| 18 | 21 | ||
| 22 | STATIC_SCRIPT_TYPES_INITIALIZER(+[](ScriptManager* manager){ | ||
| 23 | auto scriptEngine = manager->engine().get(); | ||
| 24 | |||
| 25 | scriptRegisterMetaType(scriptEngine, DownloadInfoResultToScriptValue, DownloadInfoResultFromScriptValue); | ||
| 26 | }); | ||
| 27 | |||
| 19 | AccountServicesScriptingInterface::AccountServicesScriptingInterface() { | 28 | AccountServicesScriptingInterface::AccountServicesScriptingInterface() { |
| 20 | auto accountManager = DependencyManager::get<AccountManager>(); | 29 | auto accountManager = DependencyManager::get<AccountManager>(); |
| 21 | connect(accountManager.data(), &AccountManager::usernameChanged, this, &AccountServicesScriptingInterface::onUsernameChanged); | 30 | connect(accountManager.data(), &AccountManager::usernameChanged, this, &AccountServicesScriptingInterface::onUsernameChanged); |