]> git.ipfire.org Git - pakfire.git/blob - src/libpakfire/include/pakfire/pool.h
Import libpakfire
[pakfire.git] / src / libpakfire / include / pakfire / pool.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_POOL_H
22 #define PAKFIRE_POOL_H
23
24 #include <solv/pool.h>
25
26 #include <pakfire/types.h>
27
28 PakfirePool pakfire_pool_create(const char* arch);
29 void pakfire_pool_free(PakfirePool pool);
30
31 int pakfire_pool_version_compare(PakfirePool pool, const char* evr1, const char* evr2);
32 int pakfire_pool_count(PakfirePool pool);
33
34 PakfireRepo pakfire_pool_get_installed_repo(PakfirePool pool);
35 void pakfire_pool_set_installed_repo(PakfirePool pool, PakfireRepo repo);
36
37 const char** pakfire_pool_get_installonly(PakfirePool pool);
38 void pakfire_pool_set_installonly(PakfirePool pool, const char** installonly);
39
40 const char* pakfire_pool_get_cache_path(PakfirePool pool);
41 void pakfire_pool_set_cache_path(PakfirePool pool, const char* path);
42 PakfireCache pakfire_pool_get_cache(PakfirePool pool);
43
44 PakfirePackageList pakfire_pool_whatprovides(PakfirePool pool, const char* provides, int flags);
45 PakfirePackageList pakfire_pool_search(PakfirePool pool, const char* what, int flags);
46
47 #ifdef PAKFIRE_PRIVATE
48
49 struct _PakfirePool {
50 Pool* pool;
51 int provides_ready;
52 Queue installonly;
53
54 PakfireCache cache;
55 };
56
57 void pakfire_pool_make_provides_ready(PakfirePool pool);
58 char* pakfire_pool_tmpdup(Pool* pool, const char* s);
59
60 #endif
61
62 #endif /* PAKFIRE_POOL_H */