qemu_hotplug.h 5.3 KB
Newer Older
1 2 3
/*
 * qemu_hotplug.h: QEMU device hotplug management
 *
4
 * Copyright (C) 2006-2007, 2009-2012 Red Hat, Inc.
5 6 7 8 9 10 11 12 13 14 15 16 17
 * Copyright (C) 2006 Daniel P. Berrange
 *
 * 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
18
 * License along with this library.  If not, see
O
Osier Yang 已提交
19
 * <http://www.gnu.org/licenses/>.
20 21 22 23 24 25 26 27
 *
 * Author: Daniel P. Berrange <berrange@redhat.com>
 */

#ifndef __QEMU_HOTPLUG_H__
# define __QEMU_HOTPLUG_H__

# include "qemu_conf.h"
28
# include "qemu_domain.h"
29 30 31 32 33 34
# include "domain_conf.h"

int qemuDomainChangeEjectableMedia(struct qemud_driver *driver,
                                   virDomainObjPtr vm,
                                   virDomainDiskDefPtr disk,
                                   bool force);
35
int qemuDomainCheckEjectableMedia(struct qemud_driver *driver,
36 37
                                  virDomainObjPtr vm,
                                  enum qemuDomainAsyncJob asyncJob);
38 39
int qemuDomainAttachPciDiskDevice(virConnectPtr conn,
                                  struct qemud_driver *driver,
40
                                  virDomainObjPtr vm,
41
                                  virDomainDiskDefPtr disk);
42 43
int qemuDomainAttachPciControllerDevice(struct qemud_driver *driver,
                                        virDomainObjPtr vm,
44
                                        virDomainControllerDefPtr controller);
45 46
int qemuDomainAttachSCSIDisk(virConnectPtr conn,
                             struct qemud_driver *driver,
47
                             virDomainObjPtr vm,
48
                             virDomainDiskDefPtr disk);
49 50
int qemuDomainAttachUsbMassstorageDevice(virConnectPtr conn,
                                         struct qemud_driver *driver,
51
                                         virDomainObjPtr vm,
52
                                         virDomainDiskDefPtr disk);
53 54 55
int qemuDomainAttachNetDevice(virConnectPtr conn,
                              struct qemud_driver *driver,
                              virDomainObjPtr vm,
56
                              virDomainNetDefPtr net);
57 58
int qemuDomainAttachHostPciDevice(struct qemud_driver *driver,
                                  virDomainObjPtr vm,
59
                                  virDomainHostdevDefPtr hostdev);
60 61
int qemuDomainAttachHostUsbDevice(struct qemud_driver *driver,
                                  virDomainObjPtr vm,
62
                                  virDomainHostdevDefPtr hostdev);
63 64 65
int qemuDomainAttachRedirdevDevice(struct qemud_driver *driver,
                                   virDomainObjPtr vm,
                                   virDomainRedirdevDefPtr hostdev);
66 67
int qemuDomainAttachHostDevice(struct qemud_driver *driver,
                               virDomainObjPtr vm,
68
                               virDomainHostdevDefPtr hostdev);
69 70 71
int qemuDomainChangeGraphics(struct qemud_driver *driver,
                             virDomainObjPtr vm,
                             virDomainGraphicsDefPtr dev);
72 73 74 75 76
int qemuDomainChangeGraphicsPasswords(struct qemud_driver *driver,
                                      virDomainObjPtr vm,
                                      int type,
                                      virDomainGraphicsAuthDefPtr auth,
                                      const char *defaultPasswd);
77 78 79
int qemuDomainChangeNet(struct qemud_driver *driver,
                        virDomainObjPtr vm,
                        virDomainPtr dom,
80
                        virDomainDeviceDefPtr dev);
81 82 83 84
int qemuDomainChangeNetLinkState(struct qemud_driver *driver,
                                 virDomainObjPtr vm,
                                 virDomainNetDefPtr dev,
                                 int linkstate);
85 86
int qemuDomainDetachPciDiskDevice(struct qemud_driver *driver,
                                  virDomainObjPtr vm,
87
                                  virDomainDeviceDefPtr dev);
88 89
int qemuDomainDetachDiskDevice(struct qemud_driver *driver,
                               virDomainObjPtr vm,
90
                               virDomainDeviceDefPtr dev);
91 92
int qemuDomainDetachPciControllerDevice(struct qemud_driver *driver,
                                        virDomainObjPtr vm,
93
                                        virDomainDeviceDefPtr dev);
94 95
int qemuDomainDetachNetDevice(struct qemud_driver *driver,
                              virDomainObjPtr vm,
96
                              virDomainDeviceDefPtr dev);
97 98
int qemuDomainDetachHostDevice(struct qemud_driver *driver,
                               virDomainObjPtr vm,
99
                               virDomainDeviceDefPtr dev);
100 101 102 103 104 105
int qemuDomainAttachLease(struct qemud_driver *driver,
                          virDomainObjPtr vm,
                          virDomainLeaseDefPtr lease);
int qemuDomainDetachLease(struct qemud_driver *driver,
                          virDomainObjPtr vm,
                          virDomainLeaseDefPtr lease);
106 107 108


#endif /* __QEMU_HOTPLUG_H__ */