summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-reader/pdb.h
authorpohly <pohly>2004-08-24 20:52:45 (UTC)
committer pohly <pohly>2004-08-24 20:52:45 (UTC)
commit73253e93327cf4ef0932de1b4afb56af22a0f37e (patch) (side-by-side diff)
tree1c9a7a6dd3341e036a894d348a3372525d29acec /noncore/apps/opie-reader/pdb.h
parente90847c784c48bd21bf8768cb38edb853b832697 (diff)
downloadopie-73253e93327cf4ef0932de1b4afb56af22a0f37e.zip
opie-73253e93327cf4ef0932de1b4afb56af22a0f37e.tar.gz
opie-73253e93327cf4ef0932de1b4afb56af22a0f37e.tar.bz2
updated source to opie-reader 0.7g
Diffstat (limited to 'noncore/apps/opie-reader/pdb.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-reader/pdb.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/noncore/apps/opie-reader/pdb.h b/noncore/apps/opie-reader/pdb.h
index eac3ae6..7a6580d 100644
--- a/noncore/apps/opie-reader/pdb.h
+++ b/noncore/apps/opie-reader/pdb.h
@@ -2,32 +2,34 @@
/*
* This header file defines some structures and types normally found in the
* Palm SDK. However, I don't want to require the presense of the SDK for a
* small utility since most Palm owners won't have it.
*
* $Id$
*
*/
#ifndef __PDB_H__
#define __PDB_H__
#ifndef _WINDOWS
#include <netinet/in.h>
#endif
#include <stdio.h>
+#include "useqpe.h"
+#include "CExpander.h"
/* Normal Palm typedefs */
typedef unsigned char UInt8;
typedef unsigned short UInt16;
typedef signed short Int16;
typedef unsigned long UInt32;
typedef UInt32 LocalID;
/* Max length of DB name */
#define dmDBNameLength 0x20
/************************************************************
* Structure of a Record entry
*************************************************************/
typedef struct {
@@ -63,31 +65,37 @@ typedef struct {
UInt32 lastBackupDate; // latest backup date
UInt32 modificationNumber; // modification number of database
LocalID appInfoID; // application specific info
LocalID sortInfoID; // app specific sorting info
UInt32 type; // database type
UInt32 creator; // database creator
UInt32 uniqueIDSeed; // used to generate unique IDs.
// Note that only the low order
// 3 bytes of this is used (in
// RecordEntryType.uniqueID).
// We are keeping 4 bytes for
// alignment purposes.
RecordListType recordList; // first record list
} DatabaseHdrType;
-class Cpdb
+class Cpdb : public CExpander
{
protected:
size_t file_length;
FILE* fin;
size_t recordpos(int);
size_t recordlength(int);
void gotorecordnumber(int);
DatabaseHdrType head;
- bool openfile(const char* src);
+ bool openpdbfile(const char* src);
Cpdb() : fin(NULL) {}
- ~Cpdb() { if (fin != NULL) fclose(fin); }
+ ~Cpdb();
+#ifdef USEQPE
+ void suspend();
+ void unsuspend();
+#endif
+ public:
+ virtual void sizes(unsigned long& _file, unsigned long& _text) = 0;
};
#endif