summaryrefslogtreecommitdiff
path: root/src/machine/machine.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-02-17 19:22:03 +0100
committerLennart Poettering <lennart@poettering.net>2015-02-17 19:22:36 +0100
commit0370612e0522191f929e3feb7d4937fff3d421e2 (patch)
treed991bb0f0039c499229da7b48f8e232b8fceec7b /src/machine/machine.h
parentc7abe32be167ded048a5bb8a912faf2e745b20cb (diff)
machined: make "machinectl copy-to" and "machinectl copy-from" server side operations
This way, any bus client can make use of these calls.
Diffstat (limited to 'src/machine/machine.h')
-rw-r--r--src/machine/machine.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/machine/machine.h b/src/machine/machine.h
index 4827ba332f..94dbac0160 100644
--- a/src/machine/machine.h
+++ b/src/machine/machine.h
@@ -22,6 +22,7 @@
***/
typedef struct Machine Machine;
+typedef struct MachineOperation MachineOperation;
typedef enum KillWho KillWho;
#include "list.h"
@@ -50,6 +51,17 @@ enum KillWho {
_KILL_WHO_INVALID = -1
};
+#define MACHINE_OPERATIONS_MAX 64
+
+struct MachineOperation {
+ Machine *machine;
+ pid_t pid;
+ sd_bus_message *message;
+ int errno_fd;
+ sd_event_source *event_source;
+ LIST_FIELDS(MachineOperation, operations);
+};
+
struct Machine {
Manager *manager;
@@ -79,6 +91,9 @@ struct Machine {
unsigned n_netif;
LIST_FIELDS(Machine, gc_queue);
+
+ MachineOperation *operations;
+ unsigned n_operations;
};
Machine* machine_new(Manager *manager, const char *name);
@@ -93,6 +108,8 @@ int machine_kill(Machine *m, KillWho who, int signo);
MachineState machine_get_state(Machine *u);
+MachineOperation *machine_operation_unref(MachineOperation *o);
+
const char* machine_class_to_string(MachineClass t) _const_;
MachineClass machine_class_from_string(const char *s) _pure_;