libmobi
C library for handling MOBI format ebook documents
|
Functions for initializing and releasing structures and data containers. More...
Functions | |
MOBIData * | mobi_init (void) |
Initializer for MOBIData structure. More... | |
void | mobi_free_mh (MOBIMobiHeader *mh) |
Free MOBIMobiHeader structure. More... | |
void | mobi_free_rec (MOBIData *m) |
Free all MOBIPdbRecord structures and its respective data attached to MOBIData structure. More... | |
void | mobi_free_eh (MOBIData *m) |
Free all MOBIExthHeader structures and its respective data attached to MOBIData structure. More... | |
void | mobi_free_next (MOBIData *m) |
Free MOBIData structure for currenly unused hybrid part and all its children. More... | |
void | mobi_free (MOBIData *m) |
Free MOBIData structure and all its children. More... | |
MOBIHuffCdic * | mobi_init_huffcdic (void) |
Initialize and return MOBIHuffCdic structure. More... | |
void | mobi_free_huffcdic (MOBIHuffCdic *huffcdic) |
Free MOBIHuffCdic structure and all its children. More... | |
MOBIRawml * | mobi_init_rawml (const MOBIData *m) |
Initialize and return MOBIRawml structure. More... | |
void | mobi_free_fdst (MOBIFdst *fdst) |
Free MOBIFdst structure and all its children. More... | |
MOBIIndx * | mobi_init_indx (void) |
Initialize and return MOBIIndx structure. More... | |
void | mobi_free_index_entries (MOBIIndx *indx) |
Free index entries data and all its children. More... | |
void | mobi_free_indx (MOBIIndx *indx) |
Free MOBIIndx structure and all its children. More... | |
void | mobi_free_tagx (MOBITagx *tagx) |
Free MOBITagx structure and all its children. More... | |
void | mobi_free_ordt (MOBIOrdt *ordt) |
Free MOBIOrdt structure and all its children. More... | |
void | mobi_free_part (MOBIPart *part, int free_data) |
Free MOBIPart structure. More... | |
void | mobi_free_opf_data (MOBIPart *part) |
Free MOBIPart structure for opf and ncx data. More... | |
void | mobi_free_font_data (MOBIPart *part) |
Free MOBIPart structure for decoded font data. More... | |
void | mobi_free_rawml (MOBIRawml *rawml) |
Free MOBIRawml structure allocated by mobi_init_rawml() More... | |
Functions for initializing and releasing structures and data containers.
Copyright (c) 2014 Bartek Fabiszewski http://www.fabiszewski.net
This file is part of libmobi. Licensed under LGPL, either version 3, or any later. See http://www.gnu.org/licenses/
void mobi_free_eh | ( | MOBIData * | m | ) |
Free all MOBIExthHeader structures and its respective data attached to MOBIData structure.
Each MOBIExthHeader structure holds metadata and data for each EXTH record
[in,out] | m | MOBIData structure |
void mobi_free_fdst | ( | MOBIFdst * | fdst | ) |
void mobi_free_font_data | ( | MOBIPart * | part | ) |
void mobi_free_huffcdic | ( | MOBIHuffCdic * | huffcdic | ) |
Free MOBIHuffCdic structure and all its children.
[in] | huffcdic | MOBIData structure |
void mobi_free_index_entries | ( | MOBIIndx * | indx | ) |
Free index entries data and all its children.
[in] | indx | MOBIIndx structure that holds indx->entries |
void mobi_free_indx | ( | MOBIIndx * | indx | ) |
void mobi_free_mh | ( | MOBIMobiHeader * | mh | ) |
Free MOBIMobiHeader structure.
[in] | mh | MOBIMobiHeader structure |
void mobi_free_next | ( | MOBIData * | m | ) |
void mobi_free_opf_data | ( | MOBIPart * | part | ) |
void mobi_free_ordt | ( | MOBIOrdt * | ordt | ) |
void mobi_free_part | ( | MOBIPart * | part, |
int | free_data | ||
) |
Free MOBIPart structure.
Pointer to data may point to memory area also used by record->data. So we need a flag to leave the memory allocated, while freeing MOBIPart structure
[in] | part | MOBIPart structure |
[in] | free_data | Flag, if set - a pointer to part->data is also released, otherwise not released |
void mobi_free_rec | ( | MOBIData * | m | ) |
Free all MOBIPdbRecord structures and its respective data attached to MOBIData structure.
Each MOBIPdbRecord structure holds metadata and data for each pdb record
[in,out] | m | MOBIData structure |
void mobi_free_tagx | ( | MOBITagx * | tagx | ) |
MOBIHuffCdic* mobi_init_huffcdic | ( | void | ) |
Initialize and return MOBIHuffCdic structure.
MOBIHuffCdic structure holds parsed data from HUFF, CDIC records. It is used for huffman decompression. Initialized structure is a child of MOBIData structure. It must be freed with mobi_free_huffcdic().
MOBIIndx* mobi_init_indx | ( | void | ) |
Initialize and return MOBIIndx structure.
MOBIIndx structure holds INDX index record entries. Must be freed with mobi_free_indx()