Scribus Developer Documentation - API
logo-pen

Scribus Developer Documentation - API

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

#define COUNT_BITS   3

Definition at line 39 of file pdbim.h.

Referenced by PdbIm::uncompress().

#define DISP_BITS   11

Definition at line 40 of file pdbim.h.

#define dmDBNameLength   32

31 chars + 1 null terminator

Definition at line 44 of file pdbim.h.

#define DOC_CREATOR   "REAd"

Definition at line 41 of file pdbim.h.

Referenced by PdbIm::loadFile().

#define DOC_TYPE   "TEXt"

Definition at line 42 of file pdbim.h.

Referenced by PdbIm::loadFile().

#define GET_DWord ( f,
 )     { fread( &n, 4, 1, f ); n = swap_DWord( n ); }

Definition at line 100 of file pdbim.h.

Referenced by PdbIm::loadFile().

#define GET_Word ( f,
 )     { fread( &n, 2, 1, f ); n = swap_Word ( n ); }

Definition at line 99 of file pdbim.h.

#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

Definition at line 79 of file pdbim.h.

Referenced by PdbIm::loadFile().

#define RECORD_SIZE_MAX   4096

Pilots have a fixed 4K record size.

Definition at line 37 of file pdbim.h.


Typedef Documentation

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.

Definition at line 32 of file pdbim.h.

typedef UT_uint32 DWord

Definition at line 34 of file pdbim.h.

typedef unsigned short UT_uint16

Definition at line 28 of file pdbim.h.

typedef unsigned int UT_uint32

Abiword's internal data types.

Definition at line 27 of file pdbim.h.

typedef UT_uint16 Word

Definition at line 33 of file pdbim.h.


Function Documentation

PLUGIN_API QStringList FileExtensions (  ) 

Definition at line 15 of file csvim.cpp.

PLUGIN_API QString FileFormatName (  ) 

Returns the string with importer description.

Return values:
QString a string or QString::null when the plugin should not be loaded.

Definition at line 10 of file csvim.cpp.

PLUGIN_API void GetText ( QString  filename,
QString  encoding,
bool  textOnly,
gtWriter writer 
)

Definition at line 20 of file csvim.cpp.

Created with personalized Doxygen. This is documentation for GPL software Scribus - Open Source Desktop Publishing.