s390x/pci: Add routine to get the vfio dma available count
[qemu/ar7.git] / include / hw / vmstate-if.h
blob52df571d17abbe8734ebc9be320ce1da4c7a1c2d
1 /*
2 * VMState interface
4 * Copyright (c) 2009-2019 Red Hat Inc
5 * This work is licensed under the terms of the GNU GPL, version 2 or later.
6 * See the COPYING file in the top-level directory.
7 */
9 #ifndef VMSTATE_IF_H
10 #define VMSTATE_IF_H
12 #include "qom/object.h"
14 #define TYPE_VMSTATE_IF "vmstate-if"
16 typedef struct VMStateIfClass VMStateIfClass;
17 DECLARE_CLASS_CHECKERS(VMStateIfClass, VMSTATE_IF,
18 TYPE_VMSTATE_IF)
19 #define VMSTATE_IF(obj) \
20 INTERFACE_CHECK(VMStateIf, (obj), TYPE_VMSTATE_IF)
22 typedef struct VMStateIf VMStateIf;
24 struct VMStateIfClass {
25 InterfaceClass parent_class;
27 char * (*get_id)(VMStateIf *obj);
30 static inline char *vmstate_if_get_id(VMStateIf *vmif)
32 if (!vmif) {
33 return NULL;
36 return VMSTATE_IF_GET_CLASS(vmif)->get_id(vmif);
39 #endif /* VMSTATE_IF_H */