machine.h revision c335068380fe8c9d843cdb2cf8a00f822cfabed3
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
#pragma once
/***
This file is part of systemd.
Copyright 2013 Lennart Poettering
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
systemd is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include "list.h"
#include "util.h"
#include "machined.h"
typedef enum MachineState {
MACHINE_OPENING, /* Machine is being registered */
MACHINE_RUNNING, /* Machine is running */
MACHINE_CLOSING, /* Machine is terminating */
} MachineState;
typedef enum MachineClass {
} MachineClass;
enum KillWho {
_KILL_WHO_INVALID = -1
};
struct Machine {
char *name;
char *state_file;
char *service;
char *root_directory;
char *scope;
char *scope_job;
bool in_gc_queue:1;
bool started:1;
};
void machine_free(Machine *m);
void machine_add_to_gc_queue(Machine *m);
int machine_stop(Machine *m);
int machine_save(Machine *m);
int machine_load(Machine *m);
extern const sd_bus_vtable machine_vtable[];
char *machine_bus_path(Machine *s);
int machine_object_find(sd_bus *bus, const char *path, const char *interface, void **found, void *userdata);