]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/machine/operation.h
tree-wide: drop license boilerplate
[thirdparty/systemd.git] / src / machine / operation.h
1 /* SPDX-License-Identifier: LGPL-2.1+ */
2 #pragma once
3
4 /***
5 This file is part of systemd.
6
7 Copyright 2016 Lennart Poettering
8 ***/
9
10 #include <sys/types.h>
11
12 #include "sd-bus.h"
13 #include "sd-event.h"
14
15 #include "list.h"
16
17 typedef struct Operation Operation;
18
19 #include "machined.h"
20
21 #define OPERATIONS_MAX 64
22
23 struct Operation {
24 Manager *manager;
25 Machine *machine;
26 pid_t pid;
27 sd_bus_message *message;
28 int errno_fd;
29 int extra_fd;
30 sd_event_source *event_source;
31 int (*done)(Operation *o, int ret, sd_bus_error *error);
32 LIST_FIELDS(Operation, operations);
33 LIST_FIELDS(Operation, operations_by_machine);
34 };
35
36 int operation_new(Manager *manager, Machine *machine, pid_t child, sd_bus_message *message, int errno_fd, Operation **ret);
37 Operation *operation_free(Operation *o);