KTNEF Library
ktnefparser.h
Go to the documentation of this file.
00001 /* 00002 ktnefparser.h 00003 00004 Copyright (C) 2002 Michael Goffioul <kdeprint@swing.be> 00005 00006 This file is part of KTNEF, the KDE TNEF support library/program. 00007 00008 This library is free software; you can redistribute it and/or 00009 modify it under the terms of the GNU Library General Public 00010 License as published by the Free Software Foundation; either 00011 version 2 of the License, or (at your option) any later version. 00012 00013 This library is distributed in the hope that it will be useful, 00014 but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 Library General Public License for more details. 00017 00018 You should have received a copy of the GNU Library General Public License 00019 along with this library; see the file COPYING.LIB. If not, write to 00020 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00021 Boston, MA 02110-1301, USA. 00022 */ 00031 #ifndef KTNEFPARSER_H 00032 #define KTNEFPARSER_H 00033 00034 #include <QtCore/QString> 00035 #include <QtCore/QMap> 00036 #include <QtCore/QIODevice> 00037 #include "ktnef_export.h" 00038 00039 namespace KTnef { class KTNEFAttach; } 00040 namespace KTnef { class KTNEFMessage; } 00041 namespace KTnef { class KTNEFProperty; } 00042 00043 namespace KTnef { 00044 00049 class KTNEF_EXPORT KTNEFParser 00050 { 00051 public: 00055 KTNEFParser(); 00056 00060 ~KTNEFParser(); 00061 00068 bool openFile( const QString &filename ) const; 00069 00076 bool openDevice( QIODevice *device ); 00077 00085 bool extractFile( const QString &filename ) const; 00086 00097 bool extractFileTo( const QString &filename, const QString &dirname ) const; 00098 00104 bool extractAll(); 00105 00111 void setDefaultExtractDir( const QString &dirname ); 00112 00118 KTNEFMessage *message() const; 00119 00120 private: 00121 //@cond PRIVATE 00122 class ParserPrivate; 00123 ParserPrivate *const d; 00124 //@endcond 00125 00126 Q_DISABLE_COPY( KTNEFParser ) 00127 }; 00128 00129 } 00130 #endif