home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / ktnef / ktnefparser.h < prev    next >
Encoding:
C/C++ Source or Header  |  2005-09-10  |  1.5 KB  |  59 lines

  1. /*
  2.     ktnefparser.h
  3.  
  4.     Copyright (C) 2002 Michael Goffioul <kdeprint@swing.be>
  5.  
  6.     This file is part of KTNEF, the KDE TNEF support library/program.
  7.  
  8.     This program is free software; you can redistribute it and/or modify
  9.     it under the terms of the GNU General Public License as published by
  10.     the Free Software Foundation; either version 2 of the License, or
  11.     (at your option) any later version.
  12.  
  13.     You should have received a copy of the GNU General Public License
  14.     along with this program; if not, write to the Free Software Foundation,
  15.     Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
  16.  */
  17.  
  18. #ifndef KTNEFPARSER_H
  19. #define    KTNEFPARSER_H
  20.  
  21. #include <qptrlist.h>
  22. #include <qstring.h>
  23. #include <qmap.h>
  24. #include <kdepimmacros.h>
  25.  
  26. class KTNEFAttach;
  27. class KTNEFMessage;
  28. class KTNEFProperty;
  29.  
  30. class KDE_EXPORT KTNEFParser
  31. {
  32. public:
  33.     KTNEFParser();
  34.     ~KTNEFParser();
  35.  
  36.     bool openFile(const QString& filename);
  37.     bool openDevice( QIODevice *device );
  38.     bool extractFile(const QString& filename);
  39.     bool extractFileTo(const QString& filename, const QString& dirname);
  40.     bool extractAll();
  41.     void setDefaultExtractDir(const QString& dirname);
  42.     KTNEFMessage* message() const;
  43.  
  44. private:
  45.     bool decodeAttachment();
  46.     bool decodeMessage();
  47.     bool extractAttachmentTo(KTNEFAttach *att, const QString& dirname);
  48.     bool parseDevice();
  49.     void checkCurrent(int state);
  50.     bool readMAPIProperties(QMap<int,KTNEFProperty*>& pros, KTNEFAttach *attach = 0);
  51.     void deleteDevice();
  52.  
  53. private:
  54.     class ParserPrivate;
  55.     ParserPrivate *d;
  56. };
  57.  
  58. #endif
  59.