1 /* 2 * Declarations for block exports 3 * 4 * Copyright (c) 2012, 2020 Red Hat, Inc. 5 * 6 * Authors: 7 * Paolo Bonzini <pbonzini@redhat.com> 8 * Kevin Wolf <kwolf@redhat.com> 9 * 10 * This work is licensed under the terms of the GNU GPL, version 2 or 11 * later. See the COPYING file in the top-level directory. 12 */ 13 14 #ifndef BLOCK_EXPORT_H 15 #define BLOCK_EXPORT_H 16 17 #include "qapi/qapi-types-block-export.h" 18 19 typedef struct BlockExport BlockExport; 20 21 typedef struct BlockExportDriver { 22 /* The export type that this driver services */ 23 BlockExportType type; 24 25 /* Creates and starts a new block export */ 26 BlockExport *(*create)(BlockExportOptions *, Error **); 27 } BlockExportDriver; 28 29 struct BlockExport { 30 const BlockExportDriver *drv; 31 }; 32 33 BlockExport *blk_exp_add(BlockExportOptions *export, Error **errp); 34 35 #endif 36