1f364ec65SWenchao Xia /* 2f364ec65SWenchao Xia * Block layer qmp and info dump related functions 3f364ec65SWenchao Xia * 4f364ec65SWenchao Xia * Copyright (c) 2003-2008 Fabrice Bellard 5f364ec65SWenchao Xia * 6f364ec65SWenchao Xia * Permission is hereby granted, free of charge, to any person obtaining a copy 7f364ec65SWenchao Xia * of this software and associated documentation files (the "Software"), to deal 8f364ec65SWenchao Xia * in the Software without restriction, including without limitation the rights 9f364ec65SWenchao Xia * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10f364ec65SWenchao Xia * copies of the Software, and to permit persons to whom the Software is 11f364ec65SWenchao Xia * furnished to do so, subject to the following conditions: 12f364ec65SWenchao Xia * 13f364ec65SWenchao Xia * The above copyright notice and this permission notice shall be included in 14f364ec65SWenchao Xia * all copies or substantial portions of the Software. 15f364ec65SWenchao Xia * 16f364ec65SWenchao Xia * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17f364ec65SWenchao Xia * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18f364ec65SWenchao Xia * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 19f364ec65SWenchao Xia * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20f364ec65SWenchao Xia * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21f364ec65SWenchao Xia * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22f364ec65SWenchao Xia * THE SOFTWARE. 23f364ec65SWenchao Xia */ 24f364ec65SWenchao Xia 25f364ec65SWenchao Xia #ifndef BLOCK_QAPI_H 26f364ec65SWenchao Xia #define BLOCK_QAPI_H 27f364ec65SWenchao Xia 28f364ec65SWenchao Xia #include "qapi-types.h" 29f364ec65SWenchao Xia #include "block/block.h" 30f364ec65SWenchao Xia #include "block/snapshot.h" 31f364ec65SWenchao Xia 32fb0ed453SWenchao Xia int bdrv_query_snapshot_info_list(BlockDriverState *bs, 33fb0ed453SWenchao Xia SnapshotInfoList **p_list, 34fb0ed453SWenchao Xia Error **errp); 35*43526ec8SWenchao Xia void bdrv_query_image_info(BlockDriverState *bs, 36*43526ec8SWenchao Xia ImageInfo **p_info, 37*43526ec8SWenchao Xia Error **errp); 38f364ec65SWenchao Xia BlockInfo *bdrv_query_info(BlockDriverState *s); 39f364ec65SWenchao Xia BlockStats *bdrv_query_stats(const BlockDriverState *bs); 40f364ec65SWenchao Xia 415b917044SWenchao Xia void bdrv_snapshot_dump(fprintf_function func_fprintf, void *f, 425b917044SWenchao Xia QEMUSnapshotInfo *sn); 435b917044SWenchao Xia void bdrv_image_info_dump(fprintf_function func_fprintf, void *f, 445b917044SWenchao Xia ImageInfo *info); 45f364ec65SWenchao Xia #endif 46