qemu_monitor_json.h 23.2 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 qemuMonitorJSONIOProcessLine(qemuMonitorPtr mon,
                                 const char *line,
                                 qemuMonitorMessagePtr msg);

D
Daniel P. Berrange 已提交
39 40 41 42 43
int qemuMonitorJSONIOProcess(qemuMonitorPtr mon,
                             const char *data,
                             size_t len,
                             qemuMonitorMessagePtr msg);

44 45 46 47 48
int qemuMonitorJSONHumanCommandWithFd(qemuMonitorPtr mon,
                                      const char *cmd,
                                      int scm_fd,
                                      char **reply);

49 50
int qemuMonitorJSONSetCapabilities(qemuMonitorPtr mon);

51
int qemuMonitorJSONStartCPUs(qemuMonitorPtr mon);
D
Daniel P. Berrange 已提交
52
int qemuMonitorJSONStopCPUs(qemuMonitorPtr mon);
53 54 55
int qemuMonitorJSONGetStatus(qemuMonitorPtr mon,
                             bool *running,
                             virDomainPausedReason *reason);
D
Daniel P. Berrange 已提交
56 57

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

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

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

int qemuMonitorJSONSetVNCPassword(qemuMonitorPtr mon,
                                  const char *password);
98 99 100 101 102 103 104
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 已提交
105
int qemuMonitorJSONSetBalloon(qemuMonitorPtr mon,
106
                              unsigned long long newmem);
107
int qemuMonitorJSONSetCPU(qemuMonitorPtr mon, int cpu, bool online);
D
Daniel P. Berrange 已提交
108 109

int qemuMonitorJSONEjectMedia(qemuMonitorPtr mon,
110
                              const char *dev_name,
111
                              bool force);
D
Daniel P. Berrange 已提交
112
int qemuMonitorJSONChangeMedia(qemuMonitorPtr mon,
113
                               const char *dev_name,
D
Daniel P. Berrange 已提交
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129
                               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);

130 131 132
int qemuMonitorJSONSetMigrationDowntime(qemuMonitorPtr mon,
                                        unsigned long long downtime);

133 134 135 136 137
int qemuMonitorJSONGetMigrationCacheSize(qemuMonitorPtr mon,
                                         unsigned long long *cacheSize);
int qemuMonitorJSONSetMigrationCacheSize(qemuMonitorPtr mon,
                                         unsigned long long cacheSize);

138
int qemuMonitorJSONGetMigrationParams(qemuMonitorPtr mon,
139
                                      virJSONValuePtr *params);
140
int qemuMonitorJSONSetMigrationParams(qemuMonitorPtr mon,
141
                                      virJSONValuePtr params);
142

143
int qemuMonitorJSONGetMigrationStats(qemuMonitorPtr mon,
144 145
                                     qemuMonitorMigrationStatsPtr stats,
                                     char **error);
D
Daniel P. Berrange 已提交
146

147 148
int qemuMonitorJSONGetMigrationCapabilities(qemuMonitorPtr mon,
                                            char ***capabilities);
149
int qemuMonitorJSONSetMigrationCapabilities(qemuMonitorPtr mon,
150
                                            virJSONValuePtr caps);
151

A
Andrea Bolognani 已提交
152 153 154
int qemuMonitorJSONGetGICCapabilities(qemuMonitorPtr mon,
                                      virGICCapability **capabilities);

155 156 157
int qemuMonitorJSONGetSEVCapabilities(qemuMonitorPtr mon,
                                      virSEVCapability **capabilities);

158 159 160
int qemuMonitorJSONMigrate(qemuMonitorPtr mon,
                           unsigned int flags,
                           const char *uri);
161 162 163
int qemuMonitorJSONGetSpiceMigrationStatus(qemuMonitorPtr mon,
                                           bool *spice_migrated);

D
Daniel P. Berrange 已提交
164 165 166

int qemuMonitorJSONMigrateCancel(qemuMonitorPtr mon);

167 168 169
int qemuMonitorJSONQueryDump(qemuMonitorPtr mon,
                             qemuMonitorDumpStatsPtr stats);

170 171 172
int qemuMonitorJSONGetDumpGuestMemoryCapability(qemuMonitorPtr mon,
                                                const char *capability);

173
int qemuMonitorJSONDump(qemuMonitorPtr mon,
174
                        const char *protocol,
175 176
                        const char *dumpformat,
                        bool detach);
177

178 179 180 181 182 183 184
int qemuMonitorJSONGraphicsRelocate(qemuMonitorPtr mon,
                                    int type,
                                    const char *hostname,
                                    int port,
                                    int tlsPort,
                                    const char *tlsSubject);

D
Daniel P. Berrange 已提交
185
int qemuMonitorJSONAddPCIHostDevice(qemuMonitorPtr mon,
186 187
                                    virPCIDeviceAddress *hostAddr,
                                    virPCIDeviceAddress *guestAddr);
D
Daniel P. Berrange 已提交
188 189 190 191

int qemuMonitorJSONAddPCIDisk(qemuMonitorPtr mon,
                              const char *path,
                              const char *bus,
192
                              virPCIDeviceAddress *guestAddr);
D
Daniel P. Berrange 已提交
193 194 195

int qemuMonitorJSONAddPCINetwork(qemuMonitorPtr mon,
                                 const char *nicstr,
196
                                 virPCIDeviceAddress *guestAddr);
D
Daniel P. Berrange 已提交
197 198

int qemuMonitorJSONRemovePCIDevice(qemuMonitorPtr mon,
199
                                   virPCIDeviceAddress *guestAddr);
D
Daniel P. Berrange 已提交
200 201 202 203

int qemuMonitorJSONSendFileHandle(qemuMonitorPtr mon,
                                  const char *fdname,
                                  int fd);
204 205
int qemuMonitorJSONAddFd(qemuMonitorPtr mon, int fdset, int fd,
                         const char *name);
D
Daniel P. Berrange 已提交
206 207 208

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

211 212 213 214 215 216
int qemuMonitorJSONAddNetdev(qemuMonitorPtr mon,
                             const char *netdevstr);

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

217 218 219
int qemuMonitorJSONQueryRxFilter(qemuMonitorPtr mon, const char *alias,
                                 virNetDevRxFilterPtr *filter);

220 221
int qemuMonitorJSONGetChardevInfo(qemuMonitorPtr mon,
                                  virHashTablePtr info);
222

223 224
int qemuMonitorJSONAttachPCIDiskController(qemuMonitorPtr mon,
                                           const char *bus,
225
                                           virPCIDeviceAddress *guestAddr);
226

227 228
int qemuMonitorJSONAddDeviceArgs(qemuMonitorPtr mon,
                                 virJSONValuePtr args);
229 230 231
int qemuMonitorJSONAddDevice(qemuMonitorPtr mon,
                             const char *devicestr);

232
int qemuMonitorJSONDelDevice(qemuMonitorPtr mon,
233
                             const char *devalias);
234

235 236 237 238 239 240
int qemuMonitorJSONAddObject(qemuMonitorPtr mon,
                             virJSONValuePtr props);

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

241
int qemuMonitorJSONDiskSnapshot(qemuMonitorPtr mon,
242
                                virJSONValuePtr actions,
243
                                const char *device,
244 245
                                const char *file,
                                const char *format,
246 247 248
                                bool reuse)
    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3)
    ATTRIBUTE_NONNULL(4) ATTRIBUTE_NONNULL(5);
249
int qemuMonitorJSONTransaction(qemuMonitorPtr mon, virJSONValuePtr *actions)
250 251 252 253 254 255
    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
int qemuMonitorJSONDriveMirror(qemuMonitorPtr mon,
                               const char *device,
                               const char *file,
                               const char *format,
                               unsigned long long speed,
256 257
                               unsigned int granularity,
                               unsigned long long buf_size,
258 259
                               unsigned int flags)
    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3);
260 261 262 263 264 265 266 267 268
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);
269
int qemuMonitorJSONDrivePivot(qemuMonitorPtr mon,
270
                              const char *device)
271
    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
272

273 274 275 276
int qemuMonitorJSONBlockCommit(qemuMonitorPtr mon,
                               const char *device,
                               const char *top,
                               const char *base,
277
                               const char *backingName,
278
                               unsigned long long bandwidth)
279
    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
280

281 282 283 284 285 286 287
char *qemuMonitorJSONDiskNameLookup(qemuMonitorPtr mon,
                                    const char *device,
                                    virStorageSourcePtr top,
                                    virStorageSourcePtr target)
    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3)
    ATTRIBUTE_NONNULL(4);

288 289
int qemuMonitorJSONArbitraryCommand(qemuMonitorPtr mon,
                                    const char *cmd_str,
290 291
                                    char **reply_str,
                                    bool hmp);
292

293
int qemuMonitorJSONInjectNMI(qemuMonitorPtr mon);
294

295 296 297 298 299
int qemuMonitorJSONSendKey(qemuMonitorPtr mon,
                           unsigned int holdtime,
                           unsigned int *keycodes,
                           unsigned int nkeycodes);

300
int qemuMonitorJSONScreendump(qemuMonitorPtr mon,
301 302
                              const char *device,
                              unsigned int head,
303 304
                              const char *file);

305 306 307 308
int qemuMonitorJSONBlockStream(qemuMonitorPtr mon,
                               const char *device,
                               const char *base,
                               const char *backingName,
309
                               unsigned long long speed)
310
    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
311

312
int qemuMonitorJSONBlockJobCancel(qemuMonitorPtr mon,
313
                                  const char *device)
314 315
    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);

316 317
int qemuMonitorJSONBlockJobSetSpeed(qemuMonitorPtr mon,
                                    const char *device,
318
                                    unsigned long long speed)
319 320
    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);

321 322
virHashTablePtr qemuMonitorJSONGetAllBlockJobInfo(qemuMonitorPtr mon)
    ATTRIBUTE_NONNULL(1);
323

324 325
int qemuMonitorJSONSetLink(qemuMonitorPtr mon,
                           const char *name,
326
                           virDomainNetInterfaceLinkState state);
327

328 329 330 331 332
int qemuMonitorJSONOpenGraphics(qemuMonitorPtr mon,
                                const char *protocol,
                                const char *fdname,
                                bool skipauth);

333 334
int qemuMonitorJSONSetBlockIoThrottle(qemuMonitorPtr mon,
                                      const char *device,
335
                                      virDomainBlockIoTuneInfoPtr info,
336
                                      bool supportMaxOptions,
337
                                      bool supportGroupNameOption,
338
                                      bool supportMaxLengthOptions);
339 340 341

int qemuMonitorJSONGetBlockIoThrottle(qemuMonitorPtr mon,
                                      const char *device,
342
                                      virDomainBlockIoTuneInfoPtr reply);
343

344 345
int qemuMonitorJSONSystemWakeup(qemuMonitorPtr mon);

346 347
char *qemuMonitorJSONGetSEVMeasurement(qemuMonitorPtr mon);

348 349 350 351 352 353 354
int qemuMonitorJSONGetVersion(qemuMonitorPtr mon,
                              int *major,
                              int *minor,
                              int *micro,
                              char **package)
    ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3) ATTRIBUTE_NONNULL(4);

355 356 357 358
int qemuMonitorJSONGetMachines(qemuMonitorPtr mon,
                               qemuMonitorMachineInfoPtr **machines)
    ATTRIBUTE_NONNULL(2);

359
int qemuMonitorJSONGetCPUDefinitions(qemuMonitorPtr mon,
360
                                     qemuMonitorCPUDefInfoPtr **cpus)
361 362
    ATTRIBUTE_NONNULL(2);

363
int qemuMonitorJSONGetCPUModelExpansion(qemuMonitorPtr mon,
364
                                        qemuMonitorCPUModelExpansionType type,
365
                                        const char *model_name,
366
                                        bool migratable,
367
                                        qemuMonitorCPUModelInfoPtr *model_info)
368
    ATTRIBUTE_NONNULL(3) ATTRIBUTE_NONNULL(5);
369

370 371 372
int qemuMonitorJSONGetCommands(qemuMonitorPtr mon,
                               char ***commands)
    ATTRIBUTE_NONNULL(2);
373 374 375
int qemuMonitorJSONGetEvents(qemuMonitorPtr mon,
                             char ***events)
    ATTRIBUTE_NONNULL(2);
376 377
int qemuMonitorJSONGetCommandLineOptionParameters(qemuMonitorPtr mon,
                                                  const char *option,
378 379
                                                  char ***params,
                                                  bool *found)
380
    ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3);
381

382 383 384 385 386
int qemuMonitorJSONGetKVMState(qemuMonitorPtr mon,
                               bool *enabled,
                               bool *present)
    ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3);

387 388 389
int qemuMonitorJSONGetObjectTypes(qemuMonitorPtr mon,
                                  char ***types)
    ATTRIBUTE_NONNULL(2);
390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406

/* 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);

407 408 409
/* ObjectProperty structures and Get/Set API's are public only
 * for qemumonitorjsontest
 */
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 440 441 442 443
/* 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);

444 445 446 447 448 449
int qemuMonitorJSONSetObjectProperty(qemuMonitorPtr mon,
                                     const char *path,
                                     const char *property,
                                     qemuMonitorJSONObjectPropertyPtr prop)
    ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3) ATTRIBUTE_NONNULL(4);

450 451
int qemuMonitorJSONGetDeviceProps(qemuMonitorPtr mon,
                                  const char *device,
452 453
                                  char ***props)
    ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3);
454 455 456 457
int qemuMonitorJSONGetObjectProps(qemuMonitorPtr mon,
                                  const char *object,
                                  char ***props)
    ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3);
458
char *qemuMonitorJSONGetTargetArch(qemuMonitorPtr mon);
459

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

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

476 477 478
int qemuMonitorJSONAttachCharDev(qemuMonitorPtr mon,
                                 const char *chrID,
                                 virDomainChrSourceDefPtr chr);
479 480
int qemuMonitorJSONDetachCharDev(qemuMonitorPtr mon,
                                 const char *chrID);
481 482 483 484

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

485 486 487 488
int qemuMonitorJSONGetCPUx86Data(qemuMonitorPtr mon,
                                 const char *property,
                                 virCPUDataPtr *cpudata);

489 490
int qemuMonitorJSONGetGuestCPU(qemuMonitorPtr mon,
                               virArch arch,
491 492
                               virCPUDataPtr *data,
                               virCPUDataPtr *disabled);
493 494

int qemuMonitorJSONRTCResetReinjection(qemuMonitorPtr mon);
495 496

int qemuMonitorJSONGetIOThreads(qemuMonitorPtr mon,
497
                                qemuMonitorIOThreadInfoPtr **iothreads)
498
    ATTRIBUTE_NONNULL(2);
499 500 501 502 503

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

504 505
int qemuMonitorJSONFindLinkPath(qemuMonitorPtr mon,
                                const char *name,
506
                                const char *alias,
507
                                char **path)
508
    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(4);
509 510 511 512 513

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

514 515
int qemuMonitorJSONMigrateStartPostCopy(qemuMonitorPtr mon)
    ATTRIBUTE_NONNULL(1);
516 517 518 519

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

521 522 523
int qemuMonitorJSONGetRTCTime(qemuMonitorPtr mon,
                              struct tm *tm)
    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
524 525 526 527 528

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

530
virJSONValuePtr qemuMonitorJSONQueryQMPSchema(qemuMonitorPtr mon)
531
    ATTRIBUTE_NONNULL(1);
532 533 534 535 536 537

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

538 539 540
virJSONValuePtr qemuMonitorJSONQueryNamedBlockNodes(qemuMonitorPtr mon)
    ATTRIBUTE_NONNULL(1);

M
Michal Privoznik 已提交
541 542 543
int qemuMonitorJSONSetWatchdogAction(qemuMonitorPtr mon,
                                     const char *action)
    ATTRIBUTE_NONNULL(1);
544 545 546 547 548 549 550 551 552

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);

553 554 555 556
int qemuMonitorJSONGetPRManagerInfo(qemuMonitorPtr mon,
                                    virHashTablePtr info)
    ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);

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