libvirt/src/qemu/qemu_dbus.h
Marc-André Lureau 2b0251af68 qemu: add dbus-vmstate
Add dbusVMStates to keep a list of dbus-vmstate objects needed for
migration. They are populated on the command line during start or
qemuDBusVMStateAdd/Remove() will hotplug them as needed.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2019-09-06 12:47:47 +02:00

43 lines
1.4 KiB
C

/*
* qemu_dbus.h: QEMU DBus-related helpers
*
* 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/>.
*/
#pragma once
#include "qemu_conf.h"
#include "qemu_domain.h"
typedef struct _qemuDBusVMState qemuDBusVMState;
typedef qemuDBusVMState *qemuDBusVMStatePtr;
struct _qemuDBusVMState {
char *id;
char *addr;
};
qemuDBusVMStatePtr qemuDBusVMStateNew(const char *id, const char *addr);
void qemuDBusVMStateFree(qemuDBusVMStatePtr self);
int qemuDBusVMStateAdd(virQEMUDriverPtr driver, virDomainObjPtr vm,
const char *id, const char *addr, bool hot);
void qemuDBusVMStateRemove(virQEMUDriverPtr driver, virDomainObjPtr vm,
const char *id, bool hot);
VIR_DEFINE_AUTOPTR_FUNC(qemuDBusVMState, qemuDBusVMStateFree);