Back to index

scribus-ng  1.3.4.dfsg+svn20071115
Classes | Defines | Typedefs | Functions
pdbim.h File Reference
#include "pluginapi.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. More...
struct  buffer
 Binary buffer. More...
class  PdbIm
 An import filter for Palm Documents (PDB files). More...

Defines

#define U8_MAX   255u
 Define integral type Byte, Word, and DWord to match those on the Pilot being 8, 16, and 32 bits, respectively.
#define U16_MAX   65535u
 max 16-bit unsigned
#define U32_MAX   4294967295ul
 max 32-bit unsigned
#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

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 ()

Class Documentation

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.

Definition at line 78 of file pdbim.h.

Class Members
DWord appInfoID
Word attributes
DWord backup_time
DWord create_time
char creator
DWord id_seed
DWord modificationNumber
DWord modify_time
char name
DWord nextRecordList
Word numRecords
DWord sortInfoID
char type
Word version
struct doc_record0

PDB Document record.

16 bytes total.

Definition at line 104 of file pdbim.h.

Class Members
DWord doc_size
Word numRecords
Word rec_size
Word reserved1
DWord reserved2
Word version
struct buffer

Binary buffer.

Definition at line 114 of file pdbim.h.

Class Members
Byte buf
UT_uint32 len
UT_uint32 position

Define Documentation

#define BUFFER_SIZE   4096

Definition at line 59 of file pdbim.h.

#define COUNT_BITS   3

Definition at line 60 of file pdbim.h.

#define DISP_BITS   11

Definition at line 61 of file pdbim.h.

#define dmDBNameLength   32

31 chars + 1 null terminator

Definition at line 65 of file pdbim.h.

#define DOC_CREATOR   "REAd"

Definition at line 62 of file pdbim.h.

#define DOC_TYPE   "TEXt"

Definition at line 63 of file pdbim.h.

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

Definition at line 121 of file pdbim.h.

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

Definition at line 120 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 99 of file pdbim.h.

#define PDB_RECORD_HEADER_SIZE   8

Definition at line 100 of file pdbim.h.

#define RECORD_SIZE_MAX   4096

Pilots have a fixed 4K record size.

Definition at line 58 of file pdbim.h.

#define U16_MAX   65535u

max 16-bit unsigned

Definition at line 34 of file pdbim.h.

#define U32_MAX   4294967295ul

max 32-bit unsigned

Definition at line 42 of file pdbim.h.

#define U8_MAX   255u

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 26 of file pdbim.h.


Typedef Documentation

typedef unsigned short UT_uint16

Definition at line 55 of file pdbim.h.

typedef unsigned int UT_uint32

Abiword's internal data types.

Definition at line 54 of file pdbim.h.


Function Documentation

PLUGIN_API QStringList FileExtensions ( )

Definition at line 15 of file csvim.cpp.

{
    return QStringList("csv");
}

Returns the string with importer description.

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

Definition at line 10 of file csvim.cpp.

{
    return QObject::tr("Comma Separated Value Files");
}
PLUGIN_API void GetText ( QString  filename,
QString  encoding,
bool  textOnly,
gtWriter *  writer 
)

Definition at line 20 of file csvim.cpp.

{
       CsvDialog* csvdia = new CsvDialog();
       if (csvdia->exec())
       {
              CsvIm *cim = new CsvIm(filename, encoding, writer, csvdia->getFDelim(), csvdia->getVDelim(),
                               csvdia->hasHeader(), csvdia->useVDelim());
              cim->write();
              delete cim;
       }
       delete csvdia;
}