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

Go to the source code of this file.

Macros

#define MOBI_EXTH_MAXCNT   1024
 

Functions

MOBI_RET mobi_parse_fdst (const MOBIData *m, MOBIRawml *rawml)
 Parse FDST record into MOBIRawml structure (MOBIFdst member) More...
 
MOBI_RET mobi_parse_huffdic (const MOBIData *m, MOBIHuffCdic *cdic)
 Parse a set of HUFF and CDIC records into MOBIHuffCdic structure. More...
 
MOBI_RET mobi_load_pdbheader (MOBIData *m, FILE *file)
 Read palm database header from file into MOBIData structure (MOBIPdbHeader) More...
 
MOBI_RET mobi_load_reclist (MOBIData *m, FILE *file)
 Read list of database records from file into MOBIData structure (MOBIPdbRecord) More...
 
MOBI_RET mobi_load_rec (MOBIData *m, FILE *file)
 Read record data and size from file into MOBIData structure (MOBIPdbRecord) More...
 
MOBI_RET mobi_load_recdata (MOBIPdbRecord *rec, FILE *file)
 Read record data from file into MOBIPdbRecord structure. 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_load_pdbheader()

MOBI_RET mobi_load_pdbheader ( MOBIData m,
FILE *  file 
)

Read palm database header from file into MOBIData structure (MOBIPdbHeader)

Parameters
[in,out]mMOBIData structure to be filled with read data
[in]fileFiledescriptor to read from
Returns
MOBI_RET status code (on success MOBI_SUCCESS)

◆ mobi_load_rec()

MOBI_RET mobi_load_rec ( MOBIData m,
FILE *  file 
)

Read record data and size from file into MOBIData structure (MOBIPdbRecord)

Parameters
[in,out]mMOBIData structure to be filled with read data
[in]fileFiledescriptor to read from
Returns
MOBI_RET status code (on success MOBI_SUCCESS)

◆ mobi_load_recdata()

MOBI_RET mobi_load_recdata ( MOBIPdbRecord rec,
FILE *  file 
)

Read record data from file into MOBIPdbRecord structure.

Parameters
[in,out]recMOBIPdbRecord structure to be filled with read data
[in]fileFiledescriptor to read from
Returns
MOBI_RET status code (on success MOBI_SUCCESS)

◆ mobi_load_reclist()

MOBI_RET mobi_load_reclist ( MOBIData m,
FILE *  file 
)

Read list of database records from file into MOBIData structure (MOBIPdbRecord)

Parameters
[in,out]mMOBIData structure to be filled with read data
[in]fileFiledescriptor to read from
Returns
MOBI_RET status code (on success MOBI_SUCCESS)

◆ mobi_parse_fdst()

MOBI_RET mobi_parse_fdst ( const MOBIData m,
MOBIRawml rawml 
)

Parse FDST record into MOBIRawml structure (MOBIFdst member)

Parameters
[in]mMOBIData structure with loaded MOBI document
[in,out]rawmlMOBIRawml structure to be filled with parsed data
Returns
MOBI_RET status code (on success MOBI_SUCCESS)

◆ mobi_parse_huffdic()

MOBI_RET mobi_parse_huffdic ( const MOBIData m,
MOBIHuffCdic huffcdic 
)

Parse a set of HUFF and CDIC records into MOBIHuffCdic structure.

Parameters
[in]mMOBIData structure with loaded MOBI document
[in,out]huffcdicMOBIHuffCdic structure to be filled with parsed data
Returns
MOBI_RET status code (on success MOBI_SUCCESS)