2013-07-18 09:54:21 +00:00
|
|
|
/*
|
|
|
|
* virsystemd.h: helpers for using systemd APIs
|
|
|
|
*
|
|
|
|
* Copyright (C) 2013 Red Hat, Inc.
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it 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.
|
|
|
|
*
|
|
|
|
* This library 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 this library. If not, see
|
|
|
|
* <http://www.gnu.org/licenses/>.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __VIR_SYSTEMD_H__
|
|
|
|
# define __VIR_SYSTEMD_H__
|
|
|
|
|
|
|
|
# include "internal.h"
|
|
|
|
|
2013-07-26 14:18:55 +00:00
|
|
|
char *virSystemdMakeScopeName(const char *name,
|
2016-02-01 15:50:54 +00:00
|
|
|
const char *drivername,
|
|
|
|
bool legacy_behaviour);
|
2013-07-26 14:18:55 +00:00
|
|
|
char *virSystemdMakeSliceName(const char *partition);
|
|
|
|
|
2016-02-01 15:50:54 +00:00
|
|
|
char *virSystemdMakeMachineName(const char *drivername,
|
|
|
|
int id,
|
|
|
|
const char *name,
|
2013-09-30 14:46:29 +00:00
|
|
|
bool privileged);
|
|
|
|
|
2013-07-18 09:54:21 +00:00
|
|
|
int virSystemdCreateMachine(const char *name,
|
|
|
|
const char *drivername,
|
|
|
|
const unsigned char *uuid,
|
|
|
|
const char *rootdir,
|
|
|
|
pid_t pidleader,
|
|
|
|
bool iscontainer,
|
2014-11-11 17:38:43 +00:00
|
|
|
size_t nnicindexes,
|
|
|
|
int *nicindexes,
|
2013-07-18 09:54:21 +00:00
|
|
|
const char *partition);
|
|
|
|
|
2016-02-01 15:50:54 +00:00
|
|
|
int virSystemdTerminateMachine(const char *name);
|
2013-09-30 14:46:29 +00:00
|
|
|
|
2014-02-21 12:06:42 +00:00
|
|
|
void virSystemdNotifyStartup(void);
|
|
|
|
|
2014-04-11 07:20:48 +00:00
|
|
|
int virSystemdCanSuspend(bool *result);
|
|
|
|
|
|
|
|
int virSystemdCanHibernate(bool *result);
|
|
|
|
|
|
|
|
int virSystemdCanHybridSleep(bool *result);
|
|
|
|
|
2016-02-02 18:45:55 +00:00
|
|
|
char *virSystemdGetMachineNameByPID(pid_t pid);
|
|
|
|
|
2013-07-18 09:54:21 +00:00
|
|
|
#endif /* __VIR_SYSTEMD_H__ */
|