diff --git a/client/browseZeroConf/browse_avahi.cpp b/client/browseZeroConf/browse_avahi.cpp index a2c1be670..13afbf184 100644 --- a/client/browseZeroConf/browse_avahi.cpp +++ b/client/browseZeroConf/browse_avahi.cpp @@ -1,6 +1,6 @@ /*** This file is part of snapcast - Copyright (C) 2014-2021 Johannes Pohl + Copyright (C) 2014-2024 Johannes Pohl This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,13 +16,15 @@ along with this program. If not, see . ***/ +// prototype/interface header file #include "browse_avahi.hpp" + +// local headers #include "common/aixlog.hpp" #include "common/snap_exception.hpp" + +// standard headers #include -#include -#include -#include #include diff --git a/client/browseZeroConf/browse_avahi.hpp b/client/browseZeroConf/browse_avahi.hpp index 6f94b5a29..5507f9c6b 100644 --- a/client/browseZeroConf/browse_avahi.hpp +++ b/client/browseZeroConf/browse_avahi.hpp @@ -1,6 +1,6 @@ /*** This file is part of snapcast - Copyright (C) 2014-2020 Johannes Pohl + Copyright (C) 2014-2024 Johannes Pohl This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -15,19 +15,21 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . ***/ -#ifndef BROWSEAVAHI_H -#define BROWSEAVAHI_H +#pragma once + +class BrowseAvahi; + +// local headers +#include "browse_mdns.hpp" + +// 3rd party headers #include #include - #include #include #include -class BrowseAvahi; - -#include "browse_mdns.hpp" class BrowseAvahi : public BrowsemDNS { @@ -49,5 +51,3 @@ class BrowseAvahi : public BrowsemDNS mDNSResult result_; AvahiServiceBrowser* sb_; }; - -#endif diff --git a/client/browseZeroConf/browse_bonjour.cpp b/client/browseZeroConf/browse_bonjour.cpp index 91b8ff5d2..d1b34f8cc 100644 --- a/client/browseZeroConf/browse_bonjour.cpp +++ b/client/browseZeroConf/browse_bonjour.cpp @@ -1,8 +1,30 @@ +/*** + This file is part of snapcast + Copyright (C) 2014-2024 Johannes Pohl + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +***/ + + +// prototype/interface header file #include "browse_bonjour.hpp" -#include +// local headers +#include "common/aixlog.hpp" + +// standard headers #include -#include #ifdef WINDOWS #include #include @@ -11,8 +33,6 @@ #include #endif -#include "common/aixlog.hpp" -#include "common/snap_exception.hpp" using namespace std; diff --git a/client/browseZeroConf/browse_bonjour.hpp b/client/browseZeroConf/browse_bonjour.hpp index 509b393d7..e92333c1a 100644 --- a/client/browseZeroConf/browse_bonjour.hpp +++ b/client/browseZeroConf/browse_bonjour.hpp @@ -1,15 +1,34 @@ -#ifndef BROWSEBONJOUR_H -#define BROWSEBONJOUR_H +/*** + This file is part of snapcast + Copyright (C) 2014-2024 Johannes Pohl -#include + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +***/ + +#pragma once class BrowseBonjour; +// local headers #include "browse_mdns.hpp" +// 3rd party headers +#include + + class BrowseBonjour : public BrowsemDNS { public: bool browse(const std::string& serviceName, mDNSResult& result, int timeout) override; }; -#endif diff --git a/client/browseZeroConf/browse_mdns.hpp b/client/browseZeroConf/browse_mdns.hpp index 66b172b01..45bbedbf6 100644 --- a/client/browseZeroConf/browse_mdns.hpp +++ b/client/browseZeroConf/browse_mdns.hpp @@ -1,6 +1,24 @@ -#ifndef BROWSEMDNS_H -#define BROWSEMDNS_H +/*** + This file is part of snapcast + Copyright (C) 2014-2024 Johannes Pohl + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +***/ + +#pragma once + +// standard headers #include enum IPVersion @@ -37,5 +55,3 @@ using BrowseZeroConf = BrowseAvahi; #include "browse_bonjour.hpp" using BrowseZeroConf = BrowseBonjour; #endif - -#endif diff --git a/client/client_connection.cpp b/client/client_connection.cpp index 38db84f9b..53825864a 100644 --- a/client/client_connection.cpp +++ b/client/client_connection.cpp @@ -21,8 +21,6 @@ // local headers #include "common/aixlog.hpp" -#include "common/message/hello.hpp" -#include "common/snap_exception.hpp" #include "common/str_compat.hpp" // 3rd party headers @@ -32,7 +30,6 @@ // standard headers #include -#include using namespace std; diff --git a/client/client_connection.hpp b/client/client_connection.hpp index 9f542f9c6..1a71893cf 100644 --- a/client/client_connection.hpp +++ b/client/client_connection.hpp @@ -1,6 +1,6 @@ /*** This file is part of snapcast - Copyright (C) 2014-2023 Johannes Pohl + Copyright (C) 2014-2024 Johannes Pohl This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,8 +16,7 @@ along with this program. If not, see . ***/ -#ifndef CLIENT_CONNECTION_HPP -#define CLIENT_CONNECTION_HPP +#pragma once // local headers #include "client_settings.hpp" @@ -32,14 +31,9 @@ #include // standard headers -#include -#include #include #include -#include -#include #include -#include using boost::asio::ip::tcp; @@ -159,7 +153,3 @@ class ClientConnection }; std::deque messages_; }; - - - -#endif diff --git a/client/client_settings.hpp b/client/client_settings.hpp index 2e12cb01d..877216c27 100644 --- a/client/client_settings.hpp +++ b/client/client_settings.hpp @@ -1,6 +1,6 @@ /*** This file is part of snapcast - Copyright (C) 2014-2020 Johannes Pohl + Copyright (C) 2014-2024 Johannes Pohl This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,15 +16,16 @@ along with this program. If not, see . ***/ -#ifndef CLIENT_SETTINGS_HPP -#define CLIENT_SETTINGS_HPP - -#include -#include +#pragma once +// local headers #include "common/sample_format.hpp" #include "player/pcm_device.hpp" +// standard headers +#include + + struct ClientSettings { @@ -79,5 +80,3 @@ struct ClientSettings Player player; Logging logging; }; - -#endif diff --git a/client/controller.hpp b/client/controller.hpp index 2daf90886..27299bf10 100644 --- a/client/controller.hpp +++ b/client/controller.hpp @@ -1,6 +1,6 @@ /*** This file is part of snapcast - Copyright (C) 2014-2023 Johannes Pohl + Copyright (C) 2014-2024 Johannes Pohl This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,13 +16,11 @@ along with this program. If not, see . ***/ -#ifndef CONTROLLER_HPP -#define CONTROLLER_HPP +#pragma once // local headers #include "client_connection.hpp" #include "client_settings.hpp" -#include "common/message/message.hpp" #include "common/message/server_settings.hpp" #include "decoder/decoder.hpp" #include "player/player.hpp" @@ -31,8 +29,7 @@ // 3rd party headers // standard headers -#include -#include + using namespace std::chrono_literals; @@ -75,6 +72,3 @@ class Controller std::unique_ptr serverSettings_; std::unique_ptr headerChunk_; }; - - -#endif diff --git a/client/decoder/flac_decoder.cpp b/client/decoder/flac_decoder.cpp index 967585a60..930abe308 100644 --- a/client/decoder/flac_decoder.cpp +++ b/client/decoder/flac_decoder.cpp @@ -1,6 +1,6 @@ /*** This file is part of snapcast - Copyright (C) 2014-2021 Johannes Pohl + Copyright (C) 2014-2024 Johannes Pohl This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,11 +16,15 @@ along with this program. If not, see . ***/ +// prototype/interface header file #include "flac_decoder.hpp" + +// local headers #include "common/aixlog.hpp" #include "common/endian.hpp" #include "common/snap_exception.hpp" -#include + +// standard headers #include #include diff --git a/client/decoder/flac_decoder.hpp b/client/decoder/flac_decoder.hpp index 70b67380e..a19a62b00 100644 --- a/client/decoder/flac_decoder.hpp +++ b/client/decoder/flac_decoder.hpp @@ -1,6 +1,6 @@ /*** This file is part of snapcast - Copyright (C) 2014-2020 Johannes Pohl + Copyright (C) 2014-2024 Johannes Pohl This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,15 +16,18 @@ along with this program. If not, see . ***/ -#ifndef FLAC_DECODER_H -#define FLAC_DECODER_H +#pragma once +// local headers #include "decoder.hpp" +// 3rd party headers #include -#include + +// standard headers #include + namespace decoder { @@ -60,5 +63,3 @@ class FlacDecoder : public Decoder }; } // namespace decoder - -#endif diff --git a/client/decoder/null_decoder.cpp b/client/decoder/null_decoder.cpp index 9fae7fd78..6c722980a 100644 --- a/client/decoder/null_decoder.cpp +++ b/client/decoder/null_decoder.cpp @@ -1,6 +1,6 @@ /*** This file is part of snapcast - Copyright (C) 2014-2023 Johannes Pohl + Copyright (C) 2014-2024 Johannes Pohl This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -20,9 +20,6 @@ #include "null_decoder.hpp" // local headers -#include "common/aixlog.hpp" -#include "common/endian.hpp" -#include "common/snap_exception.hpp" // 3rd party headers diff --git a/client/decoder/ogg_decoder.cpp b/client/decoder/ogg_decoder.cpp index 8540fcbe3..73ca41bb4 100644 --- a/client/decoder/ogg_decoder.cpp +++ b/client/decoder/ogg_decoder.cpp @@ -1,6 +1,6 @@ /*** This file is part of snapcast - Copyright (C) 2014-2023 Johannes Pohl + Copyright (C) 2014-2024 Johannes Pohl This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -28,10 +28,8 @@ // 3rd party headers // standard headers -#include #include #include -#include diff --git a/client/decoder/ogg_decoder.hpp b/client/decoder/ogg_decoder.hpp index b20182fc0..8a4f8c2d9 100644 --- a/client/decoder/ogg_decoder.hpp +++ b/client/decoder/ogg_decoder.hpp @@ -1,6 +1,6 @@ /*** This file is part of snapcast - Copyright (C) 2014-2020 Johannes Pohl + Copyright (C) 2014-2024 Johannes Pohl This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,9 +16,12 @@ along with this program. If not, see . ***/ -#ifndef OGG_DECODER_H -#define OGG_DECODER_H +#pragma once + +// local headers #include "decoder.hpp" + +// 3rd party headers #ifdef HAS_TREMOR #include #else @@ -64,5 +67,3 @@ class OggDecoder : public Decoder }; } // namespace decoder - -#endif diff --git a/client/decoder/opus_decoder.cpp b/client/decoder/opus_decoder.cpp index 41303ae0c..facc6f988 100644 --- a/client/decoder/opus_decoder.cpp +++ b/client/decoder/opus_decoder.cpp @@ -1,7 +1,7 @@ /*** This file is part of snapcast Copyright (C) 2015 Hannes Ellinger - Copyright (C) 2016-2021 Johannes Pohl + Copyright (C) 2016-2024 Johannes Pohl This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -17,10 +17,13 @@ along with this program. If not, see . ***/ +// prototype/interface header file #include "opus_decoder.hpp" + +// local headers #include "common/aixlog.hpp" #include "common/snap_exception.hpp" -#include "common/str_compat.hpp" + namespace decoder { diff --git a/client/decoder/opus_decoder.hpp b/client/decoder/opus_decoder.hpp index 2152d0935..1e71c8446 100644 --- a/client/decoder/opus_decoder.hpp +++ b/client/decoder/opus_decoder.hpp @@ -1,6 +1,7 @@ /*** This file is part of snapcast Copyright (C) 2015 Hannes Ellinger + Copyright (C) 2016-2024 Johannes Pohl This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -18,9 +19,16 @@ #pragma once +// local headers #include "decoder/decoder.hpp" + +// 3rd party headers #include +// standard headers +#include + + namespace decoder { diff --git a/client/decoder/pcm_decoder.cpp b/client/decoder/pcm_decoder.cpp index 4451a9a4f..e03245a35 100644 --- a/client/decoder/pcm_decoder.cpp +++ b/client/decoder/pcm_decoder.cpp @@ -1,6 +1,6 @@ /*** This file is part of snapcast - Copyright (C) 2014-2021 Johannes Pohl + Copyright (C) 2014-2024 Johannes Pohl This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,11 +16,14 @@ along with this program. If not, see . ***/ +// prototype/interface header file #include "pcm_decoder.hpp" -#include "common/aixlog.hpp" + +// local headers #include "common/endian.hpp" #include "common/snap_exception.hpp" + namespace decoder { diff --git a/client/decoder/pcm_decoder.hpp b/client/decoder/pcm_decoder.hpp index 5e0b92f2c..b69d6de35 100644 --- a/client/decoder/pcm_decoder.hpp +++ b/client/decoder/pcm_decoder.hpp @@ -1,6 +1,6 @@ /*** This file is part of snapcast - Copyright (C) 2014-2020 Johannes Pohl + Copyright (C) 2014-2024 Johannes Pohl This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,8 +16,9 @@ along with this program. If not, see . ***/ -#ifndef PCM_DECODER_H -#define PCM_DECODER_H +#pragma once + +// local headers #include "decoder.hpp" @@ -33,5 +34,3 @@ class PcmDecoder : public Decoder }; } // namespace decoder - -#endif diff --git a/client/double_buffer.hpp b/client/double_buffer.hpp index dad3dfb56..9163bb215 100644 --- a/client/double_buffer.hpp +++ b/client/double_buffer.hpp @@ -1,6 +1,6 @@ /*** This file is part of snapcast - Copyright (C) 2014-2020 Johannes Pohl + Copyright (C) 2014-2024 Johannes Pohl This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -22,6 +22,8 @@ // standard headers #include #include +#include +#include #include diff --git a/client/metadata.hpp b/client/metadata.hpp index ddc1d0f15..cdc18512d 100644 --- a/client/metadata.hpp +++ b/client/metadata.hpp @@ -1,6 +1,6 @@ /*** This file is part of snapcast - Copyright (C) 2014-2020 Johannes Pohl + Copyright (C) 2014-2024 Johannes Pohl This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,11 +16,15 @@ along with this program. If not, see . ***/ -#ifndef METADATA_H -#define METADATA_H +#pragma once +// local headers #include "common/json.hpp" +// standard headers +#include + + // Prefix used in output #define METADATA std::string("metadata") @@ -99,5 +103,3 @@ class MetaStderrAdapter : public MetadataAdapter return 0; } }; - -#endif diff --git a/client/player/alsa_player.cpp b/client/player/alsa_player.cpp index 5bf30c765..3c1c89f6f 100644 --- a/client/player/alsa_player.cpp +++ b/client/player/alsa_player.cpp @@ -29,6 +29,8 @@ // 3rd party headers // standard headers +#include + using namespace std::chrono_literals; using namespace std; diff --git a/client/player/alsa_player.hpp b/client/player/alsa_player.hpp index 77018f754..d189bc29b 100644 --- a/client/player/alsa_player.hpp +++ b/client/player/alsa_player.hpp @@ -16,8 +16,7 @@ along with this program. If not, see . ***/ -#ifndef ALSA_PLAYER_HPP -#define ALSA_PLAYER_HPP +#pragma once // local headers #include "player.hpp" @@ -30,6 +29,7 @@ // standard headers #include #include +#include namespace player @@ -94,5 +94,3 @@ class AlsaPlayer : public Player }; } // namespace player - -#endif \ No newline at end of file diff --git a/client/player/file_player.cpp b/client/player/file_player.cpp index e916e8a2d..006a60bb0 100644 --- a/client/player/file_player.cpp +++ b/client/player/file_player.cpp @@ -1,6 +1,6 @@ /*** This file is part of snapcast - Copyright (C) 2014-2022 Johannes Pohl + Copyright (C) 2014-2024 Johannes Pohl This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -28,8 +28,7 @@ // 3rd party headers // standard headers -#include -#include + using namespace std; diff --git a/client/player/oboe_player.cpp b/client/player/oboe_player.cpp index a92ce0d41..21d944084 100644 --- a/client/player/oboe_player.cpp +++ b/client/player/oboe_player.cpp @@ -1,6 +1,6 @@ /*** This file is part of snapcast - Copyright (C) 2014-2022 Johannes Pohl + Copyright (C) 2014-2024 Johannes Pohl This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -21,13 +21,10 @@ // local headers #include "common/aixlog.hpp" -#include "common/snap_exception.hpp" -#include "common/str_compat.hpp" // 3rd party headers // standard headers -#include #include diff --git a/client/player/opensl_player.cpp b/client/player/opensl_player.cpp index 489953224..1642967ee 100644 --- a/client/player/opensl_player.cpp +++ b/client/player/opensl_player.cpp @@ -1,6 +1,6 @@ /*** This file is part of snapcast - Copyright (C) 2014-2022 Johannes Pohl + Copyright (C) 2014-2024 Johannes Pohl This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -27,7 +27,6 @@ // 3rd party headers // standard headers -#include #include diff --git a/client/player/player.hpp b/client/player/player.hpp index 842baea2f..e372402fa 100644 --- a/client/player/player.hpp +++ b/client/player/player.hpp @@ -16,12 +16,10 @@ along with this program. If not, see . ***/ -#ifndef PLAYER_HPP -#define PLAYER_HPP +#pragma once // local headers #include "client_settings.hpp" -#include "common/aixlog.hpp" #include "common/endian.hpp" #include "stream.hpp" @@ -32,9 +30,8 @@ #include #include #include -#include #include -#include + #if !defined(WINDOWS) #define SUPPORTS_VOLUME_SCRIPT @@ -137,5 +134,3 @@ inline bool operator!=(const Player::Volume& lhs, const Player::Volume& rhs) } } // namespace player - -#endif diff --git a/client/player/pulse_player.cpp b/client/player/pulse_player.cpp index 06f364528..21e9b8b9f 100644 --- a/client/player/pulse_player.cpp +++ b/client/player/pulse_player.cpp @@ -30,7 +30,6 @@ #include // standard headers -#include #include diff --git a/client/player/pulse_player.hpp b/client/player/pulse_player.hpp index ad2e40315..5836f9e80 100644 --- a/client/player/pulse_player.hpp +++ b/client/player/pulse_player.hpp @@ -16,8 +16,7 @@ along with this program. If not, see . ***/ -#ifndef PULSE_PLAYER_HPP -#define PULSE_PLAYER_HPP +#pragma once // local headers #include "player.hpp" @@ -91,5 +90,3 @@ class PulsePlayer : public Player }; } // namespace player - -#endif diff --git a/client/player/wasapi_player.cpp b/client/player/wasapi_player.cpp index 2c950feba..385ef5554 100644 --- a/client/player/wasapi_player.cpp +++ b/client/player/wasapi_player.cpp @@ -1,6 +1,6 @@ /*** This file is part of snapcast - Copyright (C) 2014-2022 Johannes Pohl + Copyright (C) 2014-2024 Johannes Pohl This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -26,7 +26,6 @@ // 3rd party headers #include #include -//#include // standard headers #include @@ -37,10 +36,7 @@ #include #include -#include -#include -#include -#include + using namespace std; using namespace std::chrono; diff --git a/client/snapclient.cpp b/client/snapclient.cpp index 577009364..f05b328da 100644 --- a/client/snapclient.cpp +++ b/client/snapclient.cpp @@ -37,7 +37,6 @@ #include "common/aixlog.hpp" #include "common/snap_exception.hpp" #include "common/str_compat.hpp" -#include "common/utils.hpp" #include "common/version.hpp" // 3rd party headers @@ -45,7 +44,6 @@ #include // standard headers -#include #include #ifndef WINDOWS #include diff --git a/client/stream.cpp b/client/stream.cpp index c42131d90..6fe5da6b0 100644 --- a/client/stream.cpp +++ b/client/stream.cpp @@ -408,7 +408,7 @@ bool Stream::getPlayerChunk(void* outputBuffer, const cs::usec& outputBufferDacT auto miniMedian = miniBuffer_.median(); if ((cs::usec(shortMedian_) > kCorrectionBegin) && (cs::usec(miniMedian) > cs::usec(50)) && (cs::usec(age) > cs::usec(50))) { - double rate = (shortMedian_ / 100) * 0.00005; + double rate = (shortMedian_ / 100.) * 0.00005; rate = 1.0 - std::min(rate, 0.0005); // LOG(INFO, LOG_TAG) << "Rate: " << rate << "\n"; // we are late (age > 0), this means we are not playing fast enough @@ -417,7 +417,7 @@ bool Stream::getPlayerChunk(void* outputBuffer, const cs::usec& outputBufferDacT } else if ((cs::usec(shortMedian_) < -kCorrectionBegin) && (cs::usec(miniMedian) < -cs::usec(50)) && (cs::usec(age) < -cs::usec(50))) { - double rate = (-shortMedian_ / 100) * 0.00005; + double rate = (-shortMedian_ / 100.) * 0.00005; rate = 1.0 + std::min(rate, 0.0005); // LOG(INFO, LOG_TAG) << "Rate: " << rate << "\n"; // we are early (age > 0), this means we are playing too fast diff --git a/client/stream.hpp b/client/stream.hpp index 6ab170c76..89f91afd1 100644 --- a/client/stream.hpp +++ b/client/stream.hpp @@ -16,28 +16,25 @@ along with this program. If not, see . ***/ -#ifndef STREAM_HPP -#define STREAM_HPP +#pragma once // local headers -#include "common/message/message.hpp" #include "common/message/pcm_chunk.hpp" -#include "common/queue.h" +#include "common/queue.hpp" #include "common/resampler.hpp" #include "common/sample_format.hpp" #include "common/utils/logging.hpp" #include "double_buffer.hpp" // 3rd party headers +#ifdef HAS_SOXR +#include +#endif // standard headers #include -#include #include -#ifdef HAS_SOXR -#include -#endif /// Time synchronized audio stream @@ -139,7 +136,3 @@ class Stream /// Log "failed to get chunk" only once per second utils::logging::TimeConditional time_cond_; }; - - - -#endif diff --git a/client/time_provider.cpp b/client/time_provider.cpp index 97e2c60fd..d6478c273 100644 --- a/client/time_provider.cpp +++ b/client/time_provider.cpp @@ -1,6 +1,6 @@ /*** This file is part of snapcast - Copyright (C) 2014-2021 Johannes Pohl + Copyright (C) 2014-2024 Johannes Pohl This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,9 +16,13 @@ along with this program. If not, see . ***/ +// prototype/interface header file #include "time_provider.hpp" + +// local headers #include "common/aixlog.hpp" +// standard headers #include static constexpr auto LOG_TAG = "TimeProvider"; diff --git a/common/daemon.cpp b/common/daemon.cpp index 89add9690..aa997567c 100644 --- a/common/daemon.cpp +++ b/common/daemon.cpp @@ -1,6 +1,6 @@ /*** This file is part of snapcast - Copyright (C) 2014-2021 Johannes Pohl + Copyright (C) 2014-2024 Johannes Pohl This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,17 +16,19 @@ along with this program. If not, see . ***/ +// prototype/interface header file #include "daemon.hpp" +// local headers #include "common/snap_exception.hpp" #include "common/str_compat.hpp" -#include "common/utils.hpp" #include "common/utils/file_utils.hpp" + +// standard headers #include #include #include #include -#include #include #include #include @@ -102,14 +104,14 @@ void Daemon::daemonize() if (user_gid != static_cast(-1) && user_gid != getgid() && setgid(user_gid) == -1) throw SnapException("Failed to set group " + cpt::to_string(static_cast(user_gid))); - //#if defined(FREEBSD) && !defined(MACOS) - //#ifdef FREEBSD + // #if defined(FREEBSD) && !defined(MACOS) + // #ifdef FREEBSD /// init supplementary groups /// (must be done before we change our uid) /// no need to set the new user's supplementary groups if we are already this user // if (!had_group && user_uid != getuid() && initgroups(user_name, user_gid) == -1) // throw SnapException("Failed to set supplementary groups of user \"" + user + "\""); - //#endif + // #endif /// set uid if (user_uid != static_cast(-1) && user_uid != getuid() && setuid(user_uid) == -1) throw SnapException("Failed to set user " + user_); diff --git a/common/daemon.hpp b/common/daemon.hpp index b2e2069ca..b2e52286b 100644 --- a/common/daemon.hpp +++ b/common/daemon.hpp @@ -1,6 +1,6 @@ /*** This file is part of snapcast - Copyright (C) 2014-2020 Johannes Pohl + Copyright (C) 2014-2024 Johannes Pohl This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,9 +16,10 @@ along with this program. If not, see . ***/ -#ifndef DAEMON_H -#define DAEMON_H +#pragma once + +// standard headers #include @@ -36,6 +37,3 @@ class Daemon std::string group_; std::string pidfile_; }; - - -#endif // DAEMON_H diff --git a/common/endian.hpp b/common/endian.hpp index 6b131a986..96d139b49 100644 --- a/common/endian.hpp +++ b/common/endian.hpp @@ -1,6 +1,24 @@ -#ifndef ENDIAN_HPP -#define ENDIAN_HPP +/*** + This file is part of snapcast + Copyright (C) 2014-2024 Johannes Pohl + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +***/ + +#pragma once + +// standard headers #include #ifdef IS_BIG_ENDIAN @@ -43,5 +61,3 @@ inline int64_t swap(const int64_t& val) return SWAP_64(val); } } // namespace endian - -#endif diff --git a/common/error_code.hpp b/common/error_code.hpp index 946eda697..cbc2744c4 100644 --- a/common/error_code.hpp +++ b/common/error_code.hpp @@ -1,6 +1,6 @@ /*** This file is part of snapcast - Copyright (C) 2014-2021 Johannes Pohl + Copyright (C) 2014-2024 Johannes Pohl This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,10 +16,9 @@ along with this program. If not, see . ***/ -#ifndef ERROR_CODE_HPP -#define ERROR_CODE_HPP - +#pragma once +// standard headers #include #include #include @@ -55,7 +54,3 @@ struct ErrorCode : public std::error_code } // namespace snapcast - - - -#endif diff --git a/common/message/factory.hpp b/common/message/factory.hpp index 7c921c031..ac236ed66 100644 --- a/common/message/factory.hpp +++ b/common/message/factory.hpp @@ -1,6 +1,6 @@ /*** This file is part of snapcast - Copyright (C) 2014-2023 Johannes Pohl + Copyright (C) 2014-2024 Johannes Pohl This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,23 +16,16 @@ along with this program. If not, see . ***/ -#ifndef MESSAGE_FACTORY_HPP -#define MESSAGE_FACTORY_HPP +#pragma once // local headers #include "client_info.hpp" #include "codec_header.hpp" -#include "common/str_compat.hpp" -#include "common/utils.hpp" #include "hello.hpp" -#include "json_message.hpp" #include "pcm_chunk.hpp" #include "server_settings.hpp" #include "time.hpp" -// standard headers -#include - namespace msg { @@ -91,5 +84,3 @@ static std::unique_ptr createMessage(const BaseMessage& base_messag } // namespace factory } // namespace msg - -#endif diff --git a/common/message/message.hpp b/common/message/message.hpp index d9ca8cd7c..4bb52e437 100644 --- a/common/message/message.hpp +++ b/common/message/message.hpp @@ -1,6 +1,6 @@ /*** This file is part of snapcast - Copyright (C) 2014-2023 Johannes Pohl + Copyright (C) 2014-2024 Johannes Pohl This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,8 +16,7 @@ along with this program. If not, see . ***/ -#ifndef MESSAGE_MESSAGE_HPP -#define MESSAGE_MESSAGE_HPP +#pragma once // local headers #include "common/endian.hpp" @@ -32,7 +31,6 @@ #include #endif #include -#include /* template > @@ -344,5 +342,3 @@ struct BaseMessage }; } // namespace msg - -#endif diff --git a/common/message/wire_chunk.hpp b/common/message/wire_chunk.hpp index a11a26233..979175e91 100644 --- a/common/message/wire_chunk.hpp +++ b/common/message/wire_chunk.hpp @@ -1,6 +1,6 @@ /*** This file is part of snapcast - Copyright (C) 2014-2022 Johannes Pohl + Copyright (C) 2014-2024 Johannes Pohl This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,8 +16,7 @@ along with this program. If not, see . ***/ -#ifndef MESSAGE_WIRE_CHUNK_HPP -#define MESSAGE_WIRE_CHUNK_HPP +#pragma once // local headers #include "common/time_defs.hpp" @@ -28,8 +27,6 @@ #include #include #include -#include -#include namespace msg @@ -95,6 +92,3 @@ class WireChunk : public BaseMessage } }; } // namespace msg - - -#endif diff --git a/common/queue.h b/common/queue.hpp similarity index 97% rename from common/queue.h rename to common/queue.hpp index fcb504881..6648aeca0 100644 --- a/common/queue.h +++ b/common/queue.hpp @@ -1,6 +1,6 @@ /*** This file is part of snapcast - Copyright (C) 2014-2020 Johannes Pohl + Copyright (C) 2014-2024 Johannes Pohl This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,14 +16,14 @@ along with this program. If not, see . ***/ -#ifndef QUEUE_H -#define QUEUE_H +#pragma once +// standard headers #include #include #include #include -#include + template class Queue @@ -164,6 +164,3 @@ class Queue mutable std::mutex mutex_; mutable std::condition_variable cond_; }; - - -#endif diff --git a/common/resampler.cpp b/common/resampler.cpp index 929fceae9..1d5d698ac 100644 --- a/common/resampler.cpp +++ b/common/resampler.cpp @@ -1,6 +1,6 @@ /*** This file is part of snapcast - Copyright (C) 2014-2021 Johannes Pohl + Copyright (C) 2014-2024 Johannes Pohl This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,12 +16,16 @@ along with this program. If not, see . ***/ +// prototype/interface header file #include "resampler.hpp" + +// local headers #include "common/aixlog.hpp" -#include "common/snap_exception.hpp" +// standard headers #include + using namespace std; static constexpr auto LOG_TAG = "Resampler"; diff --git a/common/resampler.hpp b/common/resampler.hpp index b6b9517e9..3e191024c 100644 --- a/common/resampler.hpp +++ b/common/resampler.hpp @@ -1,6 +1,6 @@ /*** This file is part of snapcast - Copyright (C) 2014-2020 Johannes Pohl + Copyright (C) 2014-2024 Johannes Pohl This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,17 +16,21 @@ along with this program. If not, see . ***/ -#ifndef RESAMPLER_HPP -#define RESAMPLER_HPP +#pragma once + +// local headers #include "common/message/pcm_chunk.hpp" #include "common/sample_format.hpp" -#include -#include + +// 3rd party headers #ifdef HAS_SOXR #include #endif +// standard headers +#include + class Resampler { @@ -48,5 +52,3 @@ class Resampler soxr_t soxr_{nullptr}; #endif }; - -#endif diff --git a/common/sample_format.cpp b/common/sample_format.cpp index 6c6cecb70..6c867852f 100644 --- a/common/sample_format.cpp +++ b/common/sample_format.cpp @@ -1,6 +1,6 @@ /*** This file is part of snapcast - Copyright (C) 2014-2021 Johannes Pohl + Copyright (C) 2014-2024 Johannes Pohl This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,16 +16,17 @@ along with this program. If not, see . ***/ -#include -#include -#include -#include "common/aixlog.hpp" +// local headers +#include "sample_format.hpp" #include "common/snap_exception.hpp" #include "common/str_compat.hpp" -#include "common/utils.hpp" #include "common/utils/string_utils.hpp" -#include "sample_format.hpp" + +// standard headers +#include +#include +#include using namespace std; diff --git a/common/sample_format.hpp b/common/sample_format.hpp index b68d00a3c..2cc79170d 100644 --- a/common/sample_format.hpp +++ b/common/sample_format.hpp @@ -1,6 +1,6 @@ /*** This file is part of snapcast - Copyright (C) 2014-2020 Johannes Pohl + Copyright (C) 2014-2024 Johannes Pohl This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,9 +16,9 @@ along with this program. If not, see . ***/ -#ifndef SAMPLE_FORMAT_H -#define SAMPLE_FORMAT_H +#pragma once +// standard headers #include #include @@ -101,6 +101,3 @@ class SampleFormat uint16_t bits_; uint16_t channels_; }; - - -#endif diff --git a/common/snap_exception.hpp b/common/snap_exception.hpp index f4a9238b7..b40fc97bc 100644 --- a/common/snap_exception.hpp +++ b/common/snap_exception.hpp @@ -1,6 +1,6 @@ /*** This file is part of snapcast - Copyright (C) 2014-2020 Johannes Pohl + Copyright (C) 2014-2024 Johannes Pohl This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,10 +16,9 @@ along with this program. If not, see . ***/ -#ifndef SNAP_EXCEPTION_HPP -#define SNAP_EXCEPTION_HPP +#pragma once -#include // std::strlen, std::strcpy +// standard headers #include #include @@ -50,6 +49,3 @@ class SnapException : public std::exception return text_.c_str(); } }; - - -#endif diff --git a/common/str_compat.hpp b/common/str_compat.hpp index da62f10f5..bcdc54d1b 100644 --- a/common/str_compat.hpp +++ b/common/str_compat.hpp @@ -1,7 +1,25 @@ -#ifndef COMPAT_H -#define COMPAT_H +/*** + This file is part of snapcast + Copyright (C) 2014-2024 Johannes Pohl + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +***/ + +#pragma once + + +// standard headers #include #include @@ -114,6 +132,3 @@ static float strtof(const char* str, char** endptr) #endif } } // namespace cpt - - -#endif diff --git a/common/time_defs.hpp b/common/time_defs.hpp index b2a2e1f32..55db73e81 100644 --- a/common/time_defs.hpp +++ b/common/time_defs.hpp @@ -1,6 +1,6 @@ /*** This file is part of snapcast - Copyright (C) 2014-2020 Johannes Pohl + Copyright (C) 2014-2024 Johannes Pohl This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,9 +16,10 @@ along with this program. If not, see . ***/ -#ifndef TIME_DEFS_H -#define TIME_DEFS_H +#pragma once + +// standard headers #include #include #ifdef MACOS @@ -34,6 +35,7 @@ #include #endif + namespace chronos { using clk = @@ -159,6 +161,3 @@ inline void usleep(const int32_t& microseconds) sleep(usec(microseconds)); } } // namespace chronos - - -#endif diff --git a/common/utils.hpp b/common/utils.hpp index b2268ffb6..903f40642 100644 --- a/common/utils.hpp +++ b/common/utils.hpp @@ -1,6 +1,6 @@ /*** This file is part of snapcast - Copyright (C) 2014-2020 Johannes Pohl + Copyright (C) 2014-2024 Johannes Pohl This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,21 +16,16 @@ along with this program. If not, see . ***/ -#ifndef UTILS_H -#define UTILS_H +#pragma once -#include "common/str_compat.hpp" + +// local headers #include "common/utils/string_utils.hpp" -#include -#include -// #include +// standard headers #include #include -#include #include -#include -#include #include #ifndef WINDOWS #include @@ -43,7 +38,6 @@ #include #include #include -#include #if !defined(WINDOWS) && !defined(FREEBSD) #include #endif @@ -463,6 +457,3 @@ static std::string getHostId(const std::string& defaultId = "") /// The host name should be unique enough in a LAN return getHostName(); } - - -#endif diff --git a/common/version.hpp b/common/version.hpp index 13210fd82..eaed3c9a9 100644 --- a/common/version.hpp +++ b/common/version.hpp @@ -1,6 +1,6 @@ /*** This file is part of snapcast - Copyright (C) 2014-2021 Johannes Pohl + Copyright (C) 2014-2024 Johannes Pohl This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,11 +16,13 @@ along with this program. If not, see . ***/ -#ifndef VERSION_HPP -#define VERSION_HPP +#pragma once + +// standard headers #include + namespace version { @@ -46,5 +48,3 @@ static std::string rev(std::size_t len = 0) } } // namespace version - -#endif diff --git a/server/control_server.hpp b/server/control_server.hpp index 81b8970b7..ca06b6292 100644 --- a/server/control_server.hpp +++ b/server/control_server.hpp @@ -1,6 +1,6 @@ /*** This file is part of snapcast - Copyright (C) 2014-2023 Johannes Pohl + Copyright (C) 2014-2024 Johannes Pohl This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,15 +16,9 @@ along with this program. If not, see . ***/ -#ifndef CONTROL_SERVER_HPP -#define CONTROL_SERVER_HPP +#pragma once // local headers -#include "common/message/codec_header.hpp" -#include "common/message/message.hpp" -#include "common/message/server_settings.hpp" -#include "common/queue.h" -#include "common/sample_format.hpp" #include "control_session.hpp" #include "server_settings.hpp" @@ -35,7 +29,6 @@ // standard headers #include #include -#include #include @@ -82,7 +75,3 @@ class ControlServer : public ControlMessageReceiver ServerSettings::Http http_settings_; ControlMessageReceiver* controlMessageReceiver_; }; - - - -#endif diff --git a/server/control_session.hpp b/server/control_session.hpp index 59817032b..3fde9b683 100644 --- a/server/control_session.hpp +++ b/server/control_session.hpp @@ -1,6 +1,6 @@ /*** This file is part of snapcast - Copyright (C) 2014-2023 Johannes Pohl + Copyright (C) 2014-2024 Johannes Pohl This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,21 +16,15 @@ along with this program. If not, see . ***/ -#ifndef CONTROL_SESSION_HPP -#define CONTROL_SESSION_HPP +#pragma once // local headers -#include "common/message/message.hpp" -#include "common/queue.h" -#include "server_settings.hpp" // 3rd party headers // standard headers -#include -#include +#include #include -#include #include @@ -72,7 +66,3 @@ class ControlSession : public std::enable_shared_from_this protected: ControlMessageReceiver* message_receiver_; }; - - - -#endif diff --git a/server/control_session_http.hpp b/server/control_session_http.hpp index 7c33347c6..885232aba 100644 --- a/server/control_session_http.hpp +++ b/server/control_session_http.hpp @@ -1,6 +1,6 @@ /*** This file is part of snapcast - Copyright (C) 2014-2022 Johannes Pohl + Copyright (C) 2014-2024 Johannes Pohl This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,11 +16,12 @@ along with this program. If not, see . ***/ -#ifndef CONTROL_SESSION_HTTP_HPP -#define CONTROL_SESSION_HTTP_HPP +#pragma once + // local headers #include "control_session.hpp" +#include "server_settings.hpp" // 3rd party headers #include @@ -77,7 +78,3 @@ class ControlSessionHttp : public ControlSession ServerSettings::Http settings_; std::deque messages_; }; - - - -#endif diff --git a/server/control_session_tcp.cpp b/server/control_session_tcp.cpp index feb297d94..4311ff066 100644 --- a/server/control_session_tcp.cpp +++ b/server/control_session_tcp.cpp @@ -1,6 +1,6 @@ /*** This file is part of snapcast - Copyright (C) 2014-2023 Johannes Pohl + Copyright (C) 2014-2024 Johannes Pohl This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,6 +16,7 @@ along with this program. If not, see . ***/ + // prototype/interface header file #include "control_session_tcp.hpp" @@ -25,7 +26,6 @@ // local headers #include "common/aixlog.hpp" -#include "common/message/pcm_chunk.hpp" using namespace std; diff --git a/server/server.cpp b/server/server.cpp index 9cbf5fcc3..6a450fdbc 100644 --- a/server/server.cpp +++ b/server/server.cpp @@ -1,6 +1,6 @@ /*** This file is part of snapcast - Copyright (C) 2014-2023 Johannes Pohl + Copyright (C) 2014-2024 Johannes Pohl This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -23,15 +23,16 @@ #include "common/aixlog.hpp" #include "common/message/client_info.hpp" #include "common/message/hello.hpp" +#include "common/message/server_settings.hpp" #include "common/message/time.hpp" #include "config.hpp" -#include "stream_session_tcp.hpp" // 3rd party headers // standard headers #include + using namespace std; using namespace streamreader; diff --git a/server/server.hpp b/server/server.hpp index cb2c5194e..b7b007cd7 100644 --- a/server/server.hpp +++ b/server/server.hpp @@ -1,6 +1,6 @@ /*** This file is part of snapcast - Copyright (C) 2014-2023 Johannes Pohl + Copyright (C) 2014-2024 Johannes Pohl This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,15 +16,12 @@ along with this program. If not, see . ***/ -#ifndef SERVER_HPP -#define SERVER_HPP +#pragma once + // local headers -#include "common/message/codec_header.hpp" #include "common/message/message.hpp" -#include "common/message/server_settings.hpp" -#include "common/queue.h" -#include "common/sample_format.hpp" +#include "common/queue.hpp" #include "control_server.hpp" #include "jsonrpcpp.hpp" #include "server_settings.hpp" @@ -38,10 +35,6 @@ // standard headers #include -#include -#include -#include -#include using namespace streamreader; @@ -102,7 +95,3 @@ class Server : public StreamMessageReceiver, public ControlMessageReceiver, publ std::unique_ptr streamServer_; std::unique_ptr streamManager_; }; - - - -#endif diff --git a/server/server_settings.hpp b/server/server_settings.hpp index 61430039f..9cb34ffdb 100644 --- a/server/server_settings.hpp +++ b/server/server_settings.hpp @@ -1,6 +1,6 @@ /*** This file is part of snapcast - Copyright (C) 2014-2021 Johannes Pohl + Copyright (C) 2014-2024 Johannes Pohl This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,14 +16,16 @@ along with this program. If not, see . ***/ -#ifndef SERVER_SETTINGS_HPP -#define SERVER_SETTINGS_HPP +#pragma once -#include -#include +// local headers #include "image_cache.hpp" +// standard headers +#include +#include + struct ServerSettings { @@ -83,5 +85,3 @@ struct ServerSettings StreamingClient streamingclient; Logging logging; }; - -#endif diff --git a/server/stream_server.hpp b/server/stream_server.hpp index c13806ea2..c55637fdd 100644 --- a/server/stream_server.hpp +++ b/server/stream_server.hpp @@ -1,6 +1,6 @@ /*** This file is part of snapcast - Copyright (C) 2014-2023 Johannes Pohl + Copyright (C) 2014-2024 Johannes Pohl This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,20 +16,15 @@ along with this program. If not, see . ***/ -#ifndef STREAM_SERVER_HPP -#define STREAM_SERVER_HPP +#pragma once + // local headers -#include "common/message/codec_header.hpp" #include "common/message/message.hpp" -#include "common/message/server_settings.hpp" -#include "common/queue.h" -#include "common/sample_format.hpp" +#include "common/queue.hpp" #include "control_server.hpp" -#include "jsonrpcpp.hpp" #include "server_settings.hpp" #include "stream_session.hpp" -#include "streamreader/stream_manager.hpp" // 3rd party headers #include @@ -38,8 +33,6 @@ // standard headers #include #include -#include -#include #include @@ -94,7 +87,3 @@ class StreamServer : public StreamMessageReceiver Queue> messages_; StreamMessageReceiver* messageReceiver_; }; - - - -#endif diff --git a/server/stream_session.hpp b/server/stream_session.hpp index e1529de42..eeb464ac7 100644 --- a/server/stream_session.hpp +++ b/server/stream_session.hpp @@ -1,6 +1,6 @@ /*** This file is part of snapcast - Copyright (C) 2014-2023 Johannes Pohl + Copyright (C) 2014-2024 Johannes Pohl This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,12 +16,11 @@ along with this program. If not, see . ***/ -#ifndef STREAM_SESSION_HPP -#define STREAM_SESSION_HPP +#pragma once + // local headers #include "common/message/message.hpp" -#include "common/queue.h" #include "streamreader/stream_manager.hpp" // 3rd party headers @@ -30,12 +29,9 @@ #include // standard headers -#include -#include #include #include #include -#include #include #include #include @@ -166,7 +162,3 @@ class StreamSession : public std::enable_shared_from_this std::deque messages_; mutable std::mutex mutex_; }; - - - -#endif