1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
2 #pragma once
3 
4 #include <stdbool.h>
5 #include <stdio.h>
6 
7 #include "sd-id128.h"
8 
9 #include "hashmap.h"
10 #include "strbuf.h"
11 
12 int catalog_import_file(OrderedHashmap *h, const char *path);
13 int catalog_update(const char* database, const char* root, const char* const* dirs);
14 int catalog_get(const char* database, sd_id128_t id, char **data);
15 int catalog_list(FILE *f, const char* database, bool oneline);
16 int catalog_list_items(FILE *f, const char* database, bool oneline, char **items);
17 int catalog_file_lang(const char *filename, char **lang);
18 extern const char * const catalog_file_dirs[];
19 extern const struct hash_ops catalog_hash_ops;
20