1 module libvirt.qemu;
2 import libvirt.libvirt;
3 
4 extern(C):
5 
6 enum virDomainQemuMonitorCommandFlags
7 {
8     VIR_DOMAIN_QEMU_MONITOR_COMMAND_DEFAULT = 0,
9     VIR_DOMAIN_QEMU_MONITOR_COMMAND_HMP     = (1 << 0), /* cmd is in HMP */
10 }
11 
12 enum
13 {
14     VIR_DOMAIN_QEMU_MONITOR_COMMAND_DEFAULT = 0,
15     VIR_DOMAIN_QEMU_MONITOR_COMMAND_HMP     = (1 << 0), /* cmd is in HMP */
16 }
17 
18 int virDomainQemuMonitorCommand(virDomainPtr domain, const(char)*cmd, char **result, uint flags);
19 virDomainPtr virDomainQemuAttach(virConnectPtr domain, uint pid_value, uint flags);
20 
21 enum virDomainQemuAgentCommandTimeoutValues
22 {
23     VIR_DOMAIN_QEMU_AGENT_COMMAND_MIN = -2,
24     VIR_DOMAIN_QEMU_AGENT_COMMAND_BLOCK = -2,
25     VIR_DOMAIN_QEMU_AGENT_COMMAND_DEFAULT = -1,
26     VIR_DOMAIN_QEMU_AGENT_COMMAND_NOWAIT = 0,
27     VIR_DOMAIN_QEMU_AGENT_COMMAND_SHUTDOWN = 60,
28 }
29 
30 enum
31 {
32     VIR_DOMAIN_QEMU_AGENT_COMMAND_MIN = -2,
33     VIR_DOMAIN_QEMU_AGENT_COMMAND_BLOCK = -2,
34     VIR_DOMAIN_QEMU_AGENT_COMMAND_DEFAULT = -1,
35     VIR_DOMAIN_QEMU_AGENT_COMMAND_NOWAIT = 0,
36     VIR_DOMAIN_QEMU_AGENT_COMMAND_SHUTDOWN = 60,
37 }
38 char *virDomainQemuAgentCommand(virDomainPtr domain, const(char)*cmd, int timeout, uint flags);
39 
40 alias virConnectDomainQemuMonitorEventCallback = void function(virConnectPtr conn,
41                                                          virDomainPtr dom,
42                                                          const(char)*event,
43                                                          long seconds,
44                                                          uint micros,
45                                                          const(char)*details,
46                                                          void *opaque);
47 
48 
49 enum virConnectDomainQemuMonitorEventRegisterFlags
50 {
51     /* Event filter is a regex rather than a literal string */
52     VIR_CONNECT_DOMAIN_QEMU_MONITOR_EVENT_REGISTER_REGEX = (1 << 0),
53 
54     /* Event filter is case insensitive */
55     VIR_CONNECT_DOMAIN_QEMU_MONITOR_EVENT_REGISTER_NOCASE = (1 << 1),
56 }
57 
58 enum {
59     /* Event filter is a regex rather than a literal string */
60     VIR_CONNECT_DOMAIN_QEMU_MONITOR_EVENT_REGISTER_REGEX = (1 << 0),
61 
62     /* Event filter is case insensitive */
63     VIR_CONNECT_DOMAIN_QEMU_MONITOR_EVENT_REGISTER_NOCASE = (1 << 1),
64 }
65 
66 
67 int virConnectDomainQemuMonitorEventRegister(virConnectPtr conn,
68                                              virDomainPtr dom,
69                                              const(char)*event,
70                                              virConnectDomainQemuMonitorEventCallback cb,
71                                              void *opaque,
72                                              virFreeCallback freecb,
73                                              uint flags);
74 
75 int virConnectDomainQemuMonitorEventDeregister(virConnectPtr conn, int callbackID);
76 
77