OpenCPN Partial API docs
Loading...
Searching...
No Matches
plugin_cache.h
Go to the documentation of this file.
1/***************************************************************************
2 * Copyright (C) 2019 Alec Leamas *
3 * *
4 * This program is free software; you can redistribute it and/or modify *
5 * it under the terms of the GNU General Public License as published by *
6 * the Free Software Foundation; either version 2 of the License, or *
7 * (at your option) any later version. *
8 * *
9 * This program is distributed in the hope that it will be useful, *
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12 * GNU General Public License for more details. *
13 * *
14 * You should have received a copy of the GNU General Public License *
15 * along with this program; if not, see <https://www.gnu.org/licenses/>. *
16 **************************************************************************/
17
24#ifndef PLUGIN_CACHE_H__
25#define PLUGIN_CACHE_H__
26
27#include <string>
28
29namespace ocpn {
30
32bool store_metadata(const char* path);
33
38std::string lookup_metadata(const char* name = 0);
39
41bool store_tarball(const char* path, const char* basename);
42
47std::string lookup_tarball(const char* basename);
48
50unsigned cache_file_count();
51
53unsigned long cache_size();
54
56void cache_clear();
57
58} // namespace ocpn
59#endif
Standard, mostly strings utilities.
Definition datetime.cpp:39
std::string lookup_tarball(const char *uri)
Get path to tarball in cache for given filename.
std::string lookup_metadata(const char *name)
Get metadata path for a given name defaulting to ocpn-plugins.xml)
void cache_clear()
Remove all files in cache:
unsigned cache_file_count()
Return number of files in cache.
bool store_metadata(const char *path)
Store metadata in metadata cache, return success/fail.
bool store_tarball(const char *path, const char *basename)
Store a tarball in tarball cache, return success/fail.
unsigned long cache_size()
Return total size of files in cache in kbytes.