]>
git.ipfire.org Git - pakfire.git/blob - src/libpakfire/include/pakfire/repo.h
baf985205da75c4713a82348c17ff79eb86a6590
1 /*#############################################################################
3 # Pakfire - The IPFire package management system #
4 # Copyright (C) 2013 Pakfire development team #
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. #
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. #
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/>. #
19 #############################################################################*/
21 #ifndef PAKFIRE_REPO_H
22 #define PAKFIRE_REPO_H
24 #include <pakfire/types.h>
26 PakfireRepo
pakfire_repo_create(Pakfire pakfire
, const char* name
);
28 PakfireRepo
pakfire_repo_ref(PakfireRepo repo
);
29 PakfireRepo
pakfire_repo_unref(PakfireRepo repo
);
31 PakfirePool
pakfire_repo_get_pool(PakfireRepo repo
);
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
);
37 void pakfire_repo_internalize(PakfireRepo repo
);
39 const char* pakfire_repo_get_name(PakfireRepo repo
);
40 void pakfire_repo_set_name(PakfireRepo repo
, const char* name
);
42 int pakfire_repo_get_enabled(PakfireRepo repo
);
43 void pakfire_repo_set_enabled(PakfireRepo repo
, int enabled
);
45 int pakfire_repo_get_priority(PakfireRepo repo
);
46 void pakfire_repo_set_priority(PakfireRepo repo
, int priority
);
48 int pakfire_repo_is_installed_repo(PakfireRepo repo
);
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
);
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
);
56 PakfireRepoCache
pakfire_repo_get_cache(PakfireRepo repo
);
58 int pakfire_repo_clean(PakfireRepo repo
);
60 #ifdef PAKFIRE_PRIVATE
62 #include <solv/repo.h>
64 PakfireRepo
pakfire_repo_create_from_repo(Pakfire pakfire
, Repo
* r
);
66 PakfirePackage
pakfire_repo_add_package(PakfireRepo repo
);
68 Repo
* pakfire_repo_get_repo(PakfireRepo repo
);
69 Repodata
* pakfire_repo_get_repodata(PakfireRepo repo
);
73 #endif /* PAKFIRE_REPO_H */