]>
Commit | Line | Data |
---|---|---|
931d97a0 MT |
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 | ||
57a8b2d4 MT |
26 | #include <json.h> |
27 | ||
931d97a0 MT |
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 | ||
04cc2479 MT |
35 | const char* pakfire_buildservice_get_url(struct pakfire_buildservice* service); |
36 | ||
27629aaf MT |
37 | // Builds |
38 | ||
39 | typedef enum pakfire_buildservice_build_flags { | |
40 | PAKFIRE_BUILD_DISABLE_TESTS = (1 << 0), | |
41 | } pakfire_buildservice_build_flags_t; | |
42 | ||
43 | int pakfire_buildservice_build(struct pakfire_buildservice* service, const char* upload, | |
44 | const char* repo, const char** arches, int flags); | |
45 | ||
57a8b2d4 MT |
46 | // Uploads |
47 | ||
01840335 | 48 | int pakfire_buildservice_upload(struct pakfire_buildservice* service, |
81adcd5c | 49 | const char* path, const char* filename, char** uuid); |
57a8b2d4 MT |
50 | int pakfire_buildservice_list_uploads( |
51 | struct pakfire_buildservice* service, struct json_object** uploads); | |
c0b6198a MT |
52 | int pakfire_buildservice_delete_upload( |
53 | struct pakfire_buildservice* service, const char* uuid); | |
57a8b2d4 | 54 | |
d554dcde MT |
55 | // Repositories |
56 | ||
57 | int pakfire_buildservice_list_repos(struct pakfire_buildservice* service, | |
58 | const char* distro, struct json_object** repos); | |
9aa3397d MT |
59 | int pakfire_buildservice_get_repo(struct pakfire_buildservice* service, |
60 | const char* distro, const char* name, struct json_object** repo); | |
110ab7da MT |
61 | int pakfire_buildservice_create_repo(struct pakfire_buildservice* service, |
62 | const char* distro, const char* name, const char* description, struct json_object** repo); | |
0948a9b6 MT |
63 | int pakfire_buildservice_delete_repo(struct pakfire_buildservice* service, |
64 | const char* distro, const char* name); | |
d554dcde | 65 | |
d39f3da5 MT |
66 | // Stats |
67 | ||
68 | int pakfire_buildservice_submit_stats(struct pakfire_buildservice* service); | |
69 | ||
36835ffc MT |
70 | // Jobs |
71 | ||
72 | int pakfire_buildservice_job_finished(struct pakfire_buildservice* service, | |
73 | const char* uuid, int success, const char* logfile, const char** packages); | |
74 | ||
931d97a0 | 75 | #endif /* PAKFIRE_BUILDSERVICE_H */ |