libmobi
C library for handling MOBI format ebook documents
|
Writing functions. More...
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include "write.h"
#include "util.h"
#include "debug.h"
Macros | |
#define | MOBI_HEADER_MAXLEN 280 |
#define | MOBI_RECORD0_PADDING 0x2002 |
Functions | |
MOBI_RET | mobi_write_buffer (FILE *file, const MOBIBuffer *buf) |
Write buffer contents to file. More... | |
MOBI_RET | mobi_write_pdbheader (FILE *file, const MOBIData *m) |
Write palm database header to file. More... | |
MOBI_RET | mobi_serialize_mobiheader (MOBIBuffer *buf, const MOBIData *m, const uint32_t exthsize) |
Serialize mobi header to buffer. More... | |
MOBI_RET | mobi_serialize_extheader (MOBIBuffer *buf, const MOBIData *m) |
Serialize exth header to buffer. More... | |
MOBI_RET | mobi_update_record0 (MOBIData *m, const size_t seqnumber) |
Serialize record0 and update record in MOBIData structure. More... | |
MOBI_RET | mobi_write_records (FILE *file, const MOBIData *m) |
Write palm database records to file. More... | |
MOBI_RET | mobi_write_file (FILE *file, MOBIData *m) |
Write mobi document to file. More... | |
Writing functions.
Copyright (c) 2016 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/
MOBI_RET mobi_serialize_extheader | ( | MOBIBuffer * | buf, |
const MOBIData * | m | ||
) |
Serialize exth header to buffer.
[in,out] | buf | output buffer |
[in] | m | MOBIData structure |
MOBI_RET mobi_serialize_mobiheader | ( | MOBIBuffer * | buf, |
const MOBIData * | m, | ||
const uint32_t | exthsize | ||
) |
Serialize mobi header to buffer.
[in,out] | buf | output buffer |
[in] | m | MOBIData structure |
[in] | exthsize | Size of exth record |
MOBI_RET mobi_write_buffer | ( | FILE * | file, |
const MOBIBuffer * | buf | ||
) |
Write buffer contents to file.
[in,out] | file | File descriptor |
[in] | buf | Buffer |
Write palm database header to file.
[in,out] | file | File descriptor |
[in] | m | MOBIData structure |