qemu_monitor_json.h 23.0 KB
Newer Older
D
Daniel P. Berrange 已提交
1 2 3
/*
 * qemu_monitor_json.h: interaction with QEMU monitor console
 *
4
 * Copyright (C) 2006-2009, 2011-2015 Red Hat, Inc.
D
Daniel P. Berrange 已提交
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/>.
D
Daniel P. Berrange 已提交
20 21 22 23 24 25
 *
 * Author: Daniel P. Berrange <berrange@redhat.com>
 */


#ifndef QEMU_MONITOR_JSON_H
26
# define QEMU_MONITOR_JSON_H
D
Daniel P. Berrange 已提交
27

28
# include "internal.h"
D
Daniel P. Berrange 已提交
29

30
# include "qemu_monitor.h"
31
# include "virbitmap.h"
32
# include "cpu/cpu.h"
A
Andrea Bolognani 已提交
33
# include "util/virgic.h"
D
Daniel P. Berrange 已提交
34

35 36 37 38
int qemuMonitorJSONTransactionAdd(virJSONValuePtr actions,
                                  const char *cmdname,
                                  ...);

39 40 41 42
int qemuMonitorJSONIOProcessLine(qemuMonitorPtr mon,
                                 const char *line,
                                 qemuMonitorMessagePtr msg);

D
Daniel P. Berrange 已提交
43 44 45 46 47
int qemuMonitorJSONIOProcess(qemuMonitorPtr mon,
                             const char *data,
                             size_t len,
                             qemuMonitorMessagePtr msg);

48 49 50 51 52
int qemuMonitorJSONHumanCommandWithFd(qemuMonitorPtr mon,
                                      const char *cmd,
                                      int scm_fd,
                                      char **reply);

53 54
int qemuMonitorJSONSetCapabilities(qemuMonitorPtr mon);

55
int qemuMonitorJSONStartCPUs(qemuMonitorPtr mon);
D
Daniel P. Berrange 已提交
56
int qemuMonitorJSONStopCPUs(qemuMonitorPtr mon);
57 58 59
int qemuMonitorJSONGetStatus(qemuMonitorPtr mon,
                             bool *running,
                             virDomainPausedReason *reason);
D
Daniel P. Berrange 已提交
60 61

int qemuMonitorJSONSystemPowerdown(qemuMonitorPtr mon);
62
int qemuMonitorJSONSystemReset(qemuMonitorPtr mon);
D
Daniel P. Berrange 已提交
63

64
int qemuMonitorJSONQueryCPUs(qemuMonitorPtr mon,
65
                             struct qemuMonitorQueryCpusEntry **entries,
66
                             size_t *nentries,
67 68
                             bool force,
                             bool fast);
69
int qemuMonitorJSONGetVirtType(qemuMonitorPtr mon,
70
                               virDomainVirtType *virtType);
71 72 73
int qemuMonitorJSONUpdateVideoMemorySize(qemuMonitorPtr mon,
                                         virDomainVideoDefPtr video,
                                         char *path);
74 75 76
int qemuMonitorJSONUpdateVideoVram64Size(qemuMonitorPtr mon,
                                         virDomainVideoDefPtr video,
                                         char *path);
D
Daniel P. Berrange 已提交
77
int qemuMonitorJSONGetBalloonInfo(qemuMonitorPtr mon,
78
                                  unsigned long long *currmem);
79
int qemuMonitorJSONGetMemoryStats(qemuMonitorPtr mon,
80
                                  char *balloonpath,
81 82
                                  virDomainMemoryStatPtr stats,
                                  unsigned int nr_stats);
83 84 85
int qemuMonitorJSONSetMemoryStatsPeriod(qemuMonitorPtr mon,
                                        char *balloonpath,
                                        int period);
86
int qemuMonitorJSONGetBlockInfo(qemuMonitorPtr mon,
87
                                virHashTablePtr table);
88

89
virJSONValuePtr qemuMonitorJSONQueryBlockstats(qemuMonitorPtr mon);
90
int qemuMonitorJSONGetAllBlockStatsInfo(qemuMonitorPtr mon,
91
                                        virHashTablePtr hash,
92
                                        bool backingChain);
93
int qemuMonitorJSONBlockStatsUpdateCapacity(qemuMonitorPtr mon,
94 95
                                            virHashTablePtr stats,
                                            bool backingChain);
96 97 98
int qemuMonitorJSONBlockResize(qemuMonitorPtr mon,
                               const char *devce,
                               unsigned long long size);
D
Daniel P. Berrange 已提交
99 100 101

int qemuMonitorJSONSetVNCPassword(qemuMonitorPtr mon,
                                  const char *password);
102 103 104 105 106 107 108
int qemuMonitorJSONSetPassword(qemuMonitorPtr mon,
                               const char *protocol,
                               const char *password,
                               const char *action_if_connected);
int qemuMonitorJSONExpirePassword(qemuMonitorPtr mon,
                                  const char *protocol,
                                  const char *expire_time);
D
Daniel P. Berrange 已提交
109
int qemuMonitorJSONSetBalloon(qemuMonitorPtr mon,
110
                              unsigned long long newmem);
111
int qemuMonitorJSONSetCPU(qemuMonitorPtr mon, int cpu, bool online);
D
Daniel P. Berrange 已提交
112 113

int qemuMonitorJSONEjectMedia(qemuMonitorPtr mon,
114
                              const char *dev_name,
115
                              bool force);
D
Daniel P. Berrange 已提交
116
int qemuMonitorJSONChangeMedia(qemuMonitorPtr mon,
117
                               const char *dev_name,
D
Daniel P. Berrange 已提交
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133
                               const char *newmedia,
                               const char *format);


int qemuMonitorJSONSaveVirtualMemory(qemuMonitorPtr mon,
                                     unsigned long long offset,
                                     size_t length,
                                     const char *path);
int qemuMonitorJSONSavePhysicalMemory(qemuMonitorPtr mon,
                                      unsigned long long offset,
                                      size_t length,
                                      const char *path);

int qemuMonitorJSONSetMigrationSpeed(qemuMonitorPtr mon,
                                     unsigned long bandwidth);

134 135 136
int qemuMonitorJSONSetMigrationDowntime(qemuMonitorPtr mon,
                                        unsigned long long downtime);

137 138 139 140 141
int qemuMonitorJSONGetMigrationCacheSize(qemuMonitorPtr mon,
                                         unsigned long long *cacheSize);
int qemuMonitorJSONSetMigrationCacheSize(qemuMonitorPtr mon,
                                         unsigned long long cacheSize);

142
int qemuMonitorJSONGetMigrationParams(qemuMonitorPtr mon,
143
                                      virJSONValuePtr *params);
144
int qemuMonitorJSONSetMigrationParams(qemuMonitorPtr mon,
145
                                      virJSONValuePtr params);
146

147
int qemuMonitorJSONGetMigrationStats(qemuMonitorPtr mon,
148 149
                                     qemuMonitorMigrationStatsPtr stats,
                                     char **error);
D
Daniel P. Berrange 已提交
150

151 152
int qemuMonitorJSONGetMigrationCapabilities(qemuMonitorPtr mon,
                                            char ***capabilities);
153
int qemuMonitorJSONSetMigrationCapabilities(qemuMonitorPtr mon,
154
                                            virJSONValuePtr caps);
155

A
Andrea Bolognani 已提交
156 157 158
int qemuMonitorJSONGetGICCapabilities(qemuMonitorPtr mon,
                                      virGICCapability **capabilities);

159 160 161
int qemuMonitorJSONGetSEVCapabilities(qemuMonitorPtr mon,
                                      virSEVCapability **capabilities);

162 163 164
int qemuMonitorJSONMigrate(qemuMonitorPtr mon,
                           unsigned int flags,
                           const char *uri);
165 166 167
int qemuMonitorJSONGetSpiceMigrationStatus(qemuMonitorPtr mon,
                                           bool *spice_migrated);

D
Daniel P. Berrange 已提交
168 169 170

int qemuMonitorJSONMigrateCancel(qemuMonitorPtr mon);

171 172 173
int qemuMonitorJSONQueryDump(qemuMonitorPtr mon,
                             qemuMonitorDumpStatsPtr stats);

174 175 176
int qemuMonitorJSONGetDumpGuestMemoryCapability(qemuMonitorPtr mon,
                                                const char *capability);

177
int qemuMonitorJSONDump(qemuMonitorPtr mon,
178
                        const char *protocol,
179 180
                        const char *dumpformat,
                        bool detach);
181

182 183 184 185 186 187 188
int qemuMonitorJSONGraphicsRelocate(qemuMonitorPtr mon,
                                    int type,
                                    const char *hostname,
                                    int port,
                                    int tlsPort,
                                    const char *tlsSubject);

D
Daniel P. Berrange 已提交
189
int qemuMonitorJSONAddPCIHostDevice(qemuMonitorPtr mon,
190 191
                                    virPCIDeviceAddress *hostAddr,
                                    virPCIDeviceAddress *guestAddr);
D
Daniel P. Berrange 已提交
192 193 194 195

int qemuMonitorJSONAddPCIDisk(qemuMonitorPtr mon,
                              const char *path,
                              const char *bus,
196
                              virPCIDeviceAddress *guestAddr);
D
Daniel P. Berrange 已提交
197 198 199

int qemuMonitorJSONAddPCINetwork(qemuMonitorPtr mon,
                                 const char *nicstr,
200
                                 virPCIDeviceAddress *guestAddr);
D
Daniel P. Berrange 已提交
201 202

int qemuMonitorJSONRemovePCIDevice(qemuMonitorPtr mon,
203
                                   virPCIDeviceAddress *guestAddr);
D
Daniel P. Berrange 已提交
204 205 206 207

int qemuMonitorJSONSendFileHandle(qemuMonitorPtr mon,
                                  const char *fdname,
                                  int fd);
208 209
int qemuMonitorJSONAddFd(qemuMonitorPtr mon, int fdset, int fd,
                         const char *name);
D
Daniel P. Berrange 已提交
210 211 212

int qemuMonitorJSONCloseFileHandle(qemuMonitorPtr mon,
                                   const char *fdname);
213
int qemuMonitorJSONRemoveFd(qemuMonitorPtr mon, int fdset, int fd);
D
Daniel P. Berrange 已提交
214

215 216 217 218 219 220
int qemuMonitorJSONAddNetdev(qemuMonitorPtr mon,
                             const char *netdevstr);

int qemuMonitorJSONRemoveNetdev(qemuMonitorPtr mon,
                                const char *alias);

221 222 223
int qemuMonitorJSONQueryRxFilter(qemuMonitorPtr mon, const char *alias,
                                 virNetDevRxFilterPtr *filter);

224 225
int qemuMonitorJSONGetChardevInfo(qemuMonitorPtr mon,
                                  virHashTablePtr info);
226

227 228
int qemuMonitorJSONAttachPCIDiskController(qemuMonitorPtr mon,
                                           const char *bus,
229
                                           virPCIDeviceAddress *guestAddr);
230

231 232
int qemuMonitorJSONAddDeviceArgs(qemuMonitorPtr mon,
                                 virJSONValuePtr args);
233 234 235
int qemuMonitorJSONAddDevice(qemuMonitorPtr mon,
                             const char *devicestr);

236
int qemuMonitorJSONDelDevice(qemuMonitorPtr mon,
237
                             const char *devalias);
238

239 240 241 242 243 244
int qemuMonitorJSONAddObject(qemuMonitorPtr mon,
                             virJSONValuePtr props);

int qemuMonitorJSONDelObject(qemuMonitorPtr mon,
                             const char *objalias);

245
int qemuMonitorJSONTransaction(qemuMonitorPtr mon, virJSONValuePtr *actions)
246 247 248 249 250 251
    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
int qemuMonitorJSONDriveMirror(qemuMonitorPtr mon,
                               const char *device,
                               const char *file,
                               const char *format,
                               unsigned long long speed,
252 253
                               unsigned int granularity,
                               unsigned long long buf_size,
254 255
                               unsigned int flags)
    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3);
256 257 258 259 260 261 262 263 264
int qemuMonitorJSONBlockdevMirror(qemuMonitorPtr mon,
                                  const char *jobname,
                                  const char *device,
                                  const char *target,
                                  unsigned long long speed,
                                  unsigned int granularity,
                                  unsigned long long buf_size,
                                  unsigned int flags)
    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3) ATTRIBUTE_NONNULL(4);
265
int qemuMonitorJSONDrivePivot(qemuMonitorPtr mon,
266
                              const char *device)
267
    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
268

269 270 271 272
int qemuMonitorJSONBlockCommit(qemuMonitorPtr mon,
                               const char *device,
                               const char *top,
                               const char *base,
273
                               const char *backingName,
274
                               unsigned long long bandwidth)
275
    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
276

277 278 279 280 281 282 283
char *qemuMonitorJSONDiskNameLookup(qemuMonitorPtr mon,
                                    const char *device,
                                    virStorageSourcePtr top,
                                    virStorageSourcePtr target)
    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
    ATTRIBUTE_NONNULL(4);

284 285
int qemuMonitorJSONArbitraryCommand(qemuMonitorPtr mon,
                                    const char *cmd_str,
286 287
                                    char **reply_str,
                                    bool hmp);
288

289
int qemuMonitorJSONInjectNMI(qemuMonitorPtr mon);
290

291 292 293 294 295
int qemuMonitorJSONSendKey(qemuMonitorPtr mon,
                           unsigned int holdtime,
                           unsigned int *keycodes,
                           unsigned int nkeycodes);

296
int qemuMonitorJSONScreendump(qemuMonitorPtr mon,
297 298
                              const char *device,
                              unsigned int head,
299 300
                              const char *file);

301 302 303 304
int qemuMonitorJSONBlockStream(qemuMonitorPtr mon,
                               const char *device,
                               const char *base,
                               const char *backingName,
305
                               unsigned long long speed)
306
    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
307

308
int qemuMonitorJSONBlockJobCancel(qemuMonitorPtr mon,
309
                                  const char *device)
310 311
    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);

312 313
int qemuMonitorJSONBlockJobSetSpeed(qemuMonitorPtr mon,
                                    const char *device,
314
                                    unsigned long long speed)
315 316
    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);

317 318
virHashTablePtr qemuMonitorJSONGetAllBlockJobInfo(qemuMonitorPtr mon)
    ATTRIBUTE_NONNULL(1);
319

320 321
int qemuMonitorJSONSetLink(qemuMonitorPtr mon,
                           const char *name,
322
                           virDomainNetInterfaceLinkState state);
323

324 325 326 327 328
int qemuMonitorJSONOpenGraphics(qemuMonitorPtr mon,
                                const char *protocol,
                                const char *fdname,
                                bool skipauth);

329 330
int qemuMonitorJSONSetBlockIoThrottle(qemuMonitorPtr mon,
                                      const char *device,
331
                                      virDomainBlockIoTuneInfoPtr info,
332
                                      bool supportMaxOptions,
333
                                      bool supportGroupNameOption,
334
                                      bool supportMaxLengthOptions);
335 336 337

int qemuMonitorJSONGetBlockIoThrottle(qemuMonitorPtr mon,
                                      const char *device,
338
                                      virDomainBlockIoTuneInfoPtr reply);
339

340 341
int qemuMonitorJSONSystemWakeup(qemuMonitorPtr mon);

342 343
char *qemuMonitorJSONGetSEVMeasurement(qemuMonitorPtr mon);

344 345 346 347 348 349 350
int qemuMonitorJSONGetVersion(qemuMonitorPtr mon,
                              int *major,
                              int *minor,
                              int *micro,
                              char **package)
    ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3) ATTRIBUTE_NONNULL(4);

351 352 353 354
int qemuMonitorJSONGetMachines(qemuMonitorPtr mon,
                               qemuMonitorMachineInfoPtr **machines)
    ATTRIBUTE_NONNULL(2);

355
int qemuMonitorJSONGetCPUDefinitions(qemuMonitorPtr mon,
356
                                     qemuMonitorCPUDefInfoPtr **cpus)
357 358
    ATTRIBUTE_NONNULL(2);

359
int qemuMonitorJSONGetCPUModelExpansion(qemuMonitorPtr mon,
360
                                        qemuMonitorCPUModelExpansionType type,
361
                                        const char *model_name,
362
                                        bool migratable,
363
                                        qemuMonitorCPUModelInfoPtr *model_info)
364
    ATTRIBUTE_NONNULL(3) ATTRIBUTE_NONNULL(5);
365

366 367 368
int qemuMonitorJSONGetCommands(qemuMonitorPtr mon,
                               char ***commands)
    ATTRIBUTE_NONNULL(2);
369 370 371
int qemuMonitorJSONGetEvents(qemuMonitorPtr mon,
                             char ***events)
    ATTRIBUTE_NONNULL(2);
372 373
int qemuMonitorJSONGetCommandLineOptionParameters(qemuMonitorPtr mon,
                                                  const char *option,
374 375
                                                  char ***params,
                                                  bool *found)
376
    ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3);
377

378 379 380 381 382
int qemuMonitorJSONGetKVMState(qemuMonitorPtr mon,
                               bool *enabled,
                               bool *present)
    ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3);

383 384 385
int qemuMonitorJSONGetObjectTypes(qemuMonitorPtr mon,
                                  char ***types)
    ATTRIBUTE_NONNULL(2);
386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402

/* ListPath structures and API's are public only for qemumonitorjsontest */
typedef struct _qemuMonitorJSONListPath qemuMonitorJSONListPath;
typedef qemuMonitorJSONListPath *qemuMonitorJSONListPathPtr;

struct _qemuMonitorJSONListPath {
    char *name;
    char *type;
};

int qemuMonitorJSONGetObjectListPaths(qemuMonitorPtr mon,
                                      const char *path,
                                      qemuMonitorJSONListPathPtr **paths)
    ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3);

void qemuMonitorJSONListPathFree(qemuMonitorJSONListPathPtr paths);

403 404 405
/* ObjectProperty structures and Get/Set API's are public only
 * for qemumonitorjsontest
 */
406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439
/* Flags for the 'type' field in _qemuMonitorJSONObjectProperty */
typedef enum {
    QEMU_MONITOR_OBJECT_PROPERTY_BOOLEAN=1,
    QEMU_MONITOR_OBJECT_PROPERTY_INT,
    QEMU_MONITOR_OBJECT_PROPERTY_LONG,
    QEMU_MONITOR_OBJECT_PROPERTY_UINT,
    QEMU_MONITOR_OBJECT_PROPERTY_ULONG,
    QEMU_MONITOR_OBJECT_PROPERTY_DOUBLE,
    QEMU_MONITOR_OBJECT_PROPERTY_STRING,

    QEMU_MONITOR_OBJECT_PROPERTY_LAST
} qemuMonitorJSONObjectPropertyType;

typedef struct _qemuMonitorJSONObjectProperty qemuMonitorJSONObjectProperty;
typedef qemuMonitorJSONObjectProperty *qemuMonitorJSONObjectPropertyPtr;
struct _qemuMonitorJSONObjectProperty {
    int type;    /* qemuMonitorJSONObjectPropertyType */
    union {
        bool b;
        int iv;
        long long l;
        unsigned int ui;
        unsigned long long ul;
        double d;
        char *str;
    } val;
};

int qemuMonitorJSONGetObjectProperty(qemuMonitorPtr mon,
                                     const char *path,
                                     const char *property,
                                     qemuMonitorJSONObjectPropertyPtr prop)
    ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3) ATTRIBUTE_NONNULL(4);

440 441 442 443 444 445
int qemuMonitorJSONSetObjectProperty(qemuMonitorPtr mon,
                                     const char *path,
                                     const char *property,
                                     qemuMonitorJSONObjectPropertyPtr prop)
    ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3) ATTRIBUTE_NONNULL(4);

446 447
int qemuMonitorJSONGetDeviceProps(qemuMonitorPtr mon,
                                  const char *device,
448 449
                                  char ***props)
    ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3);
450 451 452 453
int qemuMonitorJSONGetObjectProps(qemuMonitorPtr mon,
                                  const char *object,
                                  char ***props)
    ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3);
454
char *qemuMonitorJSONGetTargetArch(qemuMonitorPtr mon);
455

456 457
int qemuMonitorJSONNBDServerStart(qemuMonitorPtr mon,
                                  const char *host,
458 459
                                  unsigned int port,
                                  const char *tls_alias);
460 461 462
int qemuMonitorJSONNBDServerAdd(qemuMonitorPtr mon,
                                const char *deviceID,
                                bool writable);
463
int qemuMonitorJSONNBDServerStop(qemuMonitorPtr mon);
S
Stefan Berger 已提交
464 465 466 467 468 469 470 471
int qemuMonitorJSONGetTPMModels(qemuMonitorPtr mon,
                                char ***tpmmodels)
    ATTRIBUTE_NONNULL(2);

int qemuMonitorJSONGetTPMTypes(qemuMonitorPtr mon,
                               char ***tpmtypes)
    ATTRIBUTE_NONNULL(2);

472 473 474
int qemuMonitorJSONAttachCharDev(qemuMonitorPtr mon,
                                 const char *chrID,
                                 virDomainChrSourceDefPtr chr);
475 476
int qemuMonitorJSONDetachCharDev(qemuMonitorPtr mon,
                                 const char *chrID);
477 478 479 480

int qemuMonitorJSONGetDeviceAliases(qemuMonitorPtr mon,
                                    char ***aliases);

481 482 483 484
int qemuMonitorJSONGetCPUx86Data(qemuMonitorPtr mon,
                                 const char *property,
                                 virCPUDataPtr *cpudata);

485 486
int qemuMonitorJSONGetGuestCPU(qemuMonitorPtr mon,
                               virArch arch,
487 488
                               virCPUDataPtr *data,
                               virCPUDataPtr *disabled);
489 490

int qemuMonitorJSONRTCResetReinjection(qemuMonitorPtr mon);
491 492

int qemuMonitorJSONGetIOThreads(qemuMonitorPtr mon,
493
                                qemuMonitorIOThreadInfoPtr **iothreads)
494
    ATTRIBUTE_NONNULL(2);
495 496 497 498 499

int qemuMonitorJSONGetMemoryDeviceInfo(qemuMonitorPtr mon,
                                       virHashTablePtr info)
    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);

500 501
int qemuMonitorJSONFindLinkPath(qemuMonitorPtr mon,
                                const char *name,
502
                                const char *alias,
503
                                char **path)
504
    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(4);
505 506 507 508 509

int qemuMonitorJSONMigrateIncoming(qemuMonitorPtr mon,
                                   const char *uri)
    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);

510 511
int qemuMonitorJSONMigrateStartPostCopy(qemuMonitorPtr mon)
    ATTRIBUTE_NONNULL(1);
512 513 514 515

int qemuMonitorJSONMigrateContinue(qemuMonitorPtr mon,
                                   qemuMonitorMigrationStatus status)
    ATTRIBUTE_NONNULL(1);
516

517 518 519
int qemuMonitorJSONGetRTCTime(qemuMonitorPtr mon,
                              struct tm *tm)
    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
520 521 522 523 524

int qemuMonitorJSONGetHotpluggableCPUs(qemuMonitorPtr mon,
                                       struct qemuMonitorQueryHotpluggableCpusEntry **entries,
                                       size_t *nentries)
    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3);
525

526
virJSONValuePtr qemuMonitorJSONQueryQMPSchema(qemuMonitorPtr mon)
527
    ATTRIBUTE_NONNULL(1);
528 529 530 531 532 533

int qemuMonitorJSONSetBlockThreshold(qemuMonitorPtr mon,
                                     const char *nodename,
                                     unsigned long long threshold)
    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);

534 535 536
virJSONValuePtr qemuMonitorJSONQueryNamedBlockNodes(qemuMonitorPtr mon)
    ATTRIBUTE_NONNULL(1);

M
Michal Privoznik 已提交
537 538 539
int qemuMonitorJSONSetWatchdogAction(qemuMonitorPtr mon,
                                     const char *action)
    ATTRIBUTE_NONNULL(1);
540 541 542 543 544 545 546 547 548

int qemuMonitorJSONBlockdevAdd(qemuMonitorPtr mon,
                               virJSONValuePtr props)
    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);

int qemuMonitorJSONBlockdevDel(qemuMonitorPtr mon,
                               const char *nodename)
    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);

549 550 551 552
int qemuMonitorJSONGetPRManagerInfo(qemuMonitorPtr mon,
                                    virHashTablePtr info)
    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);

D
Daniel P. Berrange 已提交
553
#endif /* QEMU_MONITOR_JSON_H */