[ExecString] combine SplitParameters with identical function of CUtil
[xbmc.git] / xbmc / application / AppEnvironment.cpp
blob32d4c4f715fa330d765b381d562e957778ea85a4
1 /*
2 * Copyright (C) 2005-2022 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
9 #include "AppEnvironment.h"
11 #include "ServiceBroker.h"
12 #include "settings/SettingsComponent.h"
13 #include "utils/log.h"
15 void CAppEnvironment::SetUp(const std::shared_ptr<CAppParams>& appParams)
17 CServiceBroker::RegisterAppParams(appParams);
18 CServiceBroker::CreateLogging();
19 const auto settingsComponent = std::make_shared<CSettingsComponent>();
20 settingsComponent->Initialize();
21 CServiceBroker::RegisterSettingsComponent(settingsComponent);
24 void CAppEnvironment::TearDown()
26 CServiceBroker::GetLogging().UnregisterFromSettings();
27 CServiceBroker::GetSettingsComponent()->Deinitialize();
28 CServiceBroker::UnregisterSettingsComponent();
29 CServiceBroker::GetLogging().Deinitialize();
30 CServiceBroker::DestroyLogging();
31 CServiceBroker::UnregisterAppParams();