cache.h
Go to the documentation of this file.
1 // SPDX-License-Identifier: BSD-3-Clause
2 // SPDX-FileCopyrightText: Czech Technical University in Prague
3 
4 #pragma once
5 
6 #include <functional>
7 #include <sstream>
8 #include <string>
9 
11 #include <ros/duration.h>
12 
13 typedef void CURL;
14 
15 namespace gnss_info
16 {
17 
22 std::string getCacheDir();
23 
32 cras::expected<std::stringstream, std::string> download(const std::string& url,
33  const std::function<void(CURL*)>& curlOptions = {});
34 
40 bool isCacheFileValid(const std::string& file);
41 
48 bool isCacheFileValid(const std::string& file, const ros::WallDuration& validity);
49 
50 }
file
page HOWTO subpage DoxygenGuide Documenting Your Code page DoxygenGuide Documenting Your Code todo Flesh out this document section doctips Tips for Documenting When defining make sure that the prototype is identical between the cpp and hpp file
duration.h
gnss_info::isCacheFileValid
bool isCacheFileValid(const std::string &file)
Return whether the given cache file can be used.
Definition: cache.cpp:76
CURL
void CURL
Definition: cache.h:13
gnss_info
Definition: cache.h:15
gnss_info::getCacheDir
std::string getCacheDir()
Return path to a directory where cache files should be stored. Also make sure the directory exists.
Definition: cache.cpp:20
expected.hpp
gnss_info::download
cras::expected< std::stringstream, std::string > download(const std::string &url, const std::function< void(CURL *)> &curlOptions={})
Download the given URL to a stringstream.
Definition: cache.cpp:50
ros::WallDuration


gnss_info
Author(s): Martin Pecka
autogenerated on Fri Nov 24 2023 03:50:35