]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/sysupdate/sysupdate-cache.h
Merge pull request #22791 from keszybz/bootctl-invert-order
[thirdparty/systemd.git] / src / sysupdate / sysupdate-cache.h
1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
2 #pragma once
3
4 #include "hashmap.h"
5
6 typedef struct WebCacheItem {
7 char *url;
8 bool verified;
9 size_t size;
10 uint8_t data[];
11 } WebCacheItem;
12
13 /* A simple in-memory cache for downloaded manifests. Very likely multiple transfers will use the same
14 * manifest URLs, hence let's make sure we only download them once within each sysupdate invocation. */
15
16 int web_cache_add_item(Hashmap **cache, const char *url, bool verified, const void *data, size_t size);
17
18 WebCacheItem* web_cache_get_item(Hashmap *cache, const char *url, bool verified);