From aaa415b62f6d1b815aa9a8954d2cf1ddb6a8317d Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Sun, 5 May 2024 21:20:26 +0200 Subject: Update common: make remotecontrol optional --- lib/ClockTAI.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/ClockTAI.cpp') diff --git a/lib/ClockTAI.cpp b/lib/ClockTAI.cpp index d8e37ea..06e88f8 100644 --- a/lib/ClockTAI.cpp +++ b/lib/ClockTAI.cpp @@ -379,6 +379,7 @@ void Bulletin::clear_expiry_if_overridden() } } +#if ENABLE_REMOTECONTROL ClockTAI::ClockTAI(const std::vector& bulletin_urls) : RemoteControllable("clocktai") { @@ -386,6 +387,9 @@ ClockTAI::ClockTAI(const std::vector& bulletin_urls) : RC_ADD_PARAMETER(expiry, "Number of seconds until TAI Bulletin expires"); RC_ADD_PARAMETER(expires_at, "UNIX timestamp when TAI Bulletin expires"); RC_ADD_PARAMETER(url, "URLs used to fetch the bulletin, separated by pipes"); +#else +ClockTAI::ClockTAI(const std::vector& bulletin_urls) { +#endif // ENABLE_REMOTECONTROL if (bulletin_urls.empty()) { etiLog.level(debug) << "Initialising default TAI Bulletin URLs"; @@ -629,6 +633,7 @@ void Bulletin::store_to_cache(const char* cache_filename) const } } +#if ENABLE_REMOTECONTROL void ClockTAI::set_parameter(const string& parameter, const string& value) { if (parameter == "expiry" or parameter == "expires_at") { @@ -719,6 +724,7 @@ const json::map_t ClockTAI::get_all_values() const return stat; } +#endif // ENABLE_REMOTECONTROL #if 0 // Example testing code -- cgit v1.2.3