TDE personal information management applications
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

78 lines
2.5KB

  1. /***************************************************************************
  2. pablib.hxx - description
  3. -------------------
  4. begin : Tue Jul 4 2000
  5. copyright : (C) 2000 by Hans Dijkema
  6. email : kmailcvt@hum.org
  7. ***************************************************************************/
  8. /***************************************************************************
  9. * *
  10. * This program is free software; you can redistribute it and/or modify *
  11. * it under the terms of the GNU General Public License as published by *
  12. * the Free Software Foundation; either version 2 of the License, or *
  13. * (at your option) any later version. *
  14. * *
  15. ***************************************************************************/
  16. #ifndef PAB_LIB_HXX
  17. #define PAB_LIB_HXX
  18. #include <klocale.h>
  19. #include <tqfile.h>
  20. #include "pab_mapihd.h"
  21. #define INDEX_OF_INDEX 0x000000c4
  22. #define PAB_REC_OK 0xbcec
  23. #define PAB_FILE_ID 0x4e444221
  24. class pab
  25. {
  26. friend class pabrec;
  27. private:
  28. TQFile in;
  29. const char *pabfile;
  30. TQString cap;
  31. TQWidget *parent;
  32. public:
  33. pab(const char *pabFile);
  34. ~pab();
  35. private:
  36. content_t skip(int longwords) { return relative(longwords); }
  37. content_t go(adr_t);
  38. content_t relative(int longwords);
  39. content_t relative(pabsize_t);
  40. content_t add(adr_t &,int words);
  41. content_t read(void);
  42. void read(unsigned char *mem,content_t size);
  43. void read(word_t &);
  44. pabsize_t size(content_t);
  45. void size(content_t,pabsize_t &, pabsize_t &);
  46. word_t lower(content_t);
  47. word_t upper(content_t);
  48. byte_t readbyte(void);
  49. adr_t curpos(void) { return in.at(); }
  50. adr_t tell(void) { return curpos(); }
  51. private:
  52. bool recUnknown(pabrec & R);
  53. bool recNoFunction(pabrec & R);
  54. const char *get(unsigned char *mem,pabrec_entry e,pabrec & R);
  55. bool knownPAB(void);
  56. private:
  57. void rdPabRec(pabrec & R);
  58. void prt(unsigned char *mem,pabrec & R,pabrec_entry E);
  59. void getrange(pabrec & R,pabrec_entry e,word_t & b,word_t & _e);
  60. private:
  61. bool convert(adr_t A,content_t start,content_t stop);
  62. void dotable(adr_t table,content_t start,content_t stop);
  63. void processRec(adr_t REC);
  64. public:
  65. bool convert(void);
  66. };
  67. #endif