libmobi
C library for handling MOBI format ebook documents
Data Structures | Macros | Functions
opf.h File Reference
#include "config.h"
#include "mobi.h"

Go to the source code of this file.

Data Structures

struct  OPFidentifier
 OPF <dc:identifier/> element structure. More...
 
struct  OPFcreator
 OPF <dc:creator/> element structure. More...
 
struct  OPFsubject
 OPF <dc:subject/> element structure. More...
 
struct  OPFdate
 OPF <dc:date/> element structure. More...
 
struct  OPFdcmeta
 OPF <dc-metadata/> element structure. More...
 
struct  OPFsrp
 OPF <srp> element structure. More...
 
struct  OPFxmeta
 OPF <x-metadata/> element structure. More...
 
struct  OPFmeta
 OPF <meta> element structure. More...
 
struct  OPFmetadata
 OPF <metadata> element structure. More...
 
struct  OPFitem
 OPF element structure. More...
 
struct  OPFmanifest
 OPF <manifest> element structure. More...
 
struct  OPFspine
 OPF <spine> element structure. More...
 
struct  OPFreference
 OPF <reference> tag structure. More...
 
struct  OPFguide
 OPF <guide> element structure. More...
 
struct  OPF
 OPF <package> element structure. More...
 
struct  NCX
 NCX index entry structure. More...
 

Macros

#define OPF_META_MAX_TAGS   256
 Maximum number of opf meta tags.
 

Functions

MOBI_RET mobi_build_opf (MOBIRawml *rawml, const MOBIData *m)
 Recreate OPF structure. More...
 
MOBI_RET mobi_build_ncx (MOBIRawml *rawml, const OPF *opf)
 Parse ncx index, recreate ncx document and append it to rawml. 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_build_ncx()

MOBI_RET mobi_build_ncx ( MOBIRawml rawml,
const OPF opf 
)

Parse ncx index, recreate ncx document and append it to rawml.

Parameters
[in,out]rawmlMOBIRawml structure
[in]opfOPF structure to fetch some data
Returns
MOBI_RET status code (on success MOBI_SUCCESS)

◆ mobi_build_opf()

MOBI_RET mobi_build_opf ( MOBIRawml rawml,
const MOBIData m 
)

Recreate OPF structure.

This function will fill OPF structure with parsed index data and convert it to xml file. The file will be stored in MOBIRawml structure.

Parameters
[in,out]rawmlOPF xml file will be appended to rawml->markup linked list
[in]mMOBIData structure containing document metadata
Returns
MOBI_RET status code (on success MOBI_SUCCESS)