libmobi
C library for handling MOBI format ebook documents
|
Functions | |
MOBI_EXPORT const char * | mobi_version (void) |
Get libmobi version. More... | |
MOBI_EXPORT MOBI_RET | mobi_load_file (MOBIData *m, FILE *file) |
Read MOBI document from file into MOBIData structure. More... | |
MOBI_EXPORT MOBI_RET | mobi_load_filename (MOBIData *m, const char *path) |
Read MOBI document from a path into MOBIData structure. More... | |
MOBI_EXPORT MOBIData * | mobi_init (void) |
Initializer for MOBIData structure. More... | |
MOBI_EXPORT void | mobi_free (MOBIData *m) |
Free MOBIData structure and all its children. More... | |
MOBI_EXPORT MOBI_RET | mobi_parse_kf7 (MOBIData *m) |
Loader will parse KF7 part of hybrid file. More... | |
MOBI_EXPORT MOBI_RET | mobi_parse_kf8 (MOBIData *m) |
Loader will parse KF8 part of hybrid file. More... | |
MOBI_EXPORT MOBI_RET | mobi_parse_rawml (MOBIRawml *rawml, const MOBIData *m) |
Parse raw records into html flow parts, markup parts, resources and indices. More... | |
MOBI_EXPORT MOBI_RET | mobi_parse_rawml_opt (MOBIRawml *rawml, const MOBIData *m, bool parse_toc, bool parse_dict, bool reconstruct) |
Parse raw records into html flow parts, markup parts, resources and indices. Individual stages of the parsing may be turned on/off. More... | |
MOBI_EXPORT MOBI_RET | mobi_get_rawml (const MOBIData *m, char *text, size_t *len) |
Decompress text to a text buffer. More... | |
MOBI_EXPORT MOBI_RET | mobi_dump_rawml (const MOBIData *m, FILE *file) |
Decompress text record to an open file descriptor. More... | |
MOBI_EXPORT MOBI_RET | mobi_decode_font_resource (unsigned char **decoded_font, size_t *decoded_size, MOBIPart *part) |
Deobfuscator and decompressor for font resources. More... | |
MOBI_EXPORT MOBI_RET | mobi_decode_audio_resource (unsigned char **decoded_resource, size_t *decoded_size, MOBIPart *part) |
Decode audio resource. More... | |
MOBI_EXPORT MOBI_RET | mobi_decode_video_resource (unsigned char **decoded_resource, size_t *decoded_size, MOBIPart *part) |
Decode video resource. More... | |
MOBI_EXPORT MOBI_RET | mobi_get_embedded_source (unsigned char **data, size_t *size, const MOBIData *m) |
Get embedded source archive. More... | |
MOBI_EXPORT MOBI_RET | mobi_get_embedded_log (unsigned char **data, size_t *size, const MOBIData *m) |
Get embedded conversion log. More... | |
MOBI_EXPORT MOBIPdbRecord * | mobi_get_record_by_uid (const MOBIData *m, const size_t uid) |
Get palm database record with given unique id. More... | |
MOBI_EXPORT MOBIPdbRecord * | mobi_get_record_by_seqnumber (const MOBIData *m, const size_t uid) |
Get palm database record with given sequential number (first record has number 0) More... | |
MOBI_EXPORT MOBIPart * | mobi_get_flow_by_uid (const MOBIRawml *rawml, const size_t uid) |
Get rawml->flow MOBIPart part by uid. More... | |
MOBI_EXPORT MOBIPart * | mobi_get_flow_by_fid (const MOBIRawml *rawml, const char *fid) |
Find flow part by flow id (fid) from kindle:flow:fid link. Flow fid is base32 encoded part uid. More... | |
MOBI_EXPORT MOBIPart * | mobi_get_resource_by_uid (const MOBIRawml *rawml, const size_t uid) |
Get MOBIPart resource record with given unique id. More... | |
MOBI_EXPORT MOBIPart * | mobi_get_resource_by_fid (const MOBIRawml *rawml, const char *fid) |
Find resource by flow id (fid) from kindle:embed:fid link. Flow fid is base32 encoded part uid. More... | |
MOBI_EXPORT MOBIPart * | mobi_get_part_by_uid (const MOBIRawml *rawml, const size_t uid) |
Get rawml->markup MOBIPart part by uid. More... | |
MOBI_EXPORT MOBI_RET | mobi_get_fullname (const MOBIData *m, char *fullname, const size_t len) |
Get ebook full name stored in Record 0 at offset given in MOBI header. More... | |
MOBI_EXPORT size_t | mobi_get_first_resource_record (const MOBIData *m) |
Get sequential number of first resource record (image/font etc) More... | |
MOBI_EXPORT size_t | mobi_get_text_maxsize (const MOBIData *m) |
Get maximal size of all uncompressed text records. More... | |
MOBI_EXPORT uint16_t | mobi_get_textrecord_maxsize (const MOBIData *m) |
Get maximal size of uncompressed text record. More... | |
MOBI_EXPORT size_t | mobi_get_kf8offset (const MOBIData *m) |
Get offset of KF8 Boundary for KF7/KF8 hybrid file cached in MOBIData structure. More... | |
MOBI_EXPORT size_t | mobi_get_kf8boundary_seqnumber (const MOBIData *m) |
Get sequential number of KF8 Boundary record for KF7/KF8 hybrid file. More... | |
MOBI_EXPORT size_t | mobi_get_record_extrasize (const MOBIPdbRecord *record, const uint16_t flags) |
Calculate the size of extra bytes at the end of text record. More... | |
MOBI_EXPORT size_t | mobi_get_record_mb_extrasize (const MOBIPdbRecord *record, const uint16_t flags) |
Calculate the size of extra multibyte section at the end of text record. More... | |
MOBI_EXPORT size_t | mobi_get_fileversion (const MOBIData *m) |
Get mobi file version. More... | |
MOBI_EXPORT size_t | mobi_get_fdst_record_number (const MOBIData *m) |
Get sequential number of FDST record. More... | |
MOBI_EXPORT MOBIExthHeader * | mobi_get_exthrecord_by_tag (const MOBIData *m, const MOBIExthTag tag) |
Get EXTH record with given MOBIExthTag tag. More... | |
MOBI_EXPORT MOBIExthHeader * | mobi_next_exthrecord_by_tag (const MOBIData *m, const MOBIExthTag tag, MOBIExthHeader **start) |
Get EXTH record with given MOBIExthTag tag. Start list search at given record. More... | |
MOBI_EXPORT MOBI_RET | mobi_delete_exthrecord_by_tag (MOBIData *m, const MOBIExthTag tag) |
Delete all EXTH records with given MOBIExthTag tag. More... | |
MOBI_EXPORT MOBI_RET | mobi_add_exthrecord (MOBIData *m, const MOBIExthTag tag, const uint32_t size, const void *value) |
Add new EXTH record with given tag and value. More... | |
MOBI_EXPORT MOBIExthMeta | mobi_get_exthtagmeta_by_tag (const MOBIExthTag tag) |
Get MOBIExthMeta tag structure by MOBIExthTag tag id. More... | |
MOBI_EXPORT MOBIFileMeta | mobi_get_filemeta_by_type (const MOBIFiletype type) |
Get MOBIFileMeta tag structure by MOBIFiletype type. More... | |
MOBI_EXPORT uint32_t | mobi_decode_exthvalue (const unsigned char *data, const size_t size) |
Decode big-endian value stored in EXTH record. More... | |
MOBI_EXPORT char * | mobi_decode_exthstring (const MOBIData *m, const unsigned char *data, const size_t size) |
Decode string stored in EXTH record. More... | |
MOBI_EXPORT struct tm * | mobi_pdbtime_to_time (const long pdb_time) |
Convert time values from palmdoc header to time tm struct. More... | |
MOBI_EXPORT const char * | mobi_get_locale_string (const uint32_t locale) |
Get pointer to locale tag for a given Mobipocket locale number. More... | |
MOBI_EXPORT size_t | mobi_get_locale_number (const char *locale_string) |
Get Mobipocket locale number for a given string tag. More... | |
MOBI_EXPORT uint32_t | mobi_get_orth_entry_offset (const MOBIIndexEntry *entry) |
Get entry start offset for the orth entry. More... | |
MOBI_EXPORT uint32_t | mobi_get_orth_entry_length (const MOBIIndexEntry *entry) |
Get text length for the orth entry. More... | |
MOBI_EXPORT MOBI_RET | mobi_remove_hybrid_part (MOBIData *m, const bool remove_kf8) |
Remove one version from hybrid file. More... | |
MOBI_EXPORT bool | mobi_exists_mobiheader (const MOBIData *m) |
Check if MOBI header is loaded / present in the loaded file. More... | |
MOBI_EXPORT bool | mobi_exists_fdst (const MOBIData *m) |
Check if FDST record is present in the loaded file. More... | |
MOBI_EXPORT bool | mobi_exists_skel_indx (const MOBIData *m) |
Check if skeleton INDX is present in the loaded file. More... | |
MOBI_EXPORT bool | mobi_exists_frag_indx (const MOBIData *m) |
Check if fragments INDX is present in the loaded file. More... | |
MOBI_EXPORT bool | mobi_exists_guide_indx (const MOBIData *m) |
Check if guide INDX is present in the loaded file. More... | |
MOBI_EXPORT bool | mobi_exists_ncx (const MOBIData *m) |
Check if ncx INDX is present in the loaded file. More... | |
MOBI_EXPORT bool | mobi_exists_orth (const MOBIData *m) |
Check if orth INDX is present in the loaded file. More... | |
MOBI_EXPORT bool | mobi_exists_infl (const MOBIData *m) |
Check if infl INDX is present in the loaded file. More... | |
MOBI_EXPORT bool | mobi_is_hybrid (const MOBIData *m) |
Check if loaded MOBI data is KF7/KF8 hybrid file. More... | |
MOBI_EXPORT bool | mobi_is_encrypted (const MOBIData *m) |
Check if loaded document is encrypted. More... | |
MOBI_EXPORT bool | mobi_is_mobipocket (const MOBIData *m) |
Check if loaded document is MOBI/BOOK Mobipocket format. More... | |
MOBI_EXPORT bool | mobi_is_dictionary (const MOBIData *m) |
Check if loaded document is dictionary. More... | |
MOBI_EXPORT bool | mobi_is_kf8 (const MOBIData *m) |
Is file version 8 or above. More... | |
MOBI_EXPORT bool | mobi_is_replica (const MOBIData *m) |
Check if loaded document is Print Replica type. More... | |
MOBI_EXPORT bool | mobi_is_rawml_kf8 (const MOBIRawml *rawml) |
Is file version 8 or above. More... | |
MOBI_EXPORT MOBIRawml * | mobi_init_rawml (const MOBIData *m) |
Initialize and return MOBIRawml structure. More... | |
MOBI_EXPORT void | mobi_free_rawml (MOBIRawml *rawml) |
Free MOBIRawml structure allocated by mobi_init_rawml() More... | |
MOBI_EXPORT char * | mobi_meta_get_title (const MOBIData *m) |
Get document title metadata. More... | |
MOBI_EXPORT char * | mobi_meta_get_author (const MOBIData *m) |
Get document author metadata. More... | |
MOBI_EXPORT char * | mobi_meta_get_publisher (const MOBIData *m) |
Get document publisher metadata. More... | |
MOBI_EXPORT char * | mobi_meta_get_imprint (const MOBIData *m) |
Get document imprint metadata. More... | |
MOBI_EXPORT char * | mobi_meta_get_description (const MOBIData *m) |
Get document description metadata. More... | |
MOBI_EXPORT char * | mobi_meta_get_isbn (const MOBIData *m) |
Get document ISBN metadata. More... | |
MOBI_EXPORT char * | mobi_meta_get_subject (const MOBIData *m) |
Get document subject metadata. More... | |
MOBI_EXPORT char * | mobi_meta_get_publishdate (const MOBIData *m) |
Get document publishing date metadata. More... | |
MOBI_EXPORT char * | mobi_meta_get_review (const MOBIData *m) |
Get document review metadata. More... | |
MOBI_EXPORT char * | mobi_meta_get_contributor (const MOBIData *m) |
Get document contributor metadata. More... | |
MOBI_EXPORT char * | mobi_meta_get_copyright (const MOBIData *m) |
Get document copyright metadata. More... | |
MOBI_EXPORT char * | mobi_meta_get_asin (const MOBIData *m) |
Get document ASIN metadata. More... | |
MOBI_EXPORT char * | mobi_meta_get_language (const MOBIData *m) |
Get document language code metadata. More... | |
MOBI_EXPORT MOBI_RET | mobi_meta_set_title (MOBIData *m, const char *title) |
Set document title metadata. More... | |
MOBI_EXPORT MOBI_RET | mobi_meta_add_title (MOBIData *m, const char *title) |
Add document title metadata. More... | |
MOBI_EXPORT MOBI_RET | mobi_meta_delete_title (MOBIData *m) |
Delete all title metadata. More... | |
MOBI_EXPORT MOBI_RET | mobi_meta_set_author (MOBIData *m, const char *author) |
Set document author metadata. More... | |
MOBI_EXPORT MOBI_RET | mobi_meta_add_author (MOBIData *m, const char *author) |
Add document author metadata. More... | |
MOBI_EXPORT MOBI_RET | mobi_meta_delete_author (MOBIData *m) |
Delete all author metadata. More... | |
MOBI_EXPORT MOBI_RET | mobi_meta_set_publisher (MOBIData *m, const char *publisher) |
Set document publisher metadata. More... | |
MOBI_EXPORT MOBI_RET | mobi_meta_add_publisher (MOBIData *m, const char *publisher) |
Add document publisher metadata. More... | |
MOBI_EXPORT MOBI_RET | mobi_meta_delete_publisher (MOBIData *m) |
Delete all publisher metadata. More... | |
MOBI_EXPORT MOBI_RET | mobi_meta_set_imprint (MOBIData *m, const char *imprint) |
Set document imprint metadata. More... | |
MOBI_EXPORT MOBI_RET | mobi_meta_add_imprint (MOBIData *m, const char *imprint) |
Add document imprint metadata. More... | |
MOBI_EXPORT MOBI_RET | mobi_meta_delete_imprint (MOBIData *m) |
Delete all imprint metadata. More... | |
MOBI_EXPORT MOBI_RET | mobi_meta_set_description (MOBIData *m, const char *description) |
Set document description metadata. More... | |
MOBI_EXPORT MOBI_RET | mobi_meta_add_description (MOBIData *m, const char *description) |
Add document description metadata. More... | |
MOBI_EXPORT MOBI_RET | mobi_meta_delete_description (MOBIData *m) |
Delete all description metadata. More... | |
MOBI_EXPORT MOBI_RET | mobi_meta_set_isbn (MOBIData *m, const char *isbn) |
Set document isbn metadata. More... | |
MOBI_EXPORT MOBI_RET | mobi_meta_add_isbn (MOBIData *m, const char *isbn) |
Add document isbn metadata. More... | |
MOBI_EXPORT MOBI_RET | mobi_meta_delete_isbn (MOBIData *m) |
Delete all isbn metadata. More... | |
MOBI_EXPORT MOBI_RET | mobi_meta_set_subject (MOBIData *m, const char *subject) |
Set document subject metadata. More... | |
MOBI_EXPORT MOBI_RET | mobi_meta_add_subject (MOBIData *m, const char *subject) |
Add document subject metadata. More... | |
MOBI_EXPORT MOBI_RET | mobi_meta_delete_subject (MOBIData *m) |
Delete all subject metadata. More... | |
MOBI_EXPORT MOBI_RET | mobi_meta_set_publishdate (MOBIData *m, const char *publishdate) |
Set document publishdate metadata. More... | |
MOBI_EXPORT MOBI_RET | mobi_meta_add_publishdate (MOBIData *m, const char *publishdate) |
Add document publishdate metadata. More... | |
MOBI_EXPORT MOBI_RET | mobi_meta_delete_publishdate (MOBIData *m) |
Delete all publishdate metadata. More... | |
MOBI_EXPORT MOBI_RET | mobi_meta_set_review (MOBIData *m, const char *review) |
Set document review metadata. More... | |
MOBI_EXPORT MOBI_RET | mobi_meta_add_review (MOBIData *m, const char *review) |
Add document review metadata. More... | |
MOBI_EXPORT MOBI_RET | mobi_meta_delete_review (MOBIData *m) |
Delete all review metadata. More... | |
MOBI_EXPORT MOBI_RET | mobi_meta_set_contributor (MOBIData *m, const char *contributor) |
Set document contributor metadata. More... | |
MOBI_EXPORT MOBI_RET | mobi_meta_add_contributor (MOBIData *m, const char *contributor) |
Add document contributor metadata. More... | |
MOBI_EXPORT MOBI_RET | mobi_meta_delete_contributor (MOBIData *m) |
Delete all contributor metadata. More... | |
MOBI_EXPORT MOBI_RET | mobi_meta_set_copyright (MOBIData *m, const char *copyright) |
Set document copyright metadata. More... | |
MOBI_EXPORT MOBI_RET | mobi_meta_add_copyright (MOBIData *m, const char *copyright) |
Add document copyright metadata. More... | |
MOBI_EXPORT MOBI_RET | mobi_meta_delete_copyright (MOBIData *m) |
Delete all copyright metadata. More... | |
MOBI_EXPORT MOBI_RET | mobi_meta_set_asin (MOBIData *m, const char *asin) |
Set document asin metadata. More... | |
MOBI_EXPORT MOBI_RET | mobi_meta_add_asin (MOBIData *m, const char *asin) |
Add document asin metadata. More... | |
MOBI_EXPORT MOBI_RET | mobi_meta_delete_asin (MOBIData *m) |
Delete all asin metadata. More... | |
MOBI_EXPORT MOBI_RET | mobi_meta_set_language (MOBIData *m, const char *language) |
Set document language code metadata. More... | |
MOBI_EXPORT MOBI_RET | mobi_meta_add_language (MOBIData *m, const char *language) |
Add document language code metadata. More... | |
MOBI_EXPORT MOBI_RET | mobi_meta_delete_language (MOBIData *m) |
Delete all language code metadata. More... | |
MOBI_EXPORT MOBI_RET | mobi_drm_setkey (MOBIData *m, const char *pid) |
Store PID for encryption in MOBIData stucture. More... | |
MOBI_EXPORT MOBI_RET | mobi_drm_setkey_serial (MOBIData *m, const char *serial) |
Store PID for encryption in MOBIData stucture. PID will be calculated from device serial number. More... | |
MOBI_EXPORT MOBI_RET | mobi_drm_addvoucher (MOBIData *m, const char *serial, const time_t valid_from, const time_t valid_to, const MOBIExthTag *tamperkeys, const size_t tamperkeys_count) |
Add DRM voucher. More... | |
MOBI_EXPORT MOBI_RET | mobi_drm_delkey (MOBIData *m) |
Remove PID stored for encryption from MOBIData structure. More... | |
MOBI_EXPORT MOBI_RET | mobi_drm_decrypt (MOBIData *m) |
Decrypt document. More... | |
MOBI_EXPORT MOBI_RET | mobi_drm_encrypt (MOBIData *m) |
Encrypt document. More... | |
MOBI_EXPORT MOBI_RET | mobi_write_file (FILE *file, MOBIData *m) |
Write mobi document to file. More... | |
MOBI_EXPORT MOBI_RET mobi_add_exthrecord | ( | MOBIData * | m, |
const MOBIExthTag | tag, | ||
const uint32_t | size, | ||
const void * | value | ||
) |
Add new EXTH record with given tag and value.
[in,out] | m | MOBIData structure with loaded data |
[in] | tag | MOBIExthTag EXTH record tag |
[in] | size | Value size |
[in] | value | Value |
MOBI_EXPORT MOBI_RET mobi_decode_audio_resource | ( | unsigned char ** | decoded_resource, |
size_t * | decoded_size, | ||
MOBIPart * | part | ||
) |
Decode audio resource.
[in,out] | decoded_resource | Pointer to data offset in mobipocket record. |
[in,out] | decoded_size | Decoded resource data size |
[in,out] | part | MOBIPart structure containing resource, decoded part type will be set in the structure |
MOBI_EXPORT char* mobi_decode_exthstring | ( | const MOBIData * | m, |
const unsigned char * | data, | ||
const size_t | size | ||
) |
MOBI_EXPORT uint32_t mobi_decode_exthvalue | ( | const unsigned char * | data, |
const size_t | size | ||
) |
Decode big-endian value stored in EXTH record.
Only for EXTH records storing numeric values
[in] | data | Memory area storing EXTH record data |
[in] | size | Size of EXTH record data |
MOBI_EXPORT MOBI_RET mobi_decode_font_resource | ( | unsigned char ** | decoded_font, |
size_t * | decoded_size, | ||
MOBIPart * | part | ||
) |
Deobfuscator and decompressor for font resources.
[in,out] | decoded_font | Pointer to memory to write to. Will be allocated. Must be freed by caller |
[in,out] | decoded_size | Decoded font data size |
[in,out] | part | MOBIPart structure containing font resource, decoded part type will be set in the structure |
MOBI_EXPORT MOBI_RET mobi_decode_video_resource | ( | unsigned char ** | decoded_resource, |
size_t * | decoded_size, | ||
MOBIPart * | part | ||
) |
Decode video resource.
[in,out] | decoded_resource | Pointer to data offset in mobipocket record. |
[in,out] | decoded_size | Decoded resource data size |
[in,out] | part | MOBIPart structure containing resource, decoded part type will be set in the structure |
MOBI_EXPORT MOBI_RET mobi_delete_exthrecord_by_tag | ( | MOBIData * | m, |
const MOBIExthTag | tag | ||
) |
Delete all EXTH records with given MOBIExthTag tag.
[in,out] | m | MOBIData structure with loaded data |
[in] | tag | MOBIExthTag EXTH record tag |
MOBI_EXPORT MOBI_RET mobi_drm_addvoucher | ( | MOBIData * | m, |
const char * | serial, | ||
const time_t | valid_from, | ||
const time_t | valid_to, | ||
const MOBIExthTag * | tamperkeys, | ||
const size_t | tamperkeys_count | ||
) |
Add DRM voucher.
DRM vouncher will be used to generate pid key which is used to encrypt main encryption key. Pid key is based on device serial number. Optionally it is possible to set validity of the key. The key will be valid only within the period. Optionally the pid key may be generated not only from serial number but also from contents of selected EXTH headers. In such case the headers should be added (
[in,out] | m | MOBIData structure with raw data and metadata |
[in] | serial | Device serial number |
[in] | valid_from | DRM validity start time, -1 if not set |
[in] | valid_to | DRM validity end time, -1 if not set |
[in] | tamperkeys | Array of EXTH tags to include in PID generation, NULL if none |
[in] | tamperkeys_count | Count of EXTH tags |
MOBI_EXPORT MOBI_RET mobi_drm_decrypt | ( | MOBIData * | m | ) |
Decrypt document.
It is not necessary to call this function in order to parse encrypted document. If pid is set document will be decrypted automatically during uncompression. The reason for this function is to load and resave decrypted document without parsing.
[in,out] | m | MOBIData structure with raw data and metadata |
MOBI_EXPORT MOBI_RET mobi_drm_delkey | ( | MOBIData * | m | ) |
MOBI_EXPORT MOBI_RET mobi_drm_encrypt | ( | MOBIData * | m | ) |
Encrypt document.
DRM vouchers must be added in order to use device serial number in encryption
[in,out] | m | MOBIData structure with raw data and metadata |
MOBI_EXPORT MOBI_RET mobi_drm_setkey | ( | MOBIData * | m, |
const char * | pid | ||
) |
MOBI_EXPORT MOBI_RET mobi_drm_setkey_serial | ( | MOBIData * | m, |
const char * | serial | ||
) |
MOBI_EXPORT MOBI_RET mobi_dump_rawml | ( | const MOBIData * | m, |
FILE * | file | ||
) |
Decompress text record to an open file descriptor.
Internal function for mobi_get_rawml and mobi_dump_rawml. Decompressed output is stored either in a file or in a text string
[in] | m | MOBIData structure loaded with MOBI data |
[in,out] | file | File descriptor |
MOBI_EXPORT bool mobi_exists_fdst | ( | const MOBIData * | m | ) |
Check if FDST record is present in the loaded file.
[in] | m | MOBIData structure loaded with MOBI data |
MOBI_EXPORT bool mobi_exists_frag_indx | ( | const MOBIData * | m | ) |
Check if fragments INDX is present in the loaded file.
[in] | m | MOBIData structure loaded with MOBI data |
MOBI_EXPORT bool mobi_exists_guide_indx | ( | const MOBIData * | m | ) |
Check if guide INDX is present in the loaded file.
[in] | m | MOBIData structure loaded with MOBI data |
MOBI_EXPORT bool mobi_exists_infl | ( | const MOBIData * | m | ) |
Check if infl INDX is present in the loaded file.
[in] | m | MOBIData structure loaded with MOBI data |
MOBI_EXPORT bool mobi_exists_mobiheader | ( | const MOBIData * | m | ) |
Check if MOBI header is loaded / present in the loaded file.
[in] | m | MOBIData structure loaded with MOBI data |
MOBI_EXPORT bool mobi_exists_ncx | ( | const MOBIData * | m | ) |
Check if ncx INDX is present in the loaded file.
[in] | m | MOBIData structure loaded with MOBI data |
MOBI_EXPORT bool mobi_exists_orth | ( | const MOBIData * | m | ) |
Check if orth INDX is present in the loaded file.
[in] | m | MOBIData structure loaded with MOBI data |
MOBI_EXPORT bool mobi_exists_skel_indx | ( | const MOBIData * | m | ) |
Check if skeleton INDX is present in the loaded file.
[in] | m | MOBIData structure loaded with MOBI data |
MOBI_EXPORT void mobi_free | ( | MOBIData * | m | ) |
MOBI_EXPORT void mobi_free_rawml | ( | MOBIRawml * | rawml | ) |
Free MOBIRawml structure allocated by mobi_init_rawml()
Pointer to data may point to memory area also used by record->data. So we need a flag to leave the memory allocated, while freeing MOBIPart structure
[in] | rawml | MOBIRawml structure |
MOBI_EXPORT MOBI_RET mobi_get_embedded_log | ( | unsigned char ** | data, |
size_t * | size, | ||
const MOBIData * | m | ||
) |
Get embedded conversion log.
Some mobi creator software store original conversion log together with source archive. The function may return MOBI_SUCCESS even if the data was not found, so it is neccessary to check whether returned data pointer is not NULL.
[in,out] | data | Pointer to data offset in pdb record. |
[in,out] | size | Pointer to data size |
[in] | m | MOBIData structure |
MOBI_EXPORT MOBI_RET mobi_get_embedded_source | ( | unsigned char ** | data, |
size_t * | size, | ||
const MOBIData * | m | ||
) |
Get embedded source archive.
Some mobi creator software store original conversion source as a zip archive. The function may return MOBI_SUCCESS even if the data was not found, so it is neccessary to check whether returned data pointer is not NULL.
[in,out] | data | Pointer to data offset in pdb record. |
[in,out] | size | Pointer to data size |
[in] | m | MOBIData structure |
MOBI_EXPORT MOBIExthHeader* mobi_get_exthrecord_by_tag | ( | const MOBIData * | m, |
const MOBIExthTag | tag | ||
) |
Get EXTH record with given MOBIExthTag tag.
[in] | m | MOBIData structure with loaded data |
[in] | tag | MOBIExthTag EXTH record tag |
MOBI_EXPORT MOBIExthMeta mobi_get_exthtagmeta_by_tag | ( | const MOBIExthTag | tag | ) |
Get MOBIExthMeta tag structure by MOBIExthTag tag id.
[in] | tag | Tag id |
MOBI_EXPORT size_t mobi_get_fdst_record_number | ( | const MOBIData * | m | ) |
Get sequential number of FDST record.
[in] | m | MOBIData structure loaded with MOBI data |
MOBI_EXPORT MOBIFileMeta mobi_get_filemeta_by_type | ( | const MOBIFiletype | type | ) |
Get MOBIFileMeta tag structure by MOBIFiletype type.
[in] | type | MOBIFiletype type |
MOBI_EXPORT size_t mobi_get_fileversion | ( | const MOBIData * | m | ) |
MOBI_EXPORT size_t mobi_get_first_resource_record | ( | const MOBIData * | m | ) |
Get sequential number of first resource record (image/font etc)
[in] | m | MOBIData structure with loaded Record(s) 0 headers |
MOBI_EXPORT MOBIPart* mobi_get_flow_by_fid | ( | const MOBIRawml * | rawml, |
const char * | fid | ||
) |
MOBI_EXPORT MOBIPart* mobi_get_flow_by_uid | ( | const MOBIRawml * | rawml, |
const size_t | uid | ||
) |
MOBI_EXPORT MOBI_RET mobi_get_fullname | ( | const MOBIData * | m, |
char * | fullname, | ||
const size_t | len | ||
) |
Get ebook full name stored in Record 0 at offset given in MOBI header.
[in] | m | MOBIData structure with loaded data |
[in,out] | fullname | Memory area to be filled with zero terminated full name string |
[in] | len | Maximum length of the string without null terminator |
MOBI_EXPORT size_t mobi_get_kf8boundary_seqnumber | ( | const MOBIData * | m | ) |
Get sequential number of KF8 Boundary record for KF7/KF8 hybrid file.
This function gets KF8 boundary offset from EXTH header
[in] | m | MOBIData structure |
MOBI_EXPORT size_t mobi_get_kf8offset | ( | const MOBIData * | m | ) |
MOBI_EXPORT size_t mobi_get_locale_number | ( | const char * | locale_string | ) |
Get Mobipocket locale number for a given string tag.
Locale strings are based on IANA language-subtag registry with some custom Mobipocket modifications. See mobi_locale array.
[in] | locale_string | Locale string tag |
MOBI_EXPORT const char* mobi_get_locale_string | ( | const uint32_t | locale_number | ) |
Get pointer to locale tag for a given Mobipocket locale number.
Locale strings are based on IANA language-subtag registry with some custom Mobipocket modifications. See mobi_locale array.
[in] | locale_number | Mobipocket locale number (as stored in MOBI header) |
MOBI_EXPORT uint32_t mobi_get_orth_entry_length | ( | const MOBIIndexEntry * | entry | ) |
Get text length for the orth entry.
[in] | entry | MOBIIndexEntry structure |
MOBI_EXPORT uint32_t mobi_get_orth_entry_offset | ( | const MOBIIndexEntry * | entry | ) |
Get entry start offset for the orth entry.
[in] | entry | MOBIIndexEntry structure |
MOBI_EXPORT MOBIPart* mobi_get_part_by_uid | ( | const MOBIRawml * | rawml, |
const size_t | uid | ||
) |
MOBI_EXPORT MOBI_RET mobi_get_rawml | ( | const MOBIData * | m, |
char * | text, | ||
size_t * | len | ||
) |
Decompress text to a text buffer.
[in] | m | MOBIData structure loaded with MOBI data |
[in,out] | text | Memory area to be filled with decompressed output |
[in,out] | len | Length of the memory allocated for the text string, on return will be set to decompressed text length |
MOBI_EXPORT MOBIPdbRecord* mobi_get_record_by_seqnumber | ( | const MOBIData * | m, |
const size_t | num | ||
) |
Get palm database record with given sequential number (first record has number 0)
[in] | m | MOBIData structure with loaded data |
[in] | num | Sequential number |
MOBI_EXPORT MOBIPdbRecord* mobi_get_record_by_uid | ( | const MOBIData * | m, |
const size_t | uid | ||
) |
Get palm database record with given unique id.
[in] | m | MOBIData structure with loaded data |
[in] | uid | Unique id |
MOBI_EXPORT size_t mobi_get_record_extrasize | ( | const MOBIPdbRecord * | record, |
const uint16_t | flags | ||
) |
Calculate the size of extra bytes at the end of text record.
[in] | record | MOBIPdbRecord structure containing the record |
[in] | flags | Flags from MOBI header (extra_flags) |
MOBI_EXPORT size_t mobi_get_record_mb_extrasize | ( | const MOBIPdbRecord * | record, |
const uint16_t | flags | ||
) |
Calculate the size of extra multibyte section at the end of text record.
[in] | record | MOBIPdbRecord structure containing the record |
[in] | flags | Flags from MOBI header (extra_flags) |
MOBI_EXPORT MOBIPart* mobi_get_resource_by_fid | ( | const MOBIRawml * | rawml, |
const char * | fid | ||
) |
MOBI_EXPORT MOBIPart* mobi_get_resource_by_uid | ( | const MOBIRawml * | rawml, |
const size_t | uid | ||
) |
MOBI_EXPORT size_t mobi_get_text_maxsize | ( | const MOBIData * | m | ) |
Get maximal size of all uncompressed text records.
[in] | m | MOBIData structure with loaded Record(s) 0 headers |
MOBI_EXPORT uint16_t mobi_get_textrecord_maxsize | ( | const MOBIData * | m | ) |
Get maximal size of uncompressed text record.
[in] | m | MOBIData structure with loaded Record(s) 0 headers |
MOBI_EXPORT MOBIData* mobi_init | ( | void | ) |
Initializer for MOBIData structure.
It allocates memory for structure. Memory should be freed with mobi_free().
MOBI_EXPORT MOBIRawml* mobi_init_rawml | ( | const MOBIData * | m | ) |
Initialize and return MOBIRawml structure.
MOBIRawml structure holds parsed text record metadata. It is used in the process of parsing rawml text data. It must be freed with mobi_free_rawml().
[in] | m | Initialized MOBIData structure |
MOBI_EXPORT bool mobi_is_dictionary | ( | const MOBIData * | m | ) |
MOBI_EXPORT bool mobi_is_encrypted | ( | const MOBIData * | m | ) |
MOBI_EXPORT bool mobi_is_hybrid | ( | const MOBIData * | m | ) |
Check if loaded MOBI data is KF7/KF8 hybrid file.
[in] | m | MOBIData structure with loaded Record(s) 0 headers |
MOBI_EXPORT bool mobi_is_kf8 | ( | const MOBIData * | m | ) |
Is file version 8 or above.
[in] | m | MOBIData structure with loaded Record(s) 0 headers |
MOBI_EXPORT bool mobi_is_mobipocket | ( | const MOBIData * | m | ) |
Check if loaded document is MOBI/BOOK Mobipocket format.
[in] | m | MOBIData structure with loaded Record(s) 0 headers |
MOBI_EXPORT bool mobi_is_rawml_kf8 | ( | const MOBIRawml * | rawml | ) |
Is file version 8 or above.
[in] | rawml | MOBIRawml structure with parsed document |
MOBI_EXPORT bool mobi_is_replica | ( | const MOBIData * | m | ) |
Check if loaded document is Print Replica type.
[in] | m | MOBIData structure with loaded Record(s) 0 headers |
MOBI_EXPORT MOBI_RET mobi_load_file | ( | MOBIData * | m, |
FILE * | file | ||
) |
Read MOBI document from file into MOBIData structure.
[in,out] | m | MOBIData structure to be filled with read data |
[in] | file | File descriptor to read from |
MOBI_EXPORT MOBI_RET mobi_load_filename | ( | MOBIData * | m, |
const char * | path | ||
) |
MOBI_EXPORT MOBI_RET mobi_meta_add_asin | ( | MOBIData * | m, |
const char * | asin | ||
) |
Add document asin metadata.
[in,out] | m | MOBIData structure with loaded data |
[in] | asin | String value |
MOBI_EXPORT MOBI_RET mobi_meta_add_author | ( | MOBIData * | m, |
const char * | author | ||
) |
Add document author metadata.
[in,out] | m | MOBIData structure with loaded data |
[in] | author | String value |
MOBI_EXPORT MOBI_RET mobi_meta_add_contributor | ( | MOBIData * | m, |
const char * | contributor | ||
) |
Add document contributor metadata.
[in,out] | m | MOBIData structure with loaded data |
[in] | contributor | String value |
MOBI_EXPORT MOBI_RET mobi_meta_add_copyright | ( | MOBIData * | m, |
const char * | copyright | ||
) |
Add document copyright metadata.
[in,out] | m | MOBIData structure with loaded data |
[in] | copyright | String value |
MOBI_EXPORT MOBI_RET mobi_meta_add_description | ( | MOBIData * | m, |
const char * | description | ||
) |
Add document description metadata.
[in,out] | m | MOBIData structure with loaded data |
[in] | description | String value |
MOBI_EXPORT MOBI_RET mobi_meta_add_imprint | ( | MOBIData * | m, |
const char * | imprint | ||
) |
Add document imprint metadata.
[in,out] | m | MOBIData structure with loaded data |
[in] | imprint | String value |
MOBI_EXPORT MOBI_RET mobi_meta_add_isbn | ( | MOBIData * | m, |
const char * | isbn | ||
) |
Add document isbn metadata.
[in,out] | m | MOBIData structure with loaded data |
[in] | isbn | String value |
MOBI_EXPORT MOBI_RET mobi_meta_add_language | ( | MOBIData * | m, |
const char * | language | ||
) |
Add document language code metadata.
Locale strings are based on IANA language-subtag registry with some custom Mobipocket modifications. See mobi_locale array.
[in,out] | m | MOBIData structure with loaded data |
[in] | language | String value |
MOBI_EXPORT MOBI_RET mobi_meta_add_publishdate | ( | MOBIData * | m, |
const char * | publishdate | ||
) |
Add document publishdate metadata.
[in,out] | m | MOBIData structure with loaded data |
[in] | publishdate | String value |
MOBI_EXPORT MOBI_RET mobi_meta_add_publisher | ( | MOBIData * | m, |
const char * | publisher | ||
) |
Add document publisher metadata.
[in,out] | m | MOBIData structure with loaded data |
[in] | publisher | String value |
MOBI_EXPORT MOBI_RET mobi_meta_add_review | ( | MOBIData * | m, |
const char * | review | ||
) |
Add document review metadata.
[in,out] | m | MOBIData structure with loaded data |
[in] | review | String value |
MOBI_EXPORT MOBI_RET mobi_meta_add_subject | ( | MOBIData * | m, |
const char * | subject | ||
) |
Add document subject metadata.
[in,out] | m | MOBIData structure with loaded data |
[in] | subject | String value |
MOBI_EXPORT MOBI_RET mobi_meta_add_title | ( | MOBIData * | m, |
const char * | title | ||
) |
Add document title metadata.
[in,out] | m | MOBIData structure with loaded data |
[in] | title | String value |
MOBI_EXPORT MOBI_RET mobi_meta_delete_asin | ( | MOBIData * | m | ) |
Delete all asin metadata.
[in,out] | m | MOBIData structure with loaded data |
MOBI_EXPORT MOBI_RET mobi_meta_delete_author | ( | MOBIData * | m | ) |
Delete all author metadata.
[in,out] | m | MOBIData structure with loaded data |
MOBI_EXPORT MOBI_RET mobi_meta_delete_contributor | ( | MOBIData * | m | ) |
Delete all contributor metadata.
[in,out] | m | MOBIData structure with loaded data |
MOBI_EXPORT MOBI_RET mobi_meta_delete_copyright | ( | MOBIData * | m | ) |
Delete all copyright metadata.
[in,out] | m | MOBIData structure with loaded data |
MOBI_EXPORT MOBI_RET mobi_meta_delete_description | ( | MOBIData * | m | ) |
Delete all description metadata.
[in,out] | m | MOBIData structure with loaded data |
MOBI_EXPORT MOBI_RET mobi_meta_delete_imprint | ( | MOBIData * | m | ) |
Delete all imprint metadata.
[in,out] | m | MOBIData structure with loaded data |
MOBI_EXPORT MOBI_RET mobi_meta_delete_isbn | ( | MOBIData * | m | ) |
Delete all isbn metadata.
[in,out] | m | MOBIData structure with loaded data |
MOBI_EXPORT MOBI_RET mobi_meta_delete_language | ( | MOBIData * | m | ) |
Delete all language code metadata.
[in,out] | m | MOBIData structure with loaded data |
MOBI_EXPORT MOBI_RET mobi_meta_delete_publishdate | ( | MOBIData * | m | ) |
Delete all publishdate metadata.
[in,out] | m | MOBIData structure with loaded data |
MOBI_EXPORT MOBI_RET mobi_meta_delete_publisher | ( | MOBIData * | m | ) |
Delete all publisher metadata.
[in,out] | m | MOBIData structure with loaded data |
MOBI_EXPORT MOBI_RET mobi_meta_delete_review | ( | MOBIData * | m | ) |
Delete all review metadata.
[in,out] | m | MOBIData structure with loaded data |
MOBI_EXPORT MOBI_RET mobi_meta_delete_subject | ( | MOBIData * | m | ) |
Delete all subject metadata.
[in,out] | m | MOBIData structure with loaded data |
MOBI_EXPORT MOBI_RET mobi_meta_delete_title | ( | MOBIData * | m | ) |
Delete all title metadata.
[in,out] | m | MOBIData structure with loaded data |
MOBI_EXPORT char* mobi_meta_get_asin | ( | const MOBIData * | m | ) |
Get document ASIN metadata.
Returned string must be deallocated by caller
[in] | m | MOBIData structure with loaded data |
MOBI_EXPORT char* mobi_meta_get_author | ( | const MOBIData * | m | ) |
Get document author metadata.
Returned string must be deallocated by caller
[in] | m | MOBIData structure with loaded data |
MOBI_EXPORT char* mobi_meta_get_contributor | ( | const MOBIData * | m | ) |
Get document contributor metadata.
Returned string must be deallocated by caller
[in] | m | MOBIData structure with loaded data |
MOBI_EXPORT char* mobi_meta_get_copyright | ( | const MOBIData * | m | ) |
Get document copyright metadata.
Returned string must be deallocated by caller
[in] | m | MOBIData structure with loaded data |
MOBI_EXPORT char* mobi_meta_get_description | ( | const MOBIData * | m | ) |
Get document description metadata.
Returned string must be deallocated by caller
[in] | m | MOBIData structure with loaded data |
MOBI_EXPORT char* mobi_meta_get_imprint | ( | const MOBIData * | m | ) |
Get document imprint metadata.
Returned string must be deallocated by caller
[in] | m | MOBIData structure with loaded data |
MOBI_EXPORT char* mobi_meta_get_isbn | ( | const MOBIData * | m | ) |
Get document ISBN metadata.
Returned string must be deallocated by caller
[in] | m | MOBIData structure with loaded data |
MOBI_EXPORT char* mobi_meta_get_language | ( | const MOBIData * | m | ) |
Get document language code metadata.
Locale strings are based on IANA language-subtag registry with some custom Mobipocket modifications. See mobi_locale array.
Returned string must be deallocated by caller
[in] | m | MOBIData structure with loaded data |
MOBI_EXPORT char* mobi_meta_get_publishdate | ( | const MOBIData * | m | ) |
Get document publishing date metadata.
Returned string must be deallocated by caller
[in] | m | MOBIData structure with loaded data |
MOBI_EXPORT char* mobi_meta_get_publisher | ( | const MOBIData * | m | ) |
Get document publisher metadata.
Returned string must be deallocated by caller
[in] | m | MOBIData structure with loaded data |
MOBI_EXPORT char* mobi_meta_get_review | ( | const MOBIData * | m | ) |
Get document review metadata.
Returned string must be deallocated by caller
[in] | m | MOBIData structure with loaded data |
MOBI_EXPORT char* mobi_meta_get_subject | ( | const MOBIData * | m | ) |
Get document subject metadata.
Returned string must be deallocated by caller
[in] | m | MOBIData structure with loaded data |
MOBI_EXPORT char* mobi_meta_get_title | ( | const MOBIData * | m | ) |
Get document title metadata.
Returned string must be deallocated by caller
[in] | m | MOBIData structure with loaded data |
MOBI_EXPORT MOBI_RET mobi_meta_set_asin | ( | MOBIData * | m, |
const char * | asin | ||
) |
Set document asin metadata.
Replaces all asin metadata with new string
[in,out] | m | MOBIData structure with loaded data |
[in] | asin | String value |
MOBI_EXPORT MOBI_RET mobi_meta_set_author | ( | MOBIData * | m, |
const char * | author | ||
) |
Set document author metadata.
Replaces all author metadata with new string
[in,out] | m | MOBIData structure with loaded data |
[in] | author | String value |
MOBI_EXPORT MOBI_RET mobi_meta_set_contributor | ( | MOBIData * | m, |
const char * | contributor | ||
) |
Set document contributor metadata.
Replaces all contributor metadata with new string
[in,out] | m | MOBIData structure with loaded data |
[in] | contributor | String value |
MOBI_EXPORT MOBI_RET mobi_meta_set_copyright | ( | MOBIData * | m, |
const char * | copyright | ||
) |
Set document copyright metadata.
Replaces all copyright metadata with new string
[in,out] | m | MOBIData structure with loaded data |
[in] | copyright | String value |
MOBI_EXPORT MOBI_RET mobi_meta_set_description | ( | MOBIData * | m, |
const char * | description | ||
) |
Set document description metadata.
Replaces all description metadata with new string
[in,out] | m | MOBIData structure with loaded data |
[in] | description | String value |
MOBI_EXPORT MOBI_RET mobi_meta_set_imprint | ( | MOBIData * | m, |
const char * | imprint | ||
) |
Set document imprint metadata.
Replaces all imprint metadata with new string
[in,out] | m | MOBIData structure with loaded data |
[in] | imprint | String value |
MOBI_EXPORT MOBI_RET mobi_meta_set_isbn | ( | MOBIData * | m, |
const char * | isbn | ||
) |
Set document isbn metadata.
Replaces all isbn metadata with new string
[in,out] | m | MOBIData structure with loaded data |
[in] | isbn | String value |
MOBI_EXPORT MOBI_RET mobi_meta_set_language | ( | MOBIData * | m, |
const char * | language | ||
) |
Set document language code metadata.
Replaces all language metadata with new string Locale strings are based on IANA language-subtag registry with some custom Mobipocket modifications. See mobi_locale array.
[in,out] | m | MOBIData structure with loaded data |
[in] | language | String value |
MOBI_EXPORT MOBI_RET mobi_meta_set_publishdate | ( | MOBIData * | m, |
const char * | publishdate | ||
) |
Set document publishdate metadata.
Replaces all publishdate metadata with new string
[in,out] | m | MOBIData structure with loaded data |
[in] | publishdate | String value |
MOBI_EXPORT MOBI_RET mobi_meta_set_publisher | ( | MOBIData * | m, |
const char * | publisher | ||
) |
Set document publisher metadata.
Replaces all publisher metadata with new string
[in,out] | m | MOBIData structure with loaded data |
[in] | publisher | String value |
MOBI_EXPORT MOBI_RET mobi_meta_set_review | ( | MOBIData * | m, |
const char * | review | ||
) |
Set document review metadata.
Replaces all review metadata with new string
[in,out] | m | MOBIData structure with loaded data |
[in] | review | String value |
MOBI_EXPORT MOBI_RET mobi_meta_set_subject | ( | MOBIData * | m, |
const char * | subject | ||
) |
Set document subject metadata.
Replaces all subject metadata with new string
[in,out] | m | MOBIData structure with loaded data |
[in] | subject | String value |
MOBI_EXPORT MOBI_RET mobi_meta_set_title | ( | MOBIData * | m, |
const char * | title | ||
) |
Set document title metadata.
Replaces all title metadata with new string
[in,out] | m | MOBIData structure with loaded data |
[in] | title | String value |
MOBI_EXPORT MOBIExthHeader* mobi_next_exthrecord_by_tag | ( | const MOBIData * | m, |
const MOBIExthTag | tag, | ||
MOBIExthHeader ** | start | ||
) |
Get EXTH record with given MOBIExthTag tag. Start list search at given record.
If start_tag is NULL search will start from the root of the linked list. After successfull search start will be set to next record in the list.
[in] | m | MOBIData structure with loaded data |
[in] | tag | MOBIExthTag EXTH record tag |
[in,out] | start | MOBIExthHeader EXTH record to begin search with |
MOBI_EXPORT MOBI_RET mobi_parse_kf7 | ( | MOBIData * | m | ) |
Loader will parse KF7 part of hybrid file.
[in,out] | m | MOBIData structure |
MOBI_EXPORT MOBI_RET mobi_parse_kf8 | ( | MOBIData * | m | ) |
Loader will parse KF8 part of hybrid file.
This is the default option.
[in,out] | m | MOBIData structure |
MOBI_EXPORT MOBI_RET mobi_parse_rawml | ( | MOBIRawml * | rawml, |
const MOBIData * | m | ||
) |
Parse raw records into html flow parts, markup parts, resources and indices.
[in,out] | rawml | Structure rawml will be filled with reconstructed parts and resources |
[in] | m | MOBIData structure |
MOBI_EXPORT MOBI_RET mobi_parse_rawml_opt | ( | MOBIRawml * | rawml, |
const MOBIData * | m, | ||
bool | parse_toc, | ||
bool | parse_dict, | ||
bool | reconstruct | ||
) |
Parse raw records into html flow parts, markup parts, resources and indices. Individual stages of the parsing may be turned on/off.
[in,out] | rawml | Structure rawml will be filled with reconstructed parts and resources |
[in] | m | MOBIData structure |
[in] | parse_toc | bool Parse content indices if true |
[in] | parse_dict | bool Parse dictionary indices if true |
[in] | reconstruct | bool Recounstruct links, build opf, strip mobi-specific tags if true |
MOBI_EXPORT struct tm* mobi_pdbtime_to_time | ( | const long | pdb_time | ) |
Convert time values from palmdoc header to time tm struct.
Older files set time in mac format. Newer ones in unix time.
[in] | pdb_time | Time value from PDB header |
MOBI_EXPORT MOBI_RET mobi_remove_hybrid_part | ( | MOBIData * | m, |
const bool | remove_kf8 | ||
) |
Remove one version from hybrid file.
Hybrid file contains two document versions: KF8 version for devices that support new format and a version for older devices.
[in,out] | m | MOBIData structure |
[in] | remove_kf8 | Remove new KF8 part if true, old part if false |
MOBI_EXPORT const char* mobi_version | ( | void | ) |
MOBI_EXPORT MOBI_RET mobi_write_file | ( | FILE * | file, |
MOBIData * | m | ||
) |
Write mobi document to file.
Serializes metadata from MOBIData into raw records also stored in MOBIData (m->rec). Later writes palm database to file.
[in,out] | file | File descriptor |
[in,out] | m | MOBIData structure |