/*
 * QEMU Remote Memory Backend
 *
 * Copyright (C) 2018 Virtual Open Systems
 *
 * Authors:
 *   Benjamin Boutin <b.boutin@virtualopensystems.com>
 *   Maciej Bielski <m.bielski@virtualopensystems.com>
 *   Julian Vetter <j.vetter@virtualopensystems.com>
 *
 * This work is licensed under the terms of the GNU GPL, version 2 or later.
 * See the COPYING file in the top-level directory.
 */
#ifndef HOSTMEM_REMOTE_H
#define HOSTMEM_REMOTE_H

#include "qemu/osdep.h"
#include "sysemu/hostmem.h"
#include "qapi/error.h"
#include "qapi/qapi-commands-misc.h"
#include "qom/object_interfaces.h"

#define TYPE_MEMORY_BACKEND_REMOTE "memory-backend-remote"

#define REMOTE_MEMORY_BACKEND_GET_CLASS(obj) \
    OBJECT_GET_CLASS(RemoteMemoryBackendClass, (obj), TYPE_MEMORY_BACKEND_REMOTE)
#define REMOTE_MEMORY_BACKEND_CLASS(klass) \
    OBJECT_CLASS_CHECK(RemoteMemoryBackendClass, (klass), TYPE_MEMORY_BACKEND_REMOTE)
#define MEMORY_BACKEND_REMOTE(obj) \
    OBJECT_CHECK(HostMemoryBackendRemote, (obj), TYPE_MEMORY_BACKEND_REMOTE)

typedef struct RemoteMemoryBackendClass RemoteMemoryBackendClass;
typedef struct HostMemoryBackendRemote HostMemoryBackendRemote;

struct RemoteMemoryBackendClass {
    HostMemoryBackendClass parent_class;
    uint32_t (*get_instances_nb)(void);
};

struct HostMemoryBackendRemote {
    HostMemoryBackend parent_obj;

    char *secid;
    bool migration;
};

#endif
