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 | 5 | // Created by Thijs Wenker on 9/10/14. |
| 6 | 6 | // Copyright 2014 High Fidelity, Inc. |
| 7 | +// Copyright 2022 Overte e.V. | |
| 7 | 8 | // |
| 8 | 9 | // Distributed under the Apache License, Version 2.0. |
| 9 | 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 | 13 | #include "AccountServicesScriptingInterface.h" |
| 13 | 14 | |
| 15 | +#include <ScriptEngineCast.h> | |
| 16 | + | |
| 14 | 17 | #include "AccountManager.h" |
| 15 | 18 | #include "Application.h" |
| 16 | 19 | #include "DiscoverabilityManager.h" |
| 17 | 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 | 28 | AccountServicesScriptingInterface::AccountServicesScriptingInterface() { |
| 20 | 29 | auto accountManager = DependencyManager::get<AccountManager>(); |
| 21 | 30 | connect(accountManager.data(), &AccountManager::usernameChanged, this, &AccountServicesScriptingInterface::onUsernameChanged); |