]>
Commit | Line | Data |
---|---|---|
db9ecf05 | 1 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ |
61d0578b LP |
2 | #pragma once |
3 | ||
4 | #include <sys/types.h> | |
5 | ||
6 | #include "sd-bus.h" | |
7 | #include "sd-event.h" | |
8 | ||
9 | #include "list.h" | |
10 | ||
11 | typedef struct Operation Operation; | |
12 | ||
13 | #include "portabled.h" | |
14 | ||
15 | #define OPERATIONS_MAX 64 | |
16 | ||
17 | struct Operation { | |
18 | Manager *manager; | |
19 | pid_t pid; | |
20 | sd_bus_message *message; | |
21 | int errno_fd; | |
22 | int extra_fd; | |
23 | sd_event_source *event_source; | |
24 | int (*done)(Operation *o, int ret, sd_bus_error *error); | |
25 | LIST_FIELDS(Operation, operations); | |
26 | }; | |
27 | ||
28 | int operation_new(Manager *manager, pid_t child, sd_bus_message *message, int errno_fd, Operation **ret); | |
29 | Operation *operation_free(Operation *o); |