| 1 |
/* SPDX-License-Identifier: LGPL-2.1-or-later */ |
| 2 |
#pragma once |
| 3 |
|
| 4 |
#include "list.h" |
| 5 |
#include "pidref.h" |
| 6 |
#include "portabled-forward.h" |
| 7 |
|
| 8 |
#define OPERATIONS_MAX 64 |
| 9 |
|
| 10 |
typedef struct Operation { |
| 11 |
Manager *manager; |
| 12 |
PidRef pidref; |
| 13 |
sd_bus_message *message; |
| 14 |
int errno_fd; |
| 15 |
int extra_fd; |
| 16 |
sd_event_source *event_source; |
| 17 |
int (*done)(Operation *o, int ret, sd_bus_error *error); |
| 18 |
LIST_FIELDS(Operation, operations); |
| 19 |
} Operation; |
| 20 |
|
| 21 |
int operation_new(Manager *manager, PidRef *child, sd_bus_message *message, int errno_fd, Operation **ret); |
| 22 |
Operation *operation_free(Operation *o); |