replace ec3_reader and ec3_writer with a unified image and tag io interface
This commit is contained in:
39
src/shadow-image.h
Normal file
39
src/shadow-image.h
Normal file
@@ -0,0 +1,39 @@
|
||||
#ifndef SHADOW_IMAGE_H_
|
||||
#define SHADOW_IMAGE_H_
|
||||
|
||||
#include "cluster-table.h"
|
||||
#include "status.h"
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
struct b_file;
|
||||
struct b_buffer;
|
||||
struct ec3_image_ioctx;
|
||||
struct ec3_tag_ioctx;
|
||||
struct ec3_tag_info;
|
||||
|
||||
struct shadow_image {
|
||||
size_t img_nr_clusters;
|
||||
size_t img_nr_bytes;
|
||||
struct b_file *img_f_data;
|
||||
struct b_file *img_f_cluster_table;
|
||||
struct cluster_table img_cluster_table;
|
||||
struct b_buffer *img_extent_table;
|
||||
struct b_buffer *img_tag_table;
|
||||
};
|
||||
|
||||
extern enum ec3_status shadow_image_init(
|
||||
struct ec3_image_ioctx *parent,
|
||||
struct shadow_image *out);
|
||||
extern enum ec3_status shadow_image_finish(
|
||||
struct ec3_image_ioctx *parent,
|
||||
struct shadow_image *image);
|
||||
extern void shadow_image_cancel(struct shadow_image *image);
|
||||
|
||||
extern enum ec3_status shadow_image_write_tag(
|
||||
struct ec3_image_ioctx *src,
|
||||
const struct ec3_tag_info *tag,
|
||||
struct ec3_tag_ioctx *ioctx,
|
||||
struct shadow_image *dest);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user