#include <epub_shared.h>
Go to the source code of this file.
Functions | |
| EPUB_EXPORT void | epub_cleanup () |
| Cleans up after the library. | |
| EPUB_EXPORT int | epub_close (struct epub *epub) |
| This function closes a given epub. | |
| EPUB_EXPORT void | epub_dump (struct epub *epub) |
| Debugging function dumping various file information. | |
| EPUB_EXPORT void | epub_free_iterator (struct eiterator *it) |
| Frees the memory held by the given iterator. | |
| EPUB_EXPORT void | epub_free_titerator (struct titerator *tit) |
| Frees the memory held by the given iterator. | |
| EPUB_EXPORT int | epub_get_data (struct epub *epub, const char *name, char **data) |
| returns the file with the give filename. | |
| EPUB_EXPORT struct eiterator * | epub_get_iterator (struct epub *epub, enum eiterator_type type, int opt) |
| Returns a book iterator of the requested type for the given epub struct. | |
| EPUB_EXPORT unsigned char ** | epub_get_metadata (struct epub *epub, enum epub_metadata type, int *size) |
| (Bad xml might cause some of it to be NULL). | |
| EPUB_EXPORT int | epub_get_ocf_file (struct epub *epub, const char *filename, char **data) |
| returns the file with the give filename | |
| EPUB_EXPORT struct titerator * | epub_get_titerator (struct epub *epub, enum titerator_type type, int opt) |
| Returns a book toc iterator of the requested type for the given epub struct. | |
| EPUB_EXPORT char * | epub_it_get_curr (struct eiterator *it) |
| Returns a pointer to the iterator's data. | |
| EPUB_EXPORT char * | epub_it_get_curr_url (struct eiterator *it) |
| Returns a pointer to the url of the iterator's current data. | |
| EPUB_EXPORT char * | epub_it_get_next (struct eiterator *it) |
| updates the iterator to the next element and returns a pointer to the data. | |
| EPUB_EXPORT struct epub * | epub_open (const char *filename, int debug) |
| This function accepts an epub filename. | |
| EPUB_EXPORT void | epub_set_debug (struct epub *epub, int debug) |
| This function sets the debug level to the given level. | |
| EPUB_EXPORT int | epub_tit_curr_valid (struct titerator *tit) |
| Returns 1 if the current entry is valid and 0 otherwise. | |
| EPUB_EXPORT int | epub_tit_get_curr_depth (struct titerator *tit) |
| Returns a pointer to the depth of the toc iterator's current entry. | |
| EPUB_EXPORT char * | epub_tit_get_curr_label (struct titerator *tit) |
| Returns a pointer to the label of the toc iterator's current entry. | |
| EPUB_EXPORT char * | epub_tit_get_curr_link (struct titerator *tit) |
| Returns a pointer to the link of the toc iterator's current entry. | |
| EPUB_EXPORT int | epub_tit_next (struct titerator *tit) |
| updates the iterator to the next element. | |
| EPUB_EXPORT void epub_cleanup | ( | ) |
Cleans up after the library.
Call this when you are done with the library.
| EPUB_EXPORT int epub_close | ( | struct epub * | epub ) |
This function closes a given epub.
It also frees the epub struct. So you can use it after calling this function.
| epub | the struct of the epub to close. |
| EPUB_EXPORT void epub_dump | ( | struct epub * | epub ) |
Debugging function dumping various file information.
| epub | the struct of the epub to close. |
| EPUB_EXPORT void epub_free_iterator | ( | struct eiterator * | it ) |
Frees the memory held by the given iterator.
| it | the iterator |
| EPUB_EXPORT void epub_free_titerator | ( | struct titerator * | tit ) |
Frees the memory held by the given iterator.
| tit | the iterator |
| EPUB_EXPORT int epub_get_data | ( | struct epub * | epub, |
| const char * | name, | ||
| char ** | data | ||
| ) |
returns the file with the give filename.
The file is looked for in the data directory. (Useful for getting book files).
| epub | struct of the epub file we want to read from |
| filename | the name of the file we want to read |
| pointer | to where the file data is stored |
| EPUB_EXPORT struct eiterator* epub_get_iterator | ( | struct epub * | epub, |
| enum eiterator_type | type, | ||
| int | opt | ||
| ) | [read] |
Returns a book iterator of the requested type for the given epub struct.
| epub | struct of the epub file |
| type | the iterator type |
| opt | other options (ignored for now) |
| EPUB_EXPORT unsigned char** epub_get_metadata | ( | struct epub * | epub, |
| enum epub_metadata | type, | ||
| int * | size | ||
| ) |
(Bad xml might cause some of it to be NULL).
| epub | the struct . |
| EPUB_EXPORT int epub_get_ocf_file | ( | struct epub * | epub, |
| const char * | filename, | ||
| char ** | data | ||
| ) |
returns the file with the give filename
| epub | struct of the epub file we want to read from |
| filename | the name of the file we want to read |
| pointer | to where the file data is stored |
| EPUB_EXPORT struct titerator* epub_get_titerator | ( | struct epub * | epub, |
| enum titerator_type | type, | ||
| int | opt | ||
| ) | [read] |
Returns a book toc iterator of the requested type for the given epub struct.
| epub | struct of the epub file |
| type | the iterator type |
| opt | other options (ignored for now) |
| EPUB_EXPORT char* epub_it_get_curr | ( | struct eiterator * | it ) |
Returns a pointer to the iterator's data.
the iterator handles the freeing of the memory.
| it | the iterator |
| EPUB_EXPORT char* epub_it_get_curr_url | ( | struct eiterator * | it ) |
Returns a pointer to the url of the iterator's current data.
the iterator handles the freeing of the memory.
| it | the iterator |
| EPUB_EXPORT char* epub_it_get_next | ( | struct eiterator * | it ) |
updates the iterator to the next element and returns a pointer to the data.
the iterator handles the freeing of the memory.
| it | the iterator |
| EPUB_EXPORT struct epub* epub_open | ( | const char * | filename, |
| int | debug | ||
| ) | [read] |
This function accepts an epub filename.
It then parses its information and returns it as an epub struct.
| filename | the name of the file to open |
| debug | is the debug level (0=none, 1=errors, 2=warnings, 3=info) |
| EPUB_EXPORT void epub_set_debug | ( | struct epub * | epub, |
| int | debug | ||
| ) |
This function sets the debug level to the given level.
| filename | is the name of the file to open |
| debug | is the debug level (0=none, 1=errors, 2=warnings, 3=info) |
| EPUB_EXPORT int epub_tit_curr_valid | ( | struct titerator * | tit ) |
Returns 1 if the current entry is valid and 0 otherwise.
| tit | the iterator |
| EPUB_EXPORT int epub_tit_get_curr_depth | ( | struct titerator * | tit ) |
Returns a pointer to the depth of the toc iterator's current entry.
the iterator handles the freeing of the memory.
| tit | the iterator |
| EPUB_EXPORT char* epub_tit_get_curr_label | ( | struct titerator * | tit ) |
Returns a pointer to the label of the toc iterator's current entry.
the iterator handles the freeing of the memory.
| tit | the iterator |
| EPUB_EXPORT char* epub_tit_get_curr_link | ( | struct titerator * | tit ) |
Returns a pointer to the link of the toc iterator's current entry.
the iterator handles the freeing of the memory.
| tit | the iterator |
| EPUB_EXPORT int epub_tit_next | ( | struct titerator * | tit ) |
updates the iterator to the next element.
| tit | the iterator |
1.7.2