From a13d90ada44fd713db1402da75632770cc783ed4 Mon Sep 17 00:00:00 2001 From: Roland Winklmeier Date: Fri, 10 Apr 2015 21:54:55 +0200 Subject: [PATCH] refs #403 add BlackCore shared library build --- src/blackcore/airspace_monitor.h | 3 ++- src/blackcore/airspace_watchdog.h | 3 ++- src/blackcore/audio_device.h | 3 ++- src/blackcore/audio_device_vatlib.h | 3 ++- src/blackcore/audio_mixer.h | 3 ++- src/blackcore/audio_mixer_vatlib.h | 3 ++- src/blackcore/blackcore.pro | 4 +++- src/blackcore/blackcoreexport.h | 27 +++++++++++++++++++++++ src/blackcore/blackcorefreefunctions.h | 5 +++-- src/blackcore/context.h | 3 ++- src/blackcore/context_application.h | 3 ++- src/blackcore/context_application_impl.h | 3 ++- src/blackcore/context_application_proxy.h | 3 ++- src/blackcore/context_audio.h | 3 ++- src/blackcore/context_audio_empty.h | 3 ++- src/blackcore/context_audio_impl.h | 3 ++- src/blackcore/context_audio_proxy.h | 3 ++- src/blackcore/context_network.h | 3 ++- src/blackcore/context_network_empty.h | 3 ++- src/blackcore/context_network_impl.h | 3 ++- src/blackcore/context_network_proxy.h | 3 ++- src/blackcore/context_ownaircraft.h | 3 ++- src/blackcore/context_ownaircraft_impl.h | 3 ++- src/blackcore/context_ownaircraft_proxy.h | 3 ++- src/blackcore/context_runtime.h | 3 ++- src/blackcore/context_runtime_config.h | 3 ++- src/blackcore/context_settings.h | 3 ++- src/blackcore/context_settings_impl.h | 3 ++- src/blackcore/context_settings_proxy.h | 3 ++- src/blackcore/context_simulator.h | 3 ++- src/blackcore/context_simulator_impl.h | 3 ++- src/blackcore/context_simulator_proxy.h | 3 ++- src/blackcore/dbus_server.h | 3 ++- src/blackcore/input_manager.h | 3 ++- src/blackcore/interpolator.h | 5 +++-- src/blackcore/interpolator_linear.h | 3 ++- src/blackcore/network.h | 3 ++- src/blackcore/network_vatlib.h | 3 ++- src/blackcore/simulator.h | 9 ++++---- src/blackcore/token_bucket.h | 3 ++- src/blackcore/vatsimbookingreader.h | 3 ++- src/blackcore/vatsimdatafilereader.h | 3 ++- src/blackcore/voice.h | 3 ++- src/blackcore/voice_channel.h | 3 ++- src/blackcore/voice_channel_vatlib.h | 3 ++- src/blackcore/voice_vatlib.h | 3 ++- 46 files changed, 123 insertions(+), 50 deletions(-) create mode 100644 src/blackcore/blackcoreexport.h diff --git a/src/blackcore/airspace_monitor.h b/src/blackcore/airspace_monitor.h index ac8ff296f..e6ba0c941 100644 --- a/src/blackcore/airspace_monitor.h +++ b/src/blackcore/airspace_monitor.h @@ -12,6 +12,7 @@ #ifndef BLACKCORE_AIRSPACE_MONITOR_H #define BLACKCORE_AIRSPACE_MONITOR_H +#include "blackcoreexport.h" #include "blackmisc/simulation/simulatedaircraftlist.h" #include "blackmisc/simulation/ownaircraftprovider.h" #include "blackmisc/simulation/remoteaircraftprovider.h" @@ -32,7 +33,7 @@ namespace BlackCore /*! * Keeps track of other entities in the airspace: aircraft, ATC stations, etc. */ - class CAirspaceMonitor : + class BLACKCORE_EXPORT CAirspaceMonitor : public QObject, public BlackMisc::Simulation::IRemoteAircraftProvider, // those data will be provided from the class CAirspaceMonitor public BlackMisc::Simulation::COwnAircraftAwareReadOnly // used to obtain in memory inofmration about own aircraft diff --git a/src/blackcore/airspace_watchdog.h b/src/blackcore/airspace_watchdog.h index e87ff1426..c44453bef 100644 --- a/src/blackcore/airspace_watchdog.h +++ b/src/blackcore/airspace_watchdog.h @@ -12,6 +12,7 @@ #ifndef BLACKCORE_AIRSPACE_WATCHDOG_H #define BLACKCORE_AIRSPACE_WATCHDOG_H +#include "blackcoreexport.h" #include "blackmisc/pq/time.h" #include "blackmisc/aviation/callsign.h" #include @@ -30,7 +31,7 @@ namespace BlackCore * emits a timeout signal if it wasn't resetted during the specified timeout * value. */ - class CAirspaceWatchdog : public QObject + class BLACKCORE_EXPORT CAirspaceWatchdog : public QObject { Q_OBJECT diff --git a/src/blackcore/audio_device.h b/src/blackcore/audio_device.h index 88dabadb7..c4a22008c 100644 --- a/src/blackcore/audio_device.h +++ b/src/blackcore/audio_device.h @@ -12,6 +12,7 @@ #ifndef BLACKCORE_AUDIODEVICE_H #define BLACKCORE_AUDIODEVICE_H +#include "blackcoreexport.h" #include "blackmisc/audio/audiodeviceinfo.h" #include "blackmisc/audio/audiodeviceinfolist.h" #include @@ -22,7 +23,7 @@ namespace BlackCore { //! Audio Input Device //! \todo Settings classes to store hardware settings (hardware device) - class IAudioInputDevice : public QObject + class BLACKCORE_EXPORT IAudioInputDevice : public QObject { Q_OBJECT diff --git a/src/blackcore/audio_device_vatlib.h b/src/blackcore/audio_device_vatlib.h index d386c79f7..8226987a2 100644 --- a/src/blackcore/audio_device_vatlib.h +++ b/src/blackcore/audio_device_vatlib.h @@ -12,6 +12,7 @@ #ifndef BLACKCORE_AUDIODEVICEVATLIB_H #define BLACKCORE_AUDIODEVICEVATLIB_H +#include "blackcoreexport.h" #include "audio_device.h" #include "blackmisc/audio/audiodeviceinfo.h" #include "blackmisc/audio/audiodeviceinfolist.h" @@ -21,7 +22,7 @@ namespace BlackCore { //! Audio Input Device - class CAudioInputDeviceVatlib : public IAudioInputDevice + class BLACKCORE_EXPORT CAudioInputDeviceVatlib : public IAudioInputDevice { Q_OBJECT diff --git a/src/blackcore/audio_mixer.h b/src/blackcore/audio_mixer.h index 97f2d1cf5..978bb7945 100644 --- a/src/blackcore/audio_mixer.h +++ b/src/blackcore/audio_mixer.h @@ -10,12 +10,13 @@ #ifndef BLACKCORE_AUDIOMIXER_H #define BLACKCORE_AUDIOMIXER_H +#include "blackcoreexport.h" #include namespace BlackCore { //! Interface to an audio mixer - class IAudioMixer : public QObject + class BLACKCORE_EXPORT IAudioMixer : public QObject { Q_OBJECT diff --git a/src/blackcore/audio_mixer_vatlib.h b/src/blackcore/audio_mixer_vatlib.h index 82cc96ccc..9b8d2faee 100644 --- a/src/blackcore/audio_mixer_vatlib.h +++ b/src/blackcore/audio_mixer_vatlib.h @@ -10,6 +10,7 @@ #ifndef BLACKCORE_AUDIOMIXERVATLIB_H #define BLACKCORE_AUDIOMIXERVATLIB_H +#include "blackcoreexport.h" #include "audio_mixer.h" #include "vatlib/vatlib2.h" @@ -18,7 +19,7 @@ namespace BlackCore { //! Interface to an audio mixer - class CAudioMixerVatlib : public IAudioMixer + class BLACKCORE_EXPORT CAudioMixerVatlib : public IAudioMixer { Q_OBJECT diff --git a/src/blackcore/blackcore.pro b/src/blackcore/blackcore.pro index 913228d28..805374881 100644 --- a/src/blackcore/blackcore.pro +++ b/src/blackcore/blackcore.pro @@ -21,11 +21,13 @@ precompile_header:!isEmpty(PRECOMPILED_HEADER) { DEFINES += USING_PCH } -DEFINES += LOG_IN_FILE +DEFINES += LOG_IN_FILE BUILD_BLACKCORE_LIB HEADERS += *.h SOURCES += *.cpp +LIBS *= -lvatlib2 + DESTDIR = $$BuildRoot/lib DLLDESTDIR = $$BuildRoot/bin diff --git a/src/blackcore/blackcoreexport.h b/src/blackcore/blackcoreexport.h new file mode 100644 index 000000000..a0c00a548 --- /dev/null +++ b/src/blackcore/blackcoreexport.h @@ -0,0 +1,27 @@ +/* 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_MACROS_H +#define BLACKCORE_MACROS_H + +#include + +#ifndef WITH_STATIC +# if defined(BUILD_BLACKCORE_LIB) +# define BLACKCORE_EXPORT Q_DECL_EXPORT +# else +# define BLACKCORE_EXPORT Q_DECL_IMPORT +# endif +#else +# define BLACKCORE_EXPORT +#endif + +#endif // BLACKCORE_MACROS_H diff --git a/src/blackcore/blackcorefreefunctions.h b/src/blackcore/blackcorefreefunctions.h index 66636bde8..a108610f7 100644 --- a/src/blackcore/blackcorefreefunctions.h +++ b/src/blackcore/blackcorefreefunctions.h @@ -6,16 +6,17 @@ #ifndef BLACKCORE_FREEFUNCTIONS_H #define BLACKCORE_FREEFUNCTIONS_H +#include "blackcoreexport.h" #include namespace BlackCore { //! Register all relevant metadata in BlackCore - void registerMetadata(); + BLACKCORE_EXPORT void registerMetadata(); //! Is the current thread the one created the object //! \remarks can be used as ASSERT check for threaded objects - bool isCurrentThreadCreatingThread(QObject *toBeTested); + BLACKCORE_EXPORT bool isCurrentThreadCreatingThread(QObject *toBeTested); } // BlackCore diff --git a/src/blackcore/context.h b/src/blackcore/context.h index 3803a0620..219575b8f 100644 --- a/src/blackcore/context.h +++ b/src/blackcore/context.h @@ -12,6 +12,7 @@ #ifndef BLACKCORE_CONTEXT_H #define BLACKCORE_CONTEXT_H +#include "blackcoreexport.h" #include "blackcore/context_runtime_config.h" #include "blackcore/context_runtime.h" #include "blackmisc/logmessage.h" @@ -21,7 +22,7 @@ namespace BlackCore { //! Base for all context classes - class CContext : public QObject + class BLACKCORE_EXPORT CContext : public QObject { public: //! Destructor diff --git a/src/blackcore/context_application.h b/src/blackcore/context_application.h index 8783452b5..3f2bbda1c 100644 --- a/src/blackcore/context_application.h +++ b/src/blackcore/context_application.h @@ -12,6 +12,7 @@ #ifndef BLACKCORE_CONTEXTAPPLICATION_H #define BLACKCORE_CONTEXTAPPLICATION_H +#include "blackcoreexport.h" #include "blackcore/context.h" #include "blackmisc/statusmessagelist.h" #include "blackmisc/audio/voiceroomlist.h" @@ -38,7 +39,7 @@ namespace BlackCore /*! * Application context interface */ - class IContextApplication : public CContext + class BLACKCORE_EXPORT IContextApplication : public CContext { Q_OBJECT Q_CLASSINFO("D-Bus Interface", BLACKCORE_CONTEXTAPPLICATION_INTERFACENAME) diff --git a/src/blackcore/context_application_impl.h b/src/blackcore/context_application_impl.h index 0eb2eb346..b028d7022 100644 --- a/src/blackcore/context_application_impl.h +++ b/src/blackcore/context_application_impl.h @@ -6,6 +6,7 @@ #ifndef BLACKCORE_CONTEXTAPPLICATION_IMPL_H #define BLACKCORE_CONTEXTAPPLICATION_IMPL_H +#include "blackcoreexport.h" #include "context_application.h" #include "context_runtime.h" #include "dbus_server.h" @@ -17,7 +18,7 @@ namespace BlackCore /*! * Application context */ - class CContextApplication : public IContextApplication + class BLACKCORE_EXPORT CContextApplication : public IContextApplication { Q_CLASSINFO("D-Bus Interface", BLACKCORE_CONTEXTAPPLICATION_INTERFACENAME) Q_OBJECT diff --git a/src/blackcore/context_application_proxy.h b/src/blackcore/context_application_proxy.h index 8b3839a7f..a98f79db9 100644 --- a/src/blackcore/context_application_proxy.h +++ b/src/blackcore/context_application_proxy.h @@ -6,6 +6,7 @@ #ifndef BLACKCORE_CONTEXTAPPLICATION_PROXY_H #define BLACKCORE_CONTEXTAPPLICATION_PROXY_H +#include "blackcoreexport.h" #include "context_application.h" #include "blackmisc/genericdbusinterface.h" @@ -14,7 +15,7 @@ namespace BlackCore //! \brief Application context proxy //! \ingroup dbus - class CContextApplicationProxy : public IContextApplication + class BLACKCORE_EXPORT CContextApplicationProxy : public IContextApplication { Q_OBJECT friend class IContextApplication; diff --git a/src/blackcore/context_audio.h b/src/blackcore/context_audio.h index 05d504f36..38032880d 100644 --- a/src/blackcore/context_audio.h +++ b/src/blackcore/context_audio.h @@ -12,6 +12,7 @@ #ifndef BLACKCORE_CONTEXTAUDIO_H #define BLACKCORE_CONTEXTAUDIO_H +#include "blackcoreexport.h" #include "blackcore/context.h" #include "blackmisc/genericdbusinterface.h" #include "blackmisc/audio/audiodeviceinfolist.h" @@ -37,7 +38,7 @@ namespace BlackCore { //! Audio context interface - class IContextAudio : public CContext + class BLACKCORE_EXPORT IContextAudio : public CContext { Q_OBJECT Q_CLASSINFO("D-Bus Interface", BLACKCORE_CONTEXTAUDIO_INTERFACENAME) diff --git a/src/blackcore/context_audio_empty.h b/src/blackcore/context_audio_empty.h index 8e6c26d39..c63a2d89f 100644 --- a/src/blackcore/context_audio_empty.h +++ b/src/blackcore/context_audio_empty.h @@ -12,6 +12,7 @@ #ifndef BLACKCORE_CONTEXTAUDIO_EMPTY_H #define BLACKCORE_CONTEXTAUDIO_EMPTY_H +#include "blackcoreexport.h" #include "context_audio.h" #include "dbus_server.h" #include "voice.h" @@ -21,7 +22,7 @@ namespace BlackCore class IVoiceChannel; //! Audio context implementation - class CContextAudioEmpty : public IContextAudio + class BLACKCORE_EXPORT CContextAudioEmpty : public IContextAudio { public: diff --git a/src/blackcore/context_audio_impl.h b/src/blackcore/context_audio_impl.h index 610f6d9f3..b01fefbce 100644 --- a/src/blackcore/context_audio_impl.h +++ b/src/blackcore/context_audio_impl.h @@ -12,6 +12,7 @@ #ifndef BLACKCORE_CONTEXTAUDIO_IMPL_H #define BLACKCORE_CONTEXTAUDIO_IMPL_H +#include "blackcoreexport.h" #include "context_audio.h" #include "context_settings.h" #include "context_runtime.h" @@ -34,7 +35,7 @@ namespace BlackCore class IVoiceChannel; //! Audio context implementation - class CContextAudio : public IContextAudio + class BLACKCORE_EXPORT CContextAudio : public IContextAudio { Q_CLASSINFO("D-Bus Interface", BLACKCORE_CONTEXTAUDIO_INTERFACENAME) Q_OBJECT diff --git a/src/blackcore/context_audio_proxy.h b/src/blackcore/context_audio_proxy.h index 2721840ac..e81d98f70 100644 --- a/src/blackcore/context_audio_proxy.h +++ b/src/blackcore/context_audio_proxy.h @@ -12,6 +12,7 @@ #ifndef BLACKCORE_CONTEXTVOICE_PROXY_H #define BLACKCORE_CONTEXTVOICE_PROXY_H +#include "blackcoreexport.h" #include "context_audio.h" #include "blackmisc/genericdbusinterface.h" @@ -25,7 +26,7 @@ namespace BlackCore //! \brief Audio context proxy //! \ingroup dbus - class CContextAudioProxy : public IContextAudio + class BLACKCORE_EXPORT CContextAudioProxy : public IContextAudio { Q_OBJECT Q_CLASSINFO("D-Bus Interface", BLACKCORE_CONTEXTAUDIO_INTERFACENAME) diff --git a/src/blackcore/context_network.h b/src/blackcore/context_network.h index 6b917ab80..aa4a9ffa6 100644 --- a/src/blackcore/context_network.h +++ b/src/blackcore/context_network.h @@ -12,6 +12,7 @@ #ifndef BLACKCORE_CONTEXTNETWORK_H #define BLACKCORE_CONTEXTNETWORK_H +#include "blackcoreexport.h" #include "blackcore/context.h" #include "blackmisc/aviation/atcstationlist.h" #include "blackmisc/simulation/simulatedaircraftlist.h" @@ -38,7 +39,7 @@ namespace BlackCore { //! Network context proxy - class IContextNetwork : public CContext + class BLACKCORE_EXPORT IContextNetwork : public CContext { Q_OBJECT Q_CLASSINFO("D-Bus Interface", BLACKCORE_CONTEXTNETWORK_INTERFACENAME) diff --git a/src/blackcore/context_network_empty.h b/src/blackcore/context_network_empty.h index 82c0592d5..dd8b124f4 100644 --- a/src/blackcore/context_network_empty.h +++ b/src/blackcore/context_network_empty.h @@ -12,6 +12,7 @@ #ifndef BLACKCORE_CONTEXTNETWORK_EMPTY_H #define BLACKCORE_CONTEXTNETWORK_EMPTY_H +#include "blackcoreexport.h" #include "context_network.h" #include "blackmisc/logmessage.h" @@ -19,7 +20,7 @@ namespace BlackCore { //! Empty context, used during shutdown/initialization - class CContextNetworkEmpty : public IContextNetwork + class BLACKCORE_EXPORT CContextNetworkEmpty : public IContextNetwork { Q_OBJECT diff --git a/src/blackcore/context_network_impl.h b/src/blackcore/context_network_impl.h index e251ecdf0..5f5eaa02f 100644 --- a/src/blackcore/context_network_impl.h +++ b/src/blackcore/context_network_impl.h @@ -12,6 +12,7 @@ #ifndef BLACKCORE_CONTEXTNETWORK_IMPL_H #define BLACKCORE_CONTEXTNETWORK_IMPL_H +#include "blackcoreexport.h" #include "blackcore/context_network.h" #include "blackcore/context_settings.h" #include "blackcore/context_runtime.h" @@ -35,7 +36,7 @@ namespace BlackCore class CVatsimDataFileReader; //! Network context implementation - class CContextNetwork : + class BLACKCORE_EXPORT CContextNetwork : public IContextNetwork, public BlackMisc::Simulation::IRemoteAircraftProvider { diff --git a/src/blackcore/context_network_proxy.h b/src/blackcore/context_network_proxy.h index 50b3954cb..71a41a0ff 100644 --- a/src/blackcore/context_network_proxy.h +++ b/src/blackcore/context_network_proxy.h @@ -12,6 +12,7 @@ #ifndef BLACKCORE_CONTEXTNETWORK_PROXY_H #define BLACKCORE_CONTEXTNETWORK_PROXY_H +#include "blackcoreexport.h" #include "context_network.h" #include "network_vatlib.h" @@ -28,7 +29,7 @@ namespace BlackCore //! Network context proxy //! \ingroup dbus - class CContextNetworkProxy : public IContextNetwork + class BLACKCORE_EXPORT CContextNetworkProxy : public IContextNetwork { Q_OBJECT friend class IContextNetwork; diff --git a/src/blackcore/context_ownaircraft.h b/src/blackcore/context_ownaircraft.h index 1d5e31567..52088763f 100644 --- a/src/blackcore/context_ownaircraft.h +++ b/src/blackcore/context_ownaircraft.h @@ -12,6 +12,7 @@ #ifndef BLACKCORE_CONTEXTOWNAIRCRAFT_H #define BLACKCORE_CONTEXTOWNAIRCRAFT_H +#include "blackcoreexport.h" #include "blackcore/context.h" #include "blackmisc/simulation/simulatedaircraft.h" #include "blackmisc/aviation/aircrafticao.h" @@ -34,7 +35,7 @@ namespace BlackCore //! Own context proxy //! \ingroup dbus - class IContextOwnAircraft : public CContext + class BLACKCORE_EXPORT IContextOwnAircraft : public CContext { Q_OBJECT Q_CLASSINFO("D-Bus Interface", BLACKCORE_CONTEXTOWNAIRCRAFT_INTERFACENAME) diff --git a/src/blackcore/context_ownaircraft_impl.h b/src/blackcore/context_ownaircraft_impl.h index 5de9c0ab8..d8bbdb1db 100644 --- a/src/blackcore/context_ownaircraft_impl.h +++ b/src/blackcore/context_ownaircraft_impl.h @@ -12,6 +12,7 @@ #ifndef BLACKCORE_CONTEXTOWNAIRCRAFT_IMPL_H #define BLACKCORE_CONTEXTOWNAIRCRAFT_IMPL_H +#include "blackcoreexport.h" #include "blackcore/context_ownaircraft.h" #include "blackcore/context_settings.h" #include "blackcore/context_runtime.h" @@ -23,7 +24,7 @@ namespace BlackCore { //! Own aircraft context implementation - class CContextOwnAircraft : + class BLACKCORE_EXPORT CContextOwnAircraft : public IContextOwnAircraft, public BlackMisc::Simulation::IOwnAircraftProvider { diff --git a/src/blackcore/context_ownaircraft_proxy.h b/src/blackcore/context_ownaircraft_proxy.h index ba06259c5..1c0fe6cb0 100644 --- a/src/blackcore/context_ownaircraft_proxy.h +++ b/src/blackcore/context_ownaircraft_proxy.h @@ -12,6 +12,7 @@ #ifndef BLACKCORE_OWNAIRCRAFT_PROXY_H #define BLACKCORE_OWNAIRCRAFT_PROXY_H +#include "blackcoreexport.h" #include "blackcore/context_ownaircraft.h" #include "blackmisc/genericdbusinterface.h" #include "blackmisc/aviation/aircrafticao.h" @@ -22,7 +23,7 @@ namespace BlackCore //! Own aircraft context proxy //! \ingroup dbus - class CContextOwnAircraftProxy : public IContextOwnAircraft + class BLACKCORE_EXPORT CContextOwnAircraftProxy : public IContextOwnAircraft { Q_OBJECT friend class IContextOwnAircraft; diff --git a/src/blackcore/context_runtime.h b/src/blackcore/context_runtime.h index f77735d36..1b30c18dc 100644 --- a/src/blackcore/context_runtime.h +++ b/src/blackcore/context_runtime.h @@ -12,6 +12,7 @@ #ifndef BLACKCORE_CONTEXT_RUNTIME_H #define BLACKCORE_CONTEXT_RUNTIME_H +#include "blackcoreexport.h" #include "blackcore/context_runtime_config.h" #include "blackmisc/statusmessagelist.h" #include "blackmisc/simulation/ownaircraftprovider.h" @@ -40,7 +41,7 @@ namespace BlackCore class IContextSimulator; //! The Context runtime class - class CRuntime : public QObject + class BLACKCORE_EXPORT CRuntime : public QObject { Q_OBJECT diff --git a/src/blackcore/context_runtime_config.h b/src/blackcore/context_runtime_config.h index 06116520d..9b0fefd8b 100644 --- a/src/blackcore/context_runtime_config.h +++ b/src/blackcore/context_runtime_config.h @@ -1,12 +1,13 @@ #ifndef BLACKCORE_CONTEXT_RUNTIME_CONFIG_H #define BLACKCORE_CONTEXT_RUNTIME_CONFIG_H +#include "blackcoreexport.h" #include namespace BlackCore { //! Helper to correctly run a context - class CRuntimeConfig + class BLACKCORE_EXPORT CRuntimeConfig { public: diff --git a/src/blackcore/context_settings.h b/src/blackcore/context_settings.h index e01c39d93..7530cbb01 100644 --- a/src/blackcore/context_settings.h +++ b/src/blackcore/context_settings.h @@ -12,6 +12,7 @@ #ifndef BLACKCORE_CONTEXTSETTINGS_H #define BLACKCORE_CONTEXTSETTINGS_H +#include "blackcoreexport.h" #include "blackcore/context.h" #include "blackcore/dbus_server.h" #include "blackinput/keyboard.h" @@ -38,7 +39,7 @@ namespace BlackCore /*! * Context settings interface */ - class IContextSettings : public CContext + class BLACKCORE_EXPORT IContextSettings : public CContext { Q_OBJECT Q_CLASSINFO("D-Bus Interface", BLACKCORE_CONTEXTSETTINGS_INTERFACENAME) diff --git a/src/blackcore/context_settings_impl.h b/src/blackcore/context_settings_impl.h index 4bf453245..272d54f36 100644 --- a/src/blackcore/context_settings_impl.h +++ b/src/blackcore/context_settings_impl.h @@ -12,6 +12,7 @@ #ifndef BLACKCORE_CONTEXTSETTINGS_IMPL_H #define BLACKCORE_CONTEXTSETTINGS_IMPL_H +#include "blackcoreexport.h" #include "context_settings.h" #include "dbus_server.h" #include "context_runtime.h" @@ -26,7 +27,7 @@ namespace BlackCore /*! * Settings context implementation */ - class CContextSettings : public IContextSettings + class BLACKCORE_EXPORT CContextSettings : public IContextSettings { Q_OBJECT Q_CLASSINFO("D-Bus Interface", BLACKCORE_CONTEXTSETTINGS_INTERFACENAME) diff --git a/src/blackcore/context_settings_proxy.h b/src/blackcore/context_settings_proxy.h index 7c1420c83..28e2be10d 100644 --- a/src/blackcore/context_settings_proxy.h +++ b/src/blackcore/context_settings_proxy.h @@ -6,6 +6,7 @@ #ifndef BLACKCORE_CONTEXTSETTINGS_PROXY_H #define BLACKCORE_CONTEXTSETTINGS_PROXY_H +#include "blackcoreexport.h" #include "context_settings.h" #include "blackmisc/statusmessagelist.h" @@ -19,7 +20,7 @@ namespace BlackCore //! \brief Settings context proxy //! \ingroup dbus - class CContextSettingsProxy : public IContextSettings + class BLACKCORE_EXPORT CContextSettingsProxy : public IContextSettings { Q_OBJECT friend class IContextSettings; diff --git a/src/blackcore/context_simulator.h b/src/blackcore/context_simulator.h index 753a047af..c9fe9b141 100644 --- a/src/blackcore/context_simulator.h +++ b/src/blackcore/context_simulator.h @@ -23,6 +23,7 @@ //! @} +#include "blackcoreexport.h" #include "context.h" #include "blackcore/dbus_server.h" #include "blackcore/context_runtime.h" @@ -41,7 +42,7 @@ namespace BlackCore { //! Network context - class IContextSimulator : public CContext + class BLACKCORE_EXPORT IContextSimulator : public CContext { Q_OBJECT Q_CLASSINFO("D-Bus Interface", BLACKCORE_CONTEXTSIMULATOR_INTERFACENAME) diff --git a/src/blackcore/context_simulator_impl.h b/src/blackcore/context_simulator_impl.h index 84946d541..8c114014a 100644 --- a/src/blackcore/context_simulator_impl.h +++ b/src/blackcore/context_simulator_impl.h @@ -12,6 +12,7 @@ #ifndef BLACKCORE_CONTEXTSIMULATOR_IMPL_H #define BLACKCORE_CONTEXTSIMULATOR_IMPL_H +#include "blackcoreexport.h" #include "blackcore/context_simulator.h" #include "blackcore/simulator.h" #include "blackmisc/worker.h" @@ -27,7 +28,7 @@ namespace BlackCore { //! Network simulator concrete implementation - class CContextSimulator : public IContextSimulator + class BLACKCORE_EXPORT CContextSimulator : public IContextSimulator { Q_OBJECT Q_CLASSINFO("D-Bus Interface", BLACKCORE_CONTEXTSIMULATOR_INTERFACENAME) diff --git a/src/blackcore/context_simulator_proxy.h b/src/blackcore/context_simulator_proxy.h index f9c50a98e..a5c86ce52 100644 --- a/src/blackcore/context_simulator_proxy.h +++ b/src/blackcore/context_simulator_proxy.h @@ -12,6 +12,7 @@ #ifndef BLACKCORE_CONTEXTSIMULATOR_PROXY_H #define BLACKCORE_CONTEXTSIMULATOR_PROXY_H +#include "blackcoreexport.h" #include "blackcore/context_simulator.h" #include "blackmisc/genericdbusinterface.h" #include "blackmisc/pixmap.h" @@ -20,7 +21,7 @@ namespace BlackCore { //! \brief DBus proxy for Simulator Context //! \ingroup dbus - class CContextSimulatorProxy : public IContextSimulator + class BLACKCORE_EXPORT CContextSimulatorProxy : public IContextSimulator { Q_OBJECT friend class IContextSimulator; diff --git a/src/blackcore/dbus_server.h b/src/blackcore/dbus_server.h index 442593c07..20c790e80 100644 --- a/src/blackcore/dbus_server.h +++ b/src/blackcore/dbus_server.h @@ -12,6 +12,7 @@ #ifndef BLACKCORE_DBUSSERVER_H #define BLACKCORE_DBUSSERVER_H +#include "blackcoreexport.h" #include "blackmisc/valueobject.h" // for qHash overload, include before Qt stuff due GCC issue #include #include @@ -32,7 +33,7 @@ namespace BlackCore * with session or system bus. For session / system bus this class represents no real server, * but more a wrapper for \sa QDBusConnection and the registered objects */ - class CDBusServer : public QObject + class BLACKCORE_EXPORT CDBusServer : public QObject { Q_OBJECT Q_CLASSINFO("D-Bus Interface", BLACKCORE_RUNTIME_SERVICENAME) diff --git a/src/blackcore/input_manager.h b/src/blackcore/input_manager.h index 19b4fdb2d..80b5f6876 100644 --- a/src/blackcore/input_manager.h +++ b/src/blackcore/input_manager.h @@ -6,6 +6,7 @@ #ifndef BLACKCORE_INPUTMANAGER_H #define BLACKCORE_INPUTMANAGER_H +#include "blackcoreexport.h" #include "blackinput/keyboard.h" #include "blackinput/joystick.h" #include "blackmisc/hardware/keyboardkeylist.h" @@ -23,7 +24,7 @@ namespace BlackCore { //! Input manager handling hotkey function calls - class CInputManager : public QObject + class BLACKCORE_EXPORT CInputManager : public QObject { Q_OBJECT diff --git a/src/blackcore/interpolator.h b/src/blackcore/interpolator.h index 2b49442cf..5face8d7c 100644 --- a/src/blackcore/interpolator.h +++ b/src/blackcore/interpolator.h @@ -12,6 +12,7 @@ #ifndef BLACKCORE_INTERPOLATOR_H #define BLACKCORE_INTERPOLATOR_H +#include "blackcoreexport.h" #include "blackmisc/aviation/aircraftsituation.h" #include "blackmisc/simulation/remoteaircraftprovider.h" #include "blackmisc/worker.h" @@ -21,7 +22,7 @@ namespace BlackCore { //! Interpolator, calculation inbetween positions - class IInterpolator : + class BLACKCORE_EXPORT IInterpolator : public BlackMisc::CContinuousWorker, public BlackMisc::Simulation::CRemoteAircraftAwareReadOnly { @@ -41,7 +42,7 @@ namespace BlackCore static QString getMessageCategory() { return "swift.interpolator"; } //! Status of interpolation - struct InterpolationStatus + struct BLACKCORE_EXPORT InterpolationStatus { public: bool changedPosition = false; //!< position was changed diff --git a/src/blackcore/interpolator_linear.h b/src/blackcore/interpolator_linear.h index 04f49267b..70fc8db28 100644 --- a/src/blackcore/interpolator_linear.h +++ b/src/blackcore/interpolator_linear.h @@ -12,6 +12,7 @@ #ifndef BLACKCORE_INTERPOLATOR_LINEAR_H #define BLACKCORE_INTERPOLATOR_LINEAR_H +#include "blackcoreexport.h" #include "interpolator.h" #include "blackmisc/aviation/aircraftsituation.h" #include "blackmisc/aviation/aircraftsituationlist.h" @@ -21,7 +22,7 @@ namespace BlackCore { //! Linear interpolator, calculation inbetween positions - class CInterpolatorLinear : public IInterpolator + class BLACKCORE_EXPORT CInterpolatorLinear : public IInterpolator { public: //! Constructor diff --git a/src/blackcore/network.h b/src/blackcore/network.h index 520c53458..638d814cd 100644 --- a/src/blackcore/network.h +++ b/src/blackcore/network.h @@ -12,6 +12,7 @@ #ifndef BLACKCORE_NETWORK_H #define BLACKCORE_NETWORK_H +#include "blackcoreexport.h" #include "blackmisc/simulation/simulatorplugininfo.h" #include "blackmisc/aviation/aircraft.h" #include "blackmisc/pq/frequency.h" @@ -51,7 +52,7 @@ namespace BlackCore * which is connected to an INetwork slot, then at least one of those connections * must be a Qt::QueuedConnection. */ - class INetwork : public QObject + class BLACKCORE_EXPORT INetwork : public QObject { Q_OBJECT Q_ENUMS(ConnectionStatus) diff --git a/src/blackcore/network_vatlib.h b/src/blackcore/network_vatlib.h index ac9c82eeb..a9e652d42 100644 --- a/src/blackcore/network_vatlib.h +++ b/src/blackcore/network_vatlib.h @@ -12,6 +12,7 @@ #ifndef BLACKCORE_NETWORK_VATLIB_H #define BLACKCORE_NETWORK_VATLIB_H +#include "blackcoreexport.h" #include "network.h" #include "blackmisc/simulation/ownaircraftprovider.h" #include "token_bucket.h" @@ -27,7 +28,7 @@ namespace BlackCore /*! * Implementation of INetwork using the vatlib shim */ - class CNetworkVatlib : + class BLACKCORE_EXPORT CNetworkVatlib : public INetwork, public BlackMisc::Simulation::COwnAircraftAware // network vatlib consumes own aircraft data and sets ICAO/callsign data { diff --git a/src/blackcore/simulator.h b/src/blackcore/simulator.h index 4f94535c7..c79f05fab 100644 --- a/src/blackcore/simulator.h +++ b/src/blackcore/simulator.h @@ -12,6 +12,7 @@ #ifndef BLACKCORE_SIMULATOR_H #define BLACKCORE_SIMULATOR_H +#include "blackcoreexport.h" #include "blackcore/interpolator.h" #include "blackmisc/simulation/simulatorplugininfo.h" #include "blackmisc/simulation/simulatorsetup.h" @@ -30,7 +31,7 @@ namespace BlackCore { //! Interface to a simulator. - class ISimulator : public QObject + class BLACKCORE_EXPORT ISimulator : public QObject { Q_OBJECT public: @@ -208,7 +209,7 @@ namespace BlackCore * The simulator listener is responsible for letting the core know when * the corresponding simulator is started. */ - class ISimulatorListener : public QObject + class BLACKCORE_EXPORT ISimulatorListener : public QObject { Q_OBJECT @@ -237,7 +238,7 @@ namespace BlackCore }; //! Factory pattern class to create instances of ISimulator - class ISimulatorFactory + class BLACKCORE_EXPORT ISimulatorFactory { public: @@ -264,7 +265,7 @@ namespace BlackCore }; //! Common base class with providers, interface and some base functionality - class CSimulatorCommon : + class BLACKCORE_EXPORT CSimulatorCommon : public BlackCore::ISimulator, public BlackMisc::Simulation::COwnAircraftAware, // gain access to in memor own aircraft data public BlackMisc::Simulation::CRemoteAircraftAware // gain access to in memory remote aircraft data diff --git a/src/blackcore/token_bucket.h b/src/blackcore/token_bucket.h index e7c6419c2..d3f146caa 100644 --- a/src/blackcore/token_bucket.h +++ b/src/blackcore/token_bucket.h @@ -10,6 +10,7 @@ #ifndef BLACKCORE_TOKENBUCKET_H #define BLACKCORE_TOKENBUCKET_H +#include "blackcoreexport.h" #include "blackmisc/pq/time.h" #include #include @@ -24,7 +25,7 @@ namespace BlackCore * generation. Each time a packet needs to be generated and sent a token is consumed. If no token is available, consumption * will fail the the packet cannot be sent. */ - class CTokenBucket + class BLACKCORE_EXPORT CTokenBucket { public: diff --git a/src/blackcore/vatsimbookingreader.h b/src/blackcore/vatsimbookingreader.h index 6bae63afb..19806caad 100644 --- a/src/blackcore/vatsimbookingreader.h +++ b/src/blackcore/vatsimbookingreader.h @@ -12,6 +12,7 @@ #ifndef BLACKCORE_VATSIMBOOKINGREADER_H #define BLACKCORE_VATSIMBOOKINGREADER_H +#include "blackcoreexport.h" #include "blackmisc/threadedreader.h" #include "blackmisc/aviation/atcstationlist.h" @@ -25,7 +26,7 @@ namespace BlackCore /*! * Read bookings from VATSIM */ - class CVatsimBookingReader : public BlackMisc::CThreadedReader + class BLACKCORE_EXPORT CVatsimBookingReader : public BlackMisc::CThreadedReader { Q_OBJECT diff --git a/src/blackcore/vatsimdatafilereader.h b/src/blackcore/vatsimdatafilereader.h index ae99a5ec4..968d199a4 100644 --- a/src/blackcore/vatsimdatafilereader.h +++ b/src/blackcore/vatsimdatafilereader.h @@ -12,6 +12,7 @@ #ifndef BLACKCORE_VATSIMDATAFILEREADER_H #define BLACKCORE_VATSIMDATAFILEREADER_H +#include "blackcoreexport.h" #include "blackmisc/threadedreader.h" #include "blackmisc/aviation/atcstationlist.h" #include "blackmisc/aviation/aircraftlist.h" @@ -30,7 +31,7 @@ namespace BlackCore /*! * Read bookings from VATSIM */ - class CVatsimDataFileReader : public BlackMisc::CThreadedReader + class BLACKCORE_EXPORT CVatsimDataFileReader : public BlackMisc::CThreadedReader { Q_OBJECT diff --git a/src/blackcore/voice.h b/src/blackcore/voice.h index 9c93258dc..36de203d7 100644 --- a/src/blackcore/voice.h +++ b/src/blackcore/voice.h @@ -6,6 +6,7 @@ #ifndef BLACKCORE_VOICE_H #define BLACKCORE_VOICE_H +#include "blackcoreexport.h" #include "audio_device.h" #include "voice_channel.h" #include "audio_mixer.h" @@ -25,7 +26,7 @@ namespace BlackCore { //! Interface to a connection to a ATC voice server for use in flight simulation. - class IVoice : public QObject + class BLACKCORE_EXPORT IVoice : public QObject { Q_OBJECT diff --git a/src/blackcore/voice_channel.h b/src/blackcore/voice_channel.h index dae65461a..7d98bfcb4 100644 --- a/src/blackcore/voice_channel.h +++ b/src/blackcore/voice_channel.h @@ -12,6 +12,7 @@ #ifndef BLACKCORE_VOICE_CHANNEL_H #define BLACKCORE_VOICE_CHANNEL_H +#include "blackcoreexport.h" #include "blackmisc/statusmessage.h" #include "blackmisc/audio/voiceroomlist.h" #include "blackmisc/aviation/callsignset.h" @@ -23,7 +24,7 @@ namespace BlackCore { //! Interface to a voice channel - class IVoiceChannel : public QObject + class BLACKCORE_EXPORT IVoiceChannel : public QObject { Q_OBJECT diff --git a/src/blackcore/voice_channel_vatlib.h b/src/blackcore/voice_channel_vatlib.h index 5c4ff9740..5a59eae01 100644 --- a/src/blackcore/voice_channel_vatlib.h +++ b/src/blackcore/voice_channel_vatlib.h @@ -10,6 +10,7 @@ #ifndef BLACKCORE_VOICE_CHANNEL_VATLIB_H #define BLACKCORE_VOICE_CHANNEL_VATLIB_H +#include "blackcoreexport.h" #include "voice_channel.h" #include "voice_vatlib.h" #include "blackmisc/statusmessage.h" @@ -25,7 +26,7 @@ namespace BlackCore class CVoiceChannelVatlibPrivate; //! Class implementing the voice channel interface - class CVoiceChannelVatlib : public IVoiceChannel + class BLACKCORE_EXPORT CVoiceChannelVatlib : public IVoiceChannel { Q_OBJECT diff --git a/src/blackcore/voice_vatlib.h b/src/blackcore/voice_vatlib.h index e557d8045..7d6c7aaed 100644 --- a/src/blackcore/voice_vatlib.h +++ b/src/blackcore/voice_vatlib.h @@ -12,6 +12,7 @@ #ifndef BLACKCORE_VOICE_VATLIB_H #define BLACKCORE_VOICE_VATLIB_H +#include "blackcoreexport.h" #include "voice.h" #include @@ -31,7 +32,7 @@ namespace BlackCore { //! Vatlib implementation of the IVoice interface. - class CVoiceVatlib : public IVoice + class BLACKCORE_EXPORT CVoiceVatlib : public IVoice { Q_OBJECT