write-op-visitor.h 1000 Bytes
Newer Older
1 2 3 4 5 6 7 8 9
/*
 * (C) 2017 The University of Chicago
 * 
 * See COPYRIGHT in top-level directory.
 */
#ifndef __MOBJECT_WRITE_OP_VISITOR_H
#define __MOBJECT_WRITE_OP_VISITOR_H

#include "libmobject-store.h"
Matthieu Dorier's avatar
Matthieu Dorier committed
10
#include "src/util/buffer-union.h"
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26

typedef struct write_op_visitor {
	void (*visit_begin)(void*);
	void (*visit_create)(void*, int);
	void (*visit_write)(void*, buffer_u, size_t, uint64_t);
	void (*visit_write_full)(void*, buffer_u, size_t);
	void (*visit_writesame)(void*, buffer_u, size_t, size_t, uint64_t);
	void (*visit_append)(void*, buffer_u, size_t);
	void (*visit_remove)(void*);
	void (*visit_truncate)(void*, uint64_t);
	void (*visit_zero)(void*, uint64_t, uint64_t);
	void (*visit_omap_set)(void*, char const* const*, char const* const*, const size_t*, size_t);
	void (*visit_omap_rm_keys)(void*, char const* const*, size_t);
	void (*visit_end)(void*);
}* write_op_visitor_t;

27
void execute_write_op_visitor(write_op_visitor_t visitor, mobject_store_write_op_t write_op, void* uargs);
28 29

#endif