18 #include "pab_pablib.h"
20 #define REC_OK PAB_REC_OK
23 pab::pab( const char *_pabfile)
28 cap=i18n( "Import MS Exchange Personal Address Book (.PAB)");
34 if (in.isOpen()) { in.close(); }
43 bool pab::convert( void)
48 if (!in.isOpen()) {TQString msg;
49 msg=i18n( "Cannot open %1 for reading").arg(pabfile);
71 bool pab::convert(adr_t A,content_t ,content_t )
74 content_t start,stop,T;
110 while(start!=0) {adr_t cp;
114 dotable(table,start,stop);
126 void pab::dotable(adr_t T,content_t start,content_t stop)
149 while (cmp!=stop && REC!=pREC) {
166 while(cmp!=stop && REC!=pREC) {adr_t cp;
185 void pab::processRec(adr_t REC)
190 if (upper(hdr)==REC_OK) {
192 pabfields_t fields(rec, NULL);
194 if (fields.isOK() && fields.isUsable()) {
200 void pab::prt( unsigned char *,pabrec &,pabrec_entry )
204 #define PABREC_N (sizeof(pabrec)/sizeof(word_t))
206 void pab::rdPabRec(pabrec & )
216 bool pab::recUnknown(pabrec &)
221 bool pab::recNoFunction(pabrec & )
226 const char *pab::get( unsigned char *,pabrec_entry ,pabrec & )
231 void pab::getrange(pabrec & ,pabrec_entry ,word_t & ,word_t & )
241 bool pab::knownPAB( void)
245 if ( id!=PAB_FILE_ID) {TQString msg;
246 msg=i18n( "%1 has no PAB id that I know of, cannot convert this").arg(pabfile);
260 content_t pab::go(adr_t a)
269 content_t pab::read( void)
271 unsigned char mem[4];
273 in.readBlock(( char *) &mem, sizeof(A));
281 void pab::read(word_t & w)
283 unsigned char mem[2];
284 in.readBlock(( char *) &mem, sizeof(w));
289 content_t pab::relative( int words)
293 return go(a+(words* sizeof(content_t)));
296 content_t pab::add(adr_t & A, int words)
298 A+=(words* sizeof(content_t));
302 pabsize_t pab::size(content_t A)
307 word_t pab::lower(content_t A)
312 word_t pab::upper(content_t A)
317 void pab::size(content_t A,pabsize_t & s1,pabsize_t & s2)
323 byte_t pab::readbyte( void)
330 void pab::read( unsigned char *mem,content_t size)
332 in.readBlock(( char *) mem, size);
|