|
| const char * | mobi_version (void) |
| | Get libmobi version. More...
|
| |
| uint8_t | mobi_unicode_to_utf8 (char *output, const size_t codepoint) |
| | Convert unicode codepoint to utf-8 sequence. More...
|
| |
| MOBI_RET | mobi_cp1252_to_utf8 (char *output, const char *input, size_t *outsize, const size_t insize) |
| | Convert cp1252 encoded string to utf-8. More...
|
| |
| MOBI_RET | mobi_utf8_to_cp1252 (char *output, const char *input, size_t *outsize, const size_t insize) |
| | Convert utf-8 encoded string to cp1252. More...
|
| |
| uint8_t | mobi_ligature_to_cp1252 (const uint8_t byte1, const uint8_t byte2) |
| | Decode ligature to cp1252. More...
|
| |
| uint16_t | mobi_ligature_to_utf16 (const uint32_t byte1, const uint32_t byte2) |
| | Decode ligature to utf-16. More...
|
| |
| MOBIEncoding | mobi_get_encoding (const MOBIData *m) |
| | Get text encoding of mobi document. More...
|
| |
| bool | mobi_is_cp1252 (const MOBIData *m) |
| | Check if document's text is cp1252 encoded. More...
|
| |
| char * | mobi_strdup (const char *s) |
| | strdup replacement More...
|
| |
| const char * | mobi_get_locale_string (const uint32_t locale_number) |
| | Get pointer to locale tag for a given Mobipocket locale number. More...
|
| |
| size_t | mobi_get_locale_number (const char *locale_string) |
| | Get Mobipocket locale number for a given string tag. More...
|
| |
| MOBIFileMeta | mobi_get_filemeta_by_type (const MOBIFiletype type) |
| | Get MOBIFileMeta tag structure by MOBIFiletype type. More...
|
| |
| 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_RET | mobi_set_fullname (MOBIData *m, const char *fullname) |
| | Set ebook full name stored in Record 0 at offset given in MOBI header. More...
|
| |
| MOBI_RET | mobi_set_pdbname (MOBIData *m, const char *name) |
| | Set palm database name. More...
|
| |
| MOBIPdbRecord * | mobi_get_record_by_uid (const MOBIData *m, const size_t uid) |
| | Get palm database record with given unique id. More...
|
| |
| MOBIPart * | mobi_get_part_by_uid (const MOBIRawml *rawml, const size_t uid) |
| | Get rawml->markup MOBIPart part by uid. More...
|
| |
| MOBIPart * | mobi_get_flow_by_uid (const MOBIRawml *rawml, const size_t uid) |
| | Get rawml->flow MOBIPart part by uid. More...
|
| |
| 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...
|
| |
| MOBIPart * | mobi_get_resource_by_uid (const MOBIRawml *rawml, const size_t uid) |
| | Get MOBIPart resource record with given unique id. More...
|
| |
| 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...
|
| |
| MOBIFiletype | mobi_get_resourcetype_by_uid (const MOBIRawml *rawml, const size_t uid) |
| | Get MOBIFiletype type of MOBIPart resource record with given unique id. More...
|
| |
| 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) More...
|
| |
| MOBIPdbRecord * | mobi_get_record_by_magic (const MOBIData *m, const unsigned char magic[4]) |
| | Get palm database record with data header starting with given 4-byte magic string. More...
|
| |
| MOBIPdbRecord * | mobi_extract_records_by_seqnumber (MOBIData *m, const size_t num, size_t *count) |
| | Extract palm count database records starting with given sequential number from MOBIData structure. More...
|
| |
| MOBI_RET | mobi_insert_records_by_seqnumber (MOBIData *m, MOBIPdbRecord *record, const size_t num) |
| | Insert palm database records at given sequential number. More...
|
| |
| MOBI_RET | mobi_delete_records_by_seqnumber (MOBIData *m, const size_t num, size_t *count) |
| | Delete palm count database records starting with given sequential number from MOBIData structure. More...
|
| |
| MOBI_RET | mobi_delete_record_by_seqnumber (MOBIData *m, const size_t num) |
| | Delete palm database record with given sequential number from MOBIData structure. More...
|
| |
| MOBIExthHeader * | mobi_get_exthrecord_by_tag (const MOBIData *m, const MOBIExthTag tag) |
| | Get EXTH record with given MOBIExthTag tag. More...
|
| |
| 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_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...
|
| |
| MOBIExthHeader * | mobi_delete_exthrecord (MOBIData *m, MOBIExthHeader *record) |
| | Delete EXTH record. More...
|
| |
| MOBI_RET | mobi_delete_exthrecord_by_tag (MOBIData *m, const MOBIExthTag tag) |
| | Delete all EXTH records with given MOBIExthTag tag. More...
|
| |
| MOBIExthMeta | mobi_get_exthtagmeta_by_tag (const MOBIExthTag tag) |
| | Get MOBIExthMeta tag structure by MOBIExthTag tag id. More...
|
| |
| uint32_t | mobi_decode_exthvalue (const unsigned char *data, const size_t size) |
| | Decode big-endian value stored in EXTH record. More...
|
| |
| char * | mobi_decode_htmlentities (const char *input) |
| | Convert html entities in string to utf-8 characters. More...
|
| |
| char * | mobi_decode_exthstring (const MOBIData *m, const unsigned char *data, const size_t size) |
| | Decode string stored in EXTH record. More...
|
| |
| uint32_t | mobi_swap32 (const uint32_t val) |
| | Swap endianness of 32-bit value. More...
|
| |
| struct tm * | mobi_pdbtime_to_time (const long pdb_time) |
| | Convert time values from palmdoc header to time tm struct. More...
|
| |
| int | mobi_bitcount (const uint8_t byte) |
| | Get number of bits set in a given byte. More...
|
| |
| MOBI_RET | mobi_get_rawml (const MOBIData *m, char *text, size_t *len) |
| | Decompress text to a text buffer. More...
|
| |
| MOBI_RET | mobi_dump_rawml (const MOBIData *m, FILE *file) |
| | Decompress text record to an open file descriptor. More...
|
| |
| bool | mobi_exists_mobiheader (const MOBIData *m) |
| | Check if MOBI header is loaded / present in the loaded file. More...
|
| |
| bool | mobi_exists_skel_indx (const MOBIData *m) |
| | Check if skeleton INDX is present in the loaded file. More...
|
| |
| bool | mobi_exists_fdst (const MOBIData *m) |
| | Check if FDST record is present in the loaded file. More...
|
| |
| size_t | mobi_get_fdst_record_number (const MOBIData *m) |
| | Get sequential number of FDST record. More...
|
| |
| bool | mobi_exists_frag_indx (const MOBIData *m) |
| | Check if fragments INDX is present in the loaded file. More...
|
| |
| bool | mobi_exists_guide_indx (const MOBIData *m) |
| | Check if guide INDX is present in the loaded file. More...
|
| |
| bool | mobi_exists_ncx (const MOBIData *m) |
| | Check if ncx INDX is present in the loaded file. More...
|
| |
| bool | mobi_exists_orth (const MOBIData *m) |
| | Check if orth INDX is present in the loaded file. More...
|
| |
| bool | mobi_exists_infl (const MOBIData *m) |
| | Check if infl INDX is present in the loaded file. More...
|
| |
| MOBIFiletype | mobi_determine_flowpart_type (const MOBIRawml *rawml, const size_t part_number) |
| | Get file type of given part with number [part_number]. More...
|
| |
| MOBIFiletype | mobi_determine_font_type (const unsigned char *font_data, const size_t font_size) |
| | Get font type of given font resource. More...
|
| |
| MOBI_RET | mobi_add_audio_resource (MOBIPart *part) |
| | Replace part data with decoded audio data. More...
|
| |
| MOBI_RET | mobi_decode_audio_resource (unsigned char **decoded_resource, size_t *decoded_size, MOBIPart *part) |
| | Decode audio resource. More...
|
| |
| MOBI_RET | mobi_add_video_resource (MOBIPart *part) |
| | Replace part data with decoded video data. More...
|
| |
| MOBI_RET | mobi_decode_video_resource (unsigned char **decoded_resource, size_t *decoded_size, MOBIPart *part) |
| | Decode video resource. More...
|
| |
| MOBI_RET | mobi_get_embedded_source (unsigned char **data, size_t *size, const MOBIData *m) |
| | Get embedded source archive. More...
|
| |
| MOBI_RET | mobi_get_embedded_log (unsigned char **data, size_t *size, const MOBIData *m) |
| | Get embedded conversion log. More...
|
| |
| MOBI_RET | mobi_add_font_resource (MOBIPart *part) |
| | Replace part data with decoded font data. More...
|
| |
| MOBI_RET | mobi_decode_font_resource (unsigned char **decoded_font, size_t *decoded_size, MOBIPart *part) |
| | Deobfuscator and decompressor for font resources. More...
|
| |
| MOBIFiletype | mobi_determine_resource_type (const MOBIPdbRecord *record) |
| | Get resource type (image, font) by checking its magic header. More...
|
| |
| bool | mobi_is_hybrid (const MOBIData *m) |
| | Check if loaded MOBI data is KF7/KF8 hybrid file. More...
|
| |
| bool | mobi_is_mobipocket (const MOBIData *m) |
| | Check if loaded document is MOBI/BOOK Mobipocket format. More...
|
| |
| bool | mobi_is_textread (const MOBIData *m) |
| | Check if loaded document is TEXt/REAd format. More...
|
| |
| bool | mobi_is_dictionary (const MOBIData *m) |
| | Check if loaded document is dictionary. More...
|
| |
| bool | mobi_is_encrypted (const MOBIData *m) |
| | Check if loaded document is encrypted. More...
|
| |
| bool | mobi_has_drmkey (const MOBIData *m) |
| | Check if DRM key is set for the document. More...
|
| |
| bool | mobi_has_drmcookies (const MOBIData *m) |
| | Check if DRM cookies are set for the document. More...
|
| |
| bool | mobi_is_replica (const MOBIData *m) |
| | Check if loaded document is Print Replica type. More...
|
| |
| size_t | mobi_get_fileversion (const MOBIData *m) |
| | Get mobi file version. More...
|
| |
| bool | mobi_is_kf8 (const MOBIData *m) |
| | Is file version 8 or above. More...
|
| |
| bool | mobi_is_rawml_kf8 (const MOBIRawml *rawml) |
| | Is file version 8 or above. More...
|
| |
| uint16_t | mobi_get_textrecord_maxsize (const MOBIData *m) |
| | Get maximal size of uncompressed text record. More...
|
| |
| size_t | mobi_get_text_maxsize (const MOBIData *m) |
| | Get maximal size of all uncompressed text records. More...
|
| |
| size_t | mobi_get_first_resource_record (const MOBIData *m) |
| | Get sequential number of first resource record (image/font etc) More...
|
| |
| size_t | mobi_pow (unsigned base, unsigned exp) |
| | Calculate exponentiation for unsigned base and exponent. More...
|
| |
| MOBI_RET | mobi_base32_decode (uint32_t *decoded, const char *encoded) |
| | Decode positive number from base 32 to base 10. More...
|
| |
| size_t | mobi_get_kf8offset (const MOBIData *m) |
| | Get offset of KF8 Boundary for KF7/KF8 hybrid file cached in MOBIData structure. More...
|
| |
| size_t | mobi_get_kf8boundary_seqnumber (const MOBIData *m) |
| | Get sequential number of KF8 Boundary record for KF7/KF8 hybrid file. More...
|
| |
| uint32_t | mobi_get_exthsize (const MOBIData *m) |
| | Get size of serialized exth record including padding. More...
|
| |
| uint32_t | mobi_get_drmsize (const MOBIData *m) |
| | Get size of serialized DRM data. More...
|
| |
| uint16_t | mobi_get_records_count (const MOBIData *m) |
| | Get count of palm database records. More...
|
| |
| void | mobi_remove_zeros (unsigned char *buffer, size_t *len) |
| | Remove null characters from char buffer. More...
|
| |
| MOBI_RET | mobi_parse_kf7 (MOBIData *m) |
| | Loader will parse KF7 part of hybrid file. More...
|
| |
| MOBI_RET | mobi_parse_kf8 (MOBIData *m) |
| | Loader will parse KF8 part of hybrid file. More...
|
| |
| MOBI_RET | mobi_remove_part_kf7 (MOBIData *m) |
| | Remove KF7 version from hybrid file. More...
|
| |
| MOBI_RET | mobi_remove_part_kf8 (MOBIData *m) |
| | Remove KF8 version from hybrid file. More...
|
| |
| MOBI_RET | mobi_remove_hybrid_part (MOBIData *m, const bool remove_kf8) |
| | Remove one version from hybrid file. More...
|
| |
| MOBI_RET | mobi_swap_mobidata (MOBIData *m) |
| | Swap KF7 and KF8 MOBIData structures in a hybrid file. More...
|
| |
| 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_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_RET | mobi_drm_setkey (MOBIData *m, const char *pid) |
| | Store PID for encryption in MOBIData stucture. More...
|
| |
| MOBI_RET | mobi_drm_delkey (MOBIData *m) |
| | Remove PID stored for encryption from MOBIData structure. More...
|
| |
| void | mobi_free_internals (MOBIData *m) |
| | Free internals. More...
|
| |
| uint32_t | mobi_get32be (const unsigned char buf[4]) |
| | Convert char buffer to 32-bit unsigned integer big endian. More...
|
| |
| uint32_t | mobi_get32le (const unsigned char buf[4]) |
| | Convert char buffer to 32-bit unsigned integer little endian. More...
|
| |