kaddressbook

pab_pablib.h

00001 /***************************************************************************
00002                           pablib.hxx  -  description
00003                              -------------------
00004     begin                : Tue Jul 4 2000
00005     copyright            : (C) 2000 by Hans Dijkema
00006     email                : kmailcvt@hum.org
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 
00019 #ifndef PAB_LIB_HXX
00020 #define PAB_LIB_HXX
00021 
00022 #include <klocale.h>
00023 #include <qfile.h>
00024 
00025 #include "pab_mapihd.h"
00026 
00027 #define INDEX_OF_INDEX  0x000000c4
00028 #define PAB_REC_OK  0xbcec
00029 #define PAB_FILE_ID 0x4e444221
00030 
00031 class pab
00032 {
00033   friend class pabrec;
00034 
00035   private:
00036     QFile in;
00037     const char *pabfile;
00038     QString     cap;
00039     QWidget    *parent;
00040   public:
00041     pab(const char *pabFile);
00042    ~pab();
00043   private:
00044     content_t  skip(int longwords) { return relative(longwords); }
00045     content_t  go(adr_t);
00046     content_t  relative(int longwords);
00047     content_t  relative(pabsize_t);
00048     content_t  add(adr_t &,int words);
00049     content_t  read(void);
00050     void       read(unsigned char *mem,content_t size);
00051     void       read(word_t &);
00052     pabsize_t  size(content_t);
00053     void       size(content_t,pabsize_t &, pabsize_t &);
00054     word_t     lower(content_t);
00055     word_t     upper(content_t);
00056     byte_t     readbyte(void);
00057     adr_t      curpos(void) { return in.at(); }
00058     adr_t      tell(void)   { return curpos(); }
00059   private:
00060     bool  recUnknown(pabrec & R);
00061     bool  recNoFunction(pabrec & R);
00062     const char *get(unsigned char *mem,pabrec_entry e,pabrec & R);
00063     bool  knownPAB(void);
00064   private:
00065     void rdPabRec(pabrec & R);
00066     void prt(unsigned char *mem,pabrec & R,pabrec_entry E);
00067     void getrange(pabrec & R,pabrec_entry e,word_t & b,word_t & _e);
00068   private:
00069     bool convert(adr_t A,content_t start,content_t stop);
00070     void dotable(adr_t table,content_t start,content_t stop);
00071     void processRec(adr_t REC);
00072   public:
00073     bool convert(void);
00074 };
00075 
00076 
00077 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys