pdbim.h File Reference
#include "pluginapi.h"
Include dependency graph for pdbim.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Classes | |
| struct | pdb_header |
| PDB document header http://www.pyrite.org/doc_format.html version 2 bytes 0x0002 if data is compressed, 0x0001 if uncompressed spare 2 bytes purpose unknown (set to 0 on creation) length 4 bytes total length of text before compression records 2 bytes number of text records record_size 2 bytes maximum size of each record (usually 4096; see below) position 4 bytes currently viewed position in the document sizes 2*records bytes record size array 78 bytes total. More... | |
| struct | doc_record0 |
| PDB Document record. 16 bytes total. More... | |
| struct | buffer |
| Binary buffer. More... | |
| class | PdbIm |
| An import filter for Palm Documents (PDB files). PDB documents are simple non-formatted texts in binary forms used mainly for e-books distribution. It's taken from Abiword's PDB import/export plugin http://www.abisource.com I've simplified the importer guts to fit special Scribus needs. More... | |
Defines | |
| #define | RECORD_SIZE_MAX 4096 |
| Pilots have a fixed 4K record size. | |
| #define | BUFFER_SIZE 4096 |
| #define | COUNT_BITS 3 |
| #define | DISP_BITS 11 |
| #define | DOC_CREATOR "REAd" |
| #define | DOC_TYPE "TEXt" |
| #define | dmDBNameLength 32 |
| 31 chars + 1 null terminator | |
| #define | PDB_HEADER_SIZE 78 |
| Some compilers pad structures out to DWord boundaries so using sizeof() doesn't give the intended result. | |
| #define | PDB_RECORD_HEADER_SIZE 8 |
| #define | GET_Word(f, n) { fread( &n, 2, 1, f ); n = swap_Word ( n ); } |
| #define | GET_DWord(f, n) { fread( &n, 4, 1, f ); n = swap_DWord( n ); } |
Typedefs | |
| typedef unsigned int | UT_uint32 |
| Abiword's internal data types. | |
| typedef unsigned short | UT_uint16 |
| typedef unsigned char | Byte |
| Define integral type Byte, Word, and DWord to match those on the Pilot being 8, 16, and 32 bits, respectively. Max 8-bit unsigned. | |
| typedef UT_uint16 | Word |
| typedef UT_uint32 | DWord |
Functions | |
| PLUGIN_API void | GetText (QString filename, QString encoding, bool textOnly, gtWriter *writer) |
| PLUGIN_API QString | FileFormatName () |
| Returns the string with importer description. | |
| PLUGIN_API QStringList | FileExtensions () |
Define Documentation
| #define BUFFER_SIZE 4096 |
Definition at line 38 of file pdbim.h.
Referenced by PdbIm::loadFile(), ScFlateEncodeFilter::openFilter(), PdbIm::PdbIm(), PdbIm::uncompress(), ScFlateEncodeFilter::writeData(), and ScFlateEncodeFilter::writeDeflate().
| #define COUNT_BITS 3 |
| #define DOC_CREATOR "REAd" |
| #define DOC_TYPE "TEXt" |
| #define GET_DWord | ( | f, | |||
| n | ) | { fread( &n, 4, 1, f ); n = swap_DWord( n ); } |
| #define GET_Word | ( | f, | |||
| n | ) | { fread( &n, 2, 1, f ); n = swap_Word ( n ); } |
| #define PDB_HEADER_SIZE 78 |
Some compilers pad structures out to DWord boundaries so using sizeof() doesn't give the intended result.
Definition at line 78 of file pdbim.h.
Referenced by PdbIm::loadFile().
| #define PDB_RECORD_HEADER_SIZE 8 |
| #define RECORD_SIZE_MAX 4096 |
Typedef Documentation
| typedef unsigned char Byte |
| typedef unsigned int UT_uint32 |
Function Documentation
| PLUGIN_API QString FileFormatName | ( | ) |
| PLUGIN_API void GetText | ( | QString | filename, | |
| QString | encoding, | |||
| bool | textOnly, | |||
| gtWriter * | writer | |||
| ) |
