read tag and extent table in ec3_reader_create
This commit is contained in:
43
src/read.h
43
src/read.h
@@ -3,17 +3,54 @@
|
||||
|
||||
#include "status.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
|
||||
struct ec3_reader;
|
||||
struct ec3_tag_reader;
|
||||
|
||||
struct ec3_container_info {
|
||||
unsigned short c_version;
|
||||
unsigned short c_cluster_size;
|
||||
size_t c_tag_table_offset;
|
||||
size_t c_extent_table_offset;
|
||||
size_t c_cluster_table_offset;
|
||||
unsigned int c_nr_tags;
|
||||
unsigned int c_nr_extents;
|
||||
unsigned int c_nr_cluster_groups;
|
||||
|
||||
uint64_t c_id;
|
||||
};
|
||||
|
||||
struct ec3_tag_info {
|
||||
unsigned long tag_type;
|
||||
unsigned long tag_flags;
|
||||
unsigned long tag_checksum;
|
||||
unsigned long long tag_ident;
|
||||
};
|
||||
|
||||
struct ec3_extent_info {
|
||||
unsigned long long ex_owner;
|
||||
unsigned long ex_logical_cluster;
|
||||
unsigned long ex_physical_cluster;
|
||||
unsigned long ex_count;
|
||||
};
|
||||
|
||||
extern enum ec3_status ec3_reader_create(FILE *inp, struct ec3_reader **out);
|
||||
extern void ec3_reader_finish(struct ec3_reader *reader);
|
||||
|
||||
extern enum ec3_status ec3_reader_open_tag(struct ec3_reader *reader, uint64_t tag_ident, struct ec3_tag_reader **out);
|
||||
extern const struct ec3_container_info *ec3_reader_get_container_info(
|
||||
const struct ec3_reader *reader);
|
||||
extern const struct ec3_tag_info *ec3_reader_get_tags(
|
||||
const struct ec3_reader *reader);
|
||||
extern const struct ec3_extent_info *ec3_reader_get_extents(
|
||||
const struct ec3_reader *reader);
|
||||
|
||||
extern enum ec3_status ec3_reader_open_tag(
|
||||
struct ec3_reader *reader,
|
||||
uint64_t tag_ident,
|
||||
struct ec3_tag_reader **out);
|
||||
|
||||
extern enum ec3_status ec3_tag_reader_close(struct ec3_tag_reader *tag);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user