libmobi
C library for handling MOBI format ebook documents
Functions
memory.h File Reference
#include "config.h"
#include "index.h"
#include "compression.h"
#include "mobi.h"

Go to the source code of this file.

Functions

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...
 
MOBIHuffCdicmobi_init_huffcdic (void)
 Initialize and return MOBIHuffCdic structure. More...
 
void mobi_free_huffcdic (MOBIHuffCdic *huffcdic)
 Free MOBIHuffCdic structure and all its children. More...
 
MOBIIndxmobi_init_indx (void)
 Initialize and return MOBIIndx structure. 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_index_entries (MOBIIndx *indx)
 Free index entries data and all its children. More...
 

Detailed Description

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/

Function Documentation

◆ mobi_free_eh()

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

Parameters
[in,out]mMOBIData structure

◆ mobi_free_huffcdic()

void mobi_free_huffcdic ( MOBIHuffCdic huffcdic)

Free MOBIHuffCdic structure and all its children.

Parameters
[in]huffcdicMOBIData structure

◆ mobi_free_index_entries()

void mobi_free_index_entries ( MOBIIndx indx)

Free index entries data and all its children.

Parameters
[in]indxMOBIIndx structure that holds indx->entries

◆ mobi_free_indx()

void mobi_free_indx ( MOBIIndx indx)

Free MOBIIndx structure and all its children.

Parameters
[in]indxMOBIIndx structure that holds indx->entries

◆ mobi_free_mh()

void mobi_free_mh ( MOBIMobiHeader mh)

Free MOBIMobiHeader structure.

Parameters
[in]mhMOBIMobiHeader structure

◆ mobi_free_next()

void mobi_free_next ( MOBIData m)

Free MOBIData structure for currenly unused hybrid part and all its children.

Parameters
[in]mMOBIData structure

◆ mobi_free_ordt()

void mobi_free_ordt ( MOBIOrdt ordt)

Free MOBIOrdt structure and all its children.

Parameters
[in]ordtMOBIOrdt structure

◆ mobi_free_rec()

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

Parameters
[in,out]mMOBIData structure

◆ mobi_free_tagx()

void mobi_free_tagx ( MOBITagx tagx)

Free MOBITagx structure and all its children.

Parameters
[in]tagxMOBITagx structure

◆ mobi_init_huffcdic()

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().

Returns
MOBIHuffCdic on success, NULL otherwise

◆ mobi_init_indx()

MOBIIndx* mobi_init_indx ( void  )

Initialize and return MOBIIndx structure.

MOBIIndx structure holds INDX index record entries. Must be freed with mobi_free_indx()

Returns
MOBIIndx on success, NULL otherwise