mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 09:15:34 +08:00
refs #507, split up blackmiscfreefunctions
* single register metadata functions * string utils * metadata utils * some formatting / license header where applicable
This commit is contained in:
@@ -8,9 +8,9 @@
|
||||
*/
|
||||
|
||||
#include "blackcore/airspace_analyzer.h"
|
||||
#include "blackcore/blackcorefreefunctions.h"
|
||||
#include "blackcore/registermetadata.h"
|
||||
#include "blackmisc/logmessage.h"
|
||||
#include "blackmisc/threadutilities.h"
|
||||
#include "blackmisc/threadutils.h"
|
||||
#include <QDateTime>
|
||||
|
||||
using namespace BlackMisc;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*/
|
||||
|
||||
#include "airspace_monitor.h"
|
||||
#include "blackcore/blackcorefreefunctions.h"
|
||||
#include "blackcore/registermetadata.h"
|
||||
#include "blackcore/webdataservices.h"
|
||||
#include "blackcore/vatsimbookingreader.h"
|
||||
#include "blackcore/vatsimdatafilereader.h"
|
||||
@@ -17,15 +17,16 @@
|
||||
#include "blackmisc/logmessage.h"
|
||||
#include "blackmisc/blackmiscfreefunctions.h"
|
||||
#include "blackmisc/propertyindexallclasses.h"
|
||||
#include "blackmisc/threadutilities.h"
|
||||
#include "blackmisc/threadutils.h"
|
||||
|
||||
using namespace BlackMisc;
|
||||
using namespace BlackMisc::Aviation;
|
||||
using namespace BlackMisc::Audio;
|
||||
using namespace BlackMisc::Simulation;
|
||||
using namespace BlackMisc::Network;
|
||||
using namespace BlackMisc::Aviation;
|
||||
using namespace BlackMisc::Geo;
|
||||
using namespace BlackMisc::Json;
|
||||
using namespace BlackMisc::Network;
|
||||
using namespace BlackMisc::PhysicalQuantities;
|
||||
using namespace BlackMisc::Simulation;
|
||||
using namespace BlackMisc::Weather;
|
||||
|
||||
namespace BlackCore
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
/* Copyright (C) 2013 VATSIM Community / contributors
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef BLACKCORE_FREEFUNCTIONS_H
|
||||
#define BLACKCORE_FREEFUNCTIONS_H
|
||||
|
||||
#include "blackcoreexport.h"
|
||||
#include <QObject>
|
||||
|
||||
namespace BlackCore
|
||||
{
|
||||
//! Register all relevant metadata in BlackCore
|
||||
BLACKCORE_EXPORT void registerMetadata();
|
||||
|
||||
} // ns
|
||||
|
||||
#endif // guard
|
||||
@@ -19,8 +19,9 @@
|
||||
#include "blackmisc/network/networkutils.h"
|
||||
#include "blackmisc/aviation/atcstationlist.h"
|
||||
#include "blackmisc/logmessage.h"
|
||||
#include "blackmisc/simplecommandparser.h"
|
||||
#include "blackmisc/simulation/ownaircraftprovider.h"
|
||||
#include "blackmisc/simplecommandparser.h"
|
||||
#include "blackmisc/stringutils.h"
|
||||
|
||||
#include <QtXml/QDomElement>
|
||||
#include <QNetworkReply>
|
||||
|
||||
@@ -7,15 +7,17 @@
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "blackcore/context_runtime.h"
|
||||
#include "blackcore/context_all_impl.h"
|
||||
#include "blackcore/context_all_proxies.h"
|
||||
#include "blackcore/context_all_empties.h"
|
||||
#include "blackcore/blackcorefreefunctions.h"
|
||||
#include "blackcore/registermetadata.h"
|
||||
#include "blackmisc/network/server.h"
|
||||
#include "blackmisc/statusmessagelist.h"
|
||||
#include "blackmisc/blackmiscfreefunctions.h"
|
||||
#include "blackmisc/registermetadata.h"
|
||||
#include "blackmisc/stringutils.h"
|
||||
#include "blackmisc/logmessage.h"
|
||||
#include "blackcore/context_runtime.h"
|
||||
|
||||
#include <QMap>
|
||||
#include <QDebug>
|
||||
@@ -106,8 +108,8 @@ namespace BlackCore
|
||||
void CRuntime::registerMetadata()
|
||||
{
|
||||
BlackMisc::registerMetadata();
|
||||
BlackMisc::initResources();
|
||||
BlackCore::registerMetadata();
|
||||
BlackMisc::initResources();
|
||||
}
|
||||
|
||||
bool CRuntime::parseCommandLine(const QString &commandLine, const CIdentifier &originator)
|
||||
|
||||
@@ -14,11 +14,11 @@
|
||||
#include "context_network_impl.h"
|
||||
#include "plugin_manager_simulator.h"
|
||||
#include "context_runtime.h"
|
||||
#include "blackcore/blackcorefreefunctions.h"
|
||||
#include "blackcore/registermetadata.h"
|
||||
#include "blackmisc/propertyindexvariantmap.h"
|
||||
#include "blackmisc/logmessage.h"
|
||||
#include "blackmisc/loghandler.h"
|
||||
#include "blackmisc/threadutilities.h"
|
||||
#include "blackmisc/threadutils.h"
|
||||
#include <QPluginLoader>
|
||||
#include <QLibrary>
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*/
|
||||
|
||||
#include "blackcore/cookiemanager.h"
|
||||
#include "blackmisc/threadutilities.h"
|
||||
#include "blackmisc/threadutils.h"
|
||||
#include <QCoreApplication>
|
||||
#include <QNetworkCookieJar>
|
||||
#include <QReadLocker>
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "blackmisc/project.h"
|
||||
#include "blackmisc/math/mathutils.h"
|
||||
#include "blackmisc/blackmiscfreefunctions.h"
|
||||
#include "blackmisc/stringutils.h"
|
||||
#include <QStringList>
|
||||
|
||||
using namespace BlackMisc;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include "blackmisc/network/networkutils.h"
|
||||
#include "blackmisc/logmessage.h"
|
||||
#include "blackmisc/network/networkutils.h"
|
||||
#include "blackmisc/fileutilities.h"
|
||||
#include "blackmisc/fileutils.h"
|
||||
#include "blackmisc/json.h"
|
||||
#include "icaodatareader.h"
|
||||
#include <QRegularExpression>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include "blackmisc/sequence.h"
|
||||
#include "blackmisc/logmessage.h"
|
||||
#include "blackmisc/network/networkutils.h"
|
||||
#include "blackmisc/fileutilities.h"
|
||||
#include "blackmisc/fileutils.h"
|
||||
#include "modeldatareader.h"
|
||||
|
||||
#include <QTimer>
|
||||
|
||||
@@ -23,12 +23,13 @@ static_assert(VAT_LIBVATLIB_VERSION == 904, "Wrong vatlib header installed");
|
||||
#define CLIENT_PUBLIC_ID 0xb9ba
|
||||
#define CLIENT_PRIVATE_KEY "727d1efd5cb9f8d2c28372469d922bb4"
|
||||
|
||||
using namespace BlackMisc::PhysicalQuantities;
|
||||
using namespace BlackMisc::Geo;
|
||||
using namespace BlackMisc::Aviation;
|
||||
using namespace BlackMisc::Network;
|
||||
using namespace BlackMisc::Simulation;
|
||||
using namespace BlackMisc;
|
||||
using namespace BlackMisc::Aviation;
|
||||
using namespace BlackMisc::Geo;
|
||||
using namespace BlackMisc::Json;
|
||||
using namespace BlackMisc::Network;
|
||||
using namespace BlackMisc::PhysicalQuantities;
|
||||
using namespace BlackMisc::Simulation;
|
||||
|
||||
namespace BlackCore
|
||||
{
|
||||
|
||||
@@ -3,33 +3,30 @@
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "blackcorefreefunctions.h"
|
||||
#include "registermetadata.h"
|
||||
#include "blackcore/context_application.h"
|
||||
#include "blackcore/webreaderflags.h"
|
||||
#include "blackcore/data/globalsetup.h"
|
||||
#include "blackcore/data/updateinfo.h"
|
||||
|
||||
|
||||
#include "voice_channel.h"
|
||||
#include "network.h"
|
||||
#include "simulator.h"
|
||||
#include "context_application.h"
|
||||
#include "setupreader.h"
|
||||
#include <QThread>
|
||||
|
||||
namespace BlackCore
|
||||
{
|
||||
void registerMetadata()
|
||||
{
|
||||
qDBusRegisterMetaType<BlackCore::IVoiceChannel::ConnectionStatus>();
|
||||
qDBusRegisterMetaType<BlackCore::INetwork::ConnectionStatus>();
|
||||
qDBusRegisterMetaType<BlackCore::INetwork::LoginMode>();
|
||||
qRegisterMetaType<BlackCore::CWebReaderFlags::WebReaderFlag>();
|
||||
qRegisterMetaType<BlackCore::CWebReaderFlags::WebReader>();
|
||||
qDBusRegisterMetaType<BlackCore::CLogSubscriptionHash>();
|
||||
qDBusRegisterMetaType<BlackCore::CLogSubscriptionPair>();
|
||||
qDBusRegisterMetaType<BlackCore::INetwork::ConnectionStatus>();
|
||||
qDBusRegisterMetaType<BlackCore::INetwork::LoginMode>();
|
||||
qDBusRegisterMetaType<BlackCore::IVoiceChannel::ConnectionStatus>();
|
||||
qRegisterMetaType<BlackCore::CWebReaderFlags::WebReader>();
|
||||
qRegisterMetaType<BlackCore::CWebReaderFlags::WebReaderFlag>();
|
||||
|
||||
BlackCore::Data::CGlobalSetup::registerMetadata();
|
||||
BlackCore::Data::CUpdateInfo::registerMetadata();
|
||||
BlackCore::CSetupReader::instance(); // kick off reader
|
||||
BlackCore::CSetupReader::instance(); //! \todo will go into new runtime
|
||||
}
|
||||
} // namespace
|
||||
24
src/blackcore/registermetadata.h
Normal file
24
src/blackcore/registermetadata.h
Normal file
@@ -0,0 +1,24 @@
|
||||
/* Copyright (C) 2015
|
||||
* swift Project Community / Contributors
|
||||
*
|
||||
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
|
||||
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
|
||||
* including this file, may be copied, modified, propagated, or distributed except according to the terms
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
//! \file
|
||||
|
||||
#ifndef BLACKCORE_REGISTERMETADATA_H
|
||||
#define BLACKCORE_REGISTERMETADATA_H
|
||||
|
||||
#include "blackcoreexport.h"
|
||||
|
||||
namespace BlackCore
|
||||
{
|
||||
//! Register all relevant metadata in BlackCore
|
||||
BLACKCORE_EXPORT void registerMetadata();
|
||||
|
||||
} // ns
|
||||
|
||||
#endif // guard
|
||||
@@ -12,7 +12,7 @@
|
||||
#include "blackmisc/logmessage.h"
|
||||
#include "blackmisc/json.h"
|
||||
#include "blackmisc/project.h"
|
||||
#include "blackmisc/fileutilities.h"
|
||||
#include "blackmisc/fileutils.h"
|
||||
#include "blackmisc/logmessage.h"
|
||||
#include "setupreader.h"
|
||||
#include <QJsonDocument>
|
||||
|
||||
@@ -9,11 +9,11 @@
|
||||
|
||||
#include "simulator_common.h"
|
||||
#include "blackcore/interpolator.h"
|
||||
#include "blackcore/blackcorefreefunctions.h"
|
||||
#include "blackcore/registermetadata.h"
|
||||
#include "blackmisc/logmessage.h"
|
||||
#include "blackmisc/loghandler.h"
|
||||
#include "blackmisc/collection.h"
|
||||
#include "blackmisc/threadutilities.h"
|
||||
#include "blackmisc/threadutils.h"
|
||||
|
||||
using namespace BlackMisc;
|
||||
using namespace BlackMisc::Aviation;
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#include "data/globalsetup.h"
|
||||
#include "blackmisc/network/networkutils.h"
|
||||
#include "blackmisc/logmessage.h"
|
||||
#include "blackmisc/fileutilities.h"
|
||||
#include "blackmisc/fileutils.h"
|
||||
#include "blackmisc/worker.h"
|
||||
#include "blackmisc/json.h"
|
||||
#include <QJsonObject>
|
||||
|
||||
Reference in New Issue
Block a user