]> git.ipfire.org Git - pakfire.git/blob - src/libpakfire/include/pakfire/repo.h
baf985205da75c4713a82348c17ff79eb86a6590
[pakfire.git] / src / libpakfire / include / pakfire / repo.h
1 /*#############################################################################
2 # #
3 # Pakfire - The IPFire package management system #
4 # Copyright (C) 2013 Pakfire development team #
5 # #
6 # This program is free software: you can redistribute it and/or modify #
7 # it under the terms of the GNU General Public License as published by #
8 # the Free Software Foundation, either version 3 of the License, or #
9 # (at your option) any later version. #
10 # #
11 # This program is distributed in the hope that it will be useful, #
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of #
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
14 # GNU General Public License for more details. #
15 # #
16 # You should have received a copy of the GNU General Public License #
17 # along with this program. If not, see <http://www.gnu.org/licenses/>. #
18 # #
19 #############################################################################*/
20
21 #ifndef PAKFIRE_REPO_H
22 #define PAKFIRE_REPO_H
23
24 #include <pakfire/types.h>
25
26 PakfireRepo pakfire_repo_create(Pakfire pakfire, const char* name);
27
28 PakfireRepo pakfire_repo_ref(PakfireRepo repo);
29 PakfireRepo pakfire_repo_unref(PakfireRepo repo);
30
31 PakfirePool pakfire_repo_get_pool(PakfireRepo repo);
32
33 int pakfire_repo_identical(PakfireRepo repo1, PakfireRepo repo2);
34 int pakfire_repo_cmp(PakfireRepo repo1, PakfireRepo repo2);
35 int pakfire_repo_count(PakfireRepo repo);
36
37 void pakfire_repo_internalize(PakfireRepo repo);
38
39 const char* pakfire_repo_get_name(PakfireRepo repo);
40 void pakfire_repo_set_name(PakfireRepo repo, const char* name);
41
42 int pakfire_repo_get_enabled(PakfireRepo repo);
43 void pakfire_repo_set_enabled(PakfireRepo repo, int enabled);
44
45 int pakfire_repo_get_priority(PakfireRepo repo);
46 void pakfire_repo_set_priority(PakfireRepo repo, int priority);
47
48 int pakfire_repo_is_installed_repo(PakfireRepo repo);
49
50 int pakfire_repo_read_solv(PakfireRepo repo, const char* filename, int flags);
51 int pakfire_repo_read_solv_fp(PakfireRepo repo, FILE *f, int flags);
52
53 int pakfire_repo_write_solv(PakfireRepo repo, const char* filename, int flags);
54 int pakfire_repo_write_solv_fp(PakfireRepo repo, FILE *f, int flags);
55
56 PakfireRepoCache pakfire_repo_get_cache(PakfireRepo repo);
57
58 int pakfire_repo_clean(PakfireRepo repo);
59
60 #ifdef PAKFIRE_PRIVATE
61
62 #include <solv/repo.h>
63
64 PakfireRepo pakfire_repo_create_from_repo(Pakfire pakfire, Repo* r);
65
66 PakfirePackage pakfire_repo_add_package(PakfireRepo repo);
67
68 Repo* pakfire_repo_get_repo(PakfireRepo repo);
69 Repodata* pakfire_repo_get_repodata(PakfireRepo repo);
70
71 #endif
72
73 #endif /* PAKFIRE_REPO_H */