EBOOK-TOOLS: src/libepub/epublib.h File Reference

Classes | Defines | Enumerations | Functions | Variables

# epublib.h File Reference

`#include <stdlib.h>`
`#include <string.h>`
`#include <errno.h>`
`#include <zip.h>`
`#include <zlib.h>`
`#include <libxml/xmlreader.h>`
`#include "linklist.h"`
`#include "epub_shared.h"`
Include dependency graph for epublib.h:

Go to the source code of this file.

## Classes
struct | creator
struct | date
struct | eiterator
| private iterator struct More...
struct | epub
| private struct containting information about the epub file More...
struct | epuberr
struct | guide
struct | id
struct | manifest
struct | meta
struct | metadata
struct | ocf
struct | opf
struct | root
struct | site
struct | spine
struct | tit_info
struct | titerator
struct | toc
struct | tocCategory
struct | tocItem
struct | tocLabel
struct | tour
## Defines
#define | _epub_err_set_const_str(_err, _err_string)
#define | _epub_err_set_oom(_epub_err) _epub_err_set_const_str(_epub_err, _epub_error_oom)
#define | _epub_err_set_str(_err, _err_string, _err_string_len)
#define | CONTAINER_FILENAME "container.xml"
#define | ENCRYPTION_FILENAME "encryption.xml"
#define | MANIFEST_FILENAME "manifest.xml"
#define | METADATA_FILENAME "metadata.xml"
#define | METAINFO_DIR "META-INF"
#define | MIMETYPE_FILENAME "mimetype"
#define | PATH_SEPARATOR '/'
#define | PRINTF_FORMAT(si, ftc)
#define | RIGHTS_FILENAME "rights.xml"
#define | SIGNATURES_FILENAME "signatures.xml"
## Enumerations
enum | { DEBUG_NONE, DEBUG_ERROR, DEBUG_WARNING, DEBUG_INFO, DEBUG_VERBOSE }
## Functions
void | _epub_print_debug (struct epub *epub, int debug, const char *format,...) PRINTF_FORMAT(3
int | _list_cmp_label_by_lang (struct tocLabel *t1, struct tocLabel *t2)
int | _list_cmp_manifest_by_id (struct manifest *m1, struct manifest *m2)
int | _list_cmp_root_by_mediatype (struct root *root1, struct root *root2)
int | _list_cmp_toc_by_playorder (struct tocItem *t1, struct tocItem *t2)
void | _list_dump_creator (struct creator *data)
void | _list_dump_date (struct date *date)
void | _list_dump_guide (struct guide *guide)
void | _list_dump_id (struct id *id)
void | _list_dump_meta (struct meta *meta)
void | _list_dump_root (struct root *root)
void | _list_dump_spine (struct spine *spine)
void | _list_dump_string (char *string)
void | _list_dump_tour (struct tour *tour)
void | _list_free_creator (struct creator *data)
void | _list_free_date (struct date *date)
void | _list_free_guide (struct guide *guide)
void | _list_free_id (struct id *id)
void | _list_free_manifest (struct manifest *manifest)
void | _list_free_meta (struct meta *meta)
void | _list_free_root (struct root *data)
void | _list_free_spine (struct spine *spine)
void | _list_free_toc_item (struct tocItem *ti)
void | _list_free_toc_label (struct tocLabel *tl)
void | _list_free_tours (struct tour *tour)
int | _ocf_check_file (struct ocf *ocf, const char *filename)
void | _ocf_close (struct ocf *ocf)
void | _ocf_dump (struct ocf *ocf)
int | _ocf_get_data_file (struct ocf *ocf, const char *filename, char **fileStr)
int | _ocf_get_file (struct ocf *ocf, const char *filename, char **fileStr)
struct zip * | _ocf_open (struct ocf *ocf, const char *fileName)
struct ocf * | _ocf_parse (struct epub *epub, const char *filename)
int | _ocf_parse_container (struct ocf *ocf)
int | _ocf_parse_mimetype (struct ocf *ocf)
char * | _ocf_root_by_type (struct ocf *ocf, const char *type)
char * | _ocf_root_fullpath_by_type (struct ocf *ocf, const char *type)
void | _opf_close (struct opf *opf)
void | _opf_dump (struct opf *opf)
void | _opf_free_toc (struct toc *toc)
void | _opf_free_toc_category (struct tocCategory *tc)
struct toc * | _opf_init_toc ()
struct tocCategory * | _opf_init_toc_category ()
xmlChar * | _opf_label_get_by_doc_lang (struct opf *opf, listPtr label)
xmlChar * | _opf_label_get_by_lang (struct opf *opf, listPtr label, char *lang)
struct manifest * | _opf_manifest_get_by_id (struct opf *opf, xmlChar *id)
struct opf * | _opf_parse (struct epub *epub, char *opfStr)
void | _opf_parse_guide (struct opf *opf, xmlTextReaderPtr reader)
void | _opf_parse_manifest (struct opf *opf, xmlTextReaderPtr reader)
void | _opf_parse_metadata (struct opf *opf, xmlTextReaderPtr reader)
struct tocLabel * | _opf_parse_navlabel (struct opf *opf, xmlTextReaderPtr reader)
void | _opf_parse_navlist (struct opf *opf, xmlTextReaderPtr reader)
void | _opf_parse_navmap (struct opf *opf, xmlTextReaderPtr reader)
void | _opf_parse_pagelist (struct opf *opf, xmlTextReaderPtr reader)
void | _opf_parse_spine (struct opf *opf, xmlTextReaderPtr reader)
void | _opf_parse_toc (struct opf *opf, char *tocStr, int size)
void | _opf_parse_tours (struct opf *opf, xmlTextReaderPtr reader)
void char * | epub_last_errStr (struct epub *epub)
struct epub * | epub_open (const char *filename, int debug)
## Variables
const char | _epub_error_oom []

## Define Documentation

#define _epub_err_set_const_str | ( |  | _err,
|  |  | _err_string
| ) |  |

Value:

    do { \
        (_err)->str = _err_string; \
        (_err)->type = 1; \
      } while (0)

Definition at line 197 of file epublib.h.

#define _epub_err_set_oom | ( |  | _epub_err ) | _epub_err_set_const_str(_epub_err, _epub_error_oom)

Definition at line 209 of file epublib.h.

#define _epub_err_set_str | ( |  | _err,
|  |  | _err_string,
|  |  | _err_string_len
| ) |  |

Value:

    do { \
        strncpy((_err)->lastStr, _err_string, _err_string_len); \
        (_err)->len = _err_string_len; \
        (_err)->str = (_err)->lastStr; \
        (_err)->type = 0; \
      } while (0)

Definition at line 202 of file epublib.h.

#define CONTAINER_FILENAME "container.xml"

Definition at line 42 of file epublib.h.

#define ENCRYPTION_FILENAME "encryption.xml"

Definition at line 46 of file epublib.h.

#define MANIFEST_FILENAME "manifest.xml"

Definition at line 43 of file epublib.h.

#define METADATA_FILENAME "metadata.xml"

Definition at line 44 of file epublib.h.

#define METAINFO_DIR "META-INF"

Definition at line 40 of file epublib.h.

#define MIMETYPE_FILENAME "mimetype"

Definition at line 41 of file epublib.h.

#define PATH_SEPARATOR '/'

Definition at line 23 of file epublib.h.

#define PRINTF_FORMAT | ( |  | si,
|  |  | ftc
| ) |  |

Definition at line 29 of file epublib.h.

#define RIGHTS_FILENAME "rights.xml"

Definition at line 47 of file epublib.h.

#define SIGNATURES_FILENAME "signatures.xml"

Definition at line 45 of file epublib.h.

## Enumeration Type Documentation

anonymous enum

Enumerator:

  DEBUG_NONE |
  DEBUG_ERROR |
  DEBUG_WARNING |
  DEBUG_INFO |
  DEBUG_VERBOSE |

Definition at line 220 of file epublib.h.

## Function Documentation

void _epub_print_debug | ( | struct epub * | epub,
|  | int | debug,
|  | const char * | format,
|  |  | ...
| ) |  |

int _list_cmp_label_by_lang | ( | struct tocLabel * | t1,
|  | struct tocLabel * | t2
| ) |  |

int _list_cmp_manifest_by_id | ( | struct manifest * | m1,
|  | struct manifest * | m2
| ) |  |

int _list_cmp_root_by_mediatype | ( | struct root * | root1,
|  | struct root * | root2
| ) |  |

int _list_cmp_toc_by_playorder | ( | struct tocItem * | t1,
|  | struct tocItem * | t2
| ) |  |

void _list_dump_creator | ( | struct creator * | data ) |

void _list_dump_date | ( | struct date * | date ) |

void _list_dump_guide | ( | struct guide * | guide ) |

void _list_dump_id | ( | struct id * | id ) |

void _list_dump_meta | ( | struct meta * | meta ) |

void _list_dump_root | ( | struct root * | root ) |

void _list_dump_spine | ( | struct spine * | spine ) |

void _list_dump_string | ( | char * | string ) |

void _list_dump_tour | ( | struct tour * | tour ) |

void _list_free_creator | ( | struct creator * | data ) |

void _list_free_date | ( | struct date * | date ) |

void _list_free_guide | ( | struct guide * | guide ) |

void _list_free_id | ( | struct id * | id ) |

void _list_free_manifest | ( | struct manifest * | manifest ) |

void _list_free_meta | ( | struct meta * | meta ) |

void _list_free_root | ( | struct root * | data ) |

void _list_free_spine | ( | struct spine * | spine ) |

void _list_free_toc_item | ( | struct tocItem * | ti ) |

void _list_free_toc_label | ( | struct tocLabel * | tl ) |

void _list_free_tours | ( | struct tour * | tour ) |

int _ocf_check_file | ( | struct ocf * | ocf,
|  | const char * | filename
| ) |  |

void _ocf_close | ( | struct ocf * | ocf ) |

void _ocf_dump | ( | struct ocf * | ocf ) |

int _ocf_get_data_file | ( | struct ocf * | ocf,
|  | const char * | filename,
|  | char ** | fileStr
| ) |  |

int _ocf_get_file | ( | struct ocf * | ocf,
|  | const char * | filename,
|  | char ** | fileStr
| ) |  |

struct zip* _ocf_open | ( | struct ocf * | ocf,
|  | const char * | fileName
| ) |  | `[read]`

struct ocf* _ocf_parse | ( | struct epub * | epub,
|  | const char * | filename
| ) |  | `[read]`

int _ocf_parse_container | ( | struct ocf * | ocf ) |

int _ocf_parse_mimetype | ( | struct ocf * | ocf ) |

char* _ocf_root_by_type | ( | struct ocf * | ocf,
|  | const char * | type
| ) |  |

char* _ocf_root_fullpath_by_type | ( | struct ocf * | ocf,
|  | const char * | type
| ) |  |

void _opf_close | ( | struct opf * | opf ) |

void _opf_dump | ( | struct opf * | opf ) |

void _opf_free_toc | ( | struct toc * | toc ) |

void _opf_free_toc_category | ( | struct tocCategory * | tc ) |

struct toc* _opf_init_toc | ( | ) | `[read]`

struct tocCategory* _opf_init_toc_category | ( | ) | `[read]`

xmlChar* _opf_label_get_by_doc_lang | ( | struct opf * | opf,
|  | listPtr | label
| ) |  |

xmlChar* _opf_label_get_by_lang | ( | struct opf * | opf,
|  | listPtr | label,
|  | char * | lang
| ) |  |

struct manifest* _opf_manifest_get_by_id | ( | struct opf * | opf,
|  | xmlChar * | id
| ) |  | `[read]`

struct opf* _opf_parse | ( | struct epub * | epub,
|  | char * | opfStr
| ) |  | `[read]`

void _opf_parse_guide | ( | struct opf * | opf,
|  | xmlTextReaderPtr | reader
| ) |  |

void _opf_parse_manifest | ( | struct opf * | opf,
|  | xmlTextReaderPtr | reader
| ) |  |

void _opf_parse_metadata | ( | struct opf * | opf,
|  | xmlTextReaderPtr | reader
| ) |  |

struct tocLabel* _opf_parse_navlabel | ( | struct opf * | opf,
|  | xmlTextReaderPtr | reader
| ) |  | `[read]`

void _opf_parse_navlist | ( | struct opf * | opf,
|  | xmlTextReaderPtr | reader
| ) |  |

void _opf_parse_navmap | ( | struct opf * | opf,
|  | xmlTextReaderPtr | reader
| ) |  |

void _opf_parse_pagelist | ( | struct opf * | opf,
|  | xmlTextReaderPtr | reader
| ) |  |

void _opf_parse_spine | ( | struct opf * | opf,
|  | xmlTextReaderPtr | reader
| ) |  |

void _opf_parse_toc | ( | struct opf * | opf,
|  | char * | tocStr,
|  | int | size
| ) |  |

void _opf_parse_tours | ( | struct opf * | opf,
|  | xmlTextReaderPtr | reader
| ) |  |

void char* epub_last_errStr | ( | struct epub * | epub ) |

struct epub* epub_open | ( | const char * | filename,
|  | int | debug
| ) |  | `[read]`

## Variable Documentation

const char _epub_error_oom[]