]> git.ipfire.org Git - pakfire.git/blob - src/libpakfire/include/pakfire/buildservice.h
buildservice: Implement listing repositories
[pakfire.git] / src / libpakfire / include / pakfire / buildservice.h
1 /*#############################################################################
2 # #
3 # Pakfire - The IPFire package management system #
4 # Copyright (C) 2023 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_BUILDSERVICE_H
22 #define PAKFIRE_BUILDSERVICE_H
23
24 struct pakfire_buildservice;
25
26 #include <json.h>
27
28 #include <pakfire/ctx.h>
29
30 int pakfire_buildservice_create(struct pakfire_buildservice** service, struct pakfire_ctx* ctx);
31
32 struct pakfire_buildservice* pakfire_buildservice_ref(struct pakfire_buildservice* service);
33 struct pakfire_buildservice* pakfire_buildservice_unref(struct pakfire_buildservice* service);
34
35 // Builds
36
37 typedef enum pakfire_buildservice_build_flags {
38 PAKFIRE_BUILD_DISABLE_TESTS = (1 << 0),
39 } pakfire_buildservice_build_flags_t;
40
41 int pakfire_buildservice_build(struct pakfire_buildservice* service, const char* upload,
42 const char* repo, const char** arches, int flags);
43
44 // Uploads
45
46 int pakfire_buildservice_upload(struct pakfire_buildservice* service,
47 const char* path, const char* filename, char** uuid);
48 int pakfire_buildservice_list_uploads(
49 struct pakfire_buildservice* service, struct json_object** uploads);
50 int pakfire_buildservice_delete_upload(
51 struct pakfire_buildservice* service, const char* uuid);
52
53 // Repositories
54
55 int pakfire_buildservice_list_repos(struct pakfire_buildservice* service,
56 const char* distro, struct json_object** repos);
57
58 #endif /* PAKFIRE_BUILDSERVICE_H */