summaryrefslogtreecommitdiffstats
path: root/src/ClockTAI.h
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2019-01-07 11:48:32 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2019-01-07 11:48:32 +0100
commitde3d7854928a73392426077b63c3875fb47c852b (patch)
tree57feff93b01a153bfad82849aba0b756b64c8def /src/ClockTAI.h
parent5a0633d70a82e15f63a006489ffa1544fa37cb90 (diff)
downloaddabmux-de3d7854928a73392426077b63c3875fb47c852b.tar.gz
dabmux-de3d7854928a73392426077b63c3875fb47c852b.tar.bz2
dabmux-de3d7854928a73392426077b63c3875fb47c852b.zip
Rework TAIClock, make some functions free from side-effects
Diffstat (limited to 'src/ClockTAI.h')
-rw-r--r--src/ClockTAI.h25
1 files changed, 1 insertions, 24 deletions
diff --git a/src/ClockTAI.h b/src/ClockTAI.h
index 4436ba9..b92012b 100644
--- a/src/ClockTAI.h
+++ b/src/ClockTAI.h
@@ -85,35 +85,12 @@ class ClockTAI : public RemoteControllable {
std::vector<std::string> m_bulletin_urls;
- mutable std::stringstream m_bulletin;
+ std::string m_bulletin;
std::chrono::system_clock::time_point m_bulletin_download_time;
- // Load bulletin into m_bulletin from the cache file
- void load_bulletin_from_file(const char* cache_filename);
-
// Update the cache file with the current m_bulletin
void update_cache(const char* cache_filename);
- // Verifies the expiration date in the m_bulletin. Returns
- // true if the bulletin is valid.
- bool bulletin_is_valid(void);
-
- // In how much time will the bulletin expire?
- // returns a value in seconds, or -1 if it is expired or invalid
- int64_t bulletin_expiry_delay(void) const;
-
- // Load bulletin into m_bulletin from the URL
- void download_tai_utc_bulletin(const char* url);
-
- // read TAI offset from m_bulletin in IETF format
- int parse_ietf_bulletin(void);
-
- // callback that receives data from cURL
- size_t fill_bulletin(char *ptr, size_t size, size_t nmemb);
-
- // static callback wrapper for cURL
- static size_t fill_bulletin_cb(
- char *ptr, size_t size, size_t nmemb, void *ctx);
/* Remote control */
virtual void set_parameter(const std::string& parameter,