diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | 460c52653ab0dcca6f19a4f492ed2c5e4e963ab0 (patch) | |
tree | 67208f7c145782a7e90b123b982ca78d88cc2c87 /kmailcvt/filter_oe.hxx | |
download | tdepim-460c52653ab0dcca6f19a4f492ed2c5e4e963ab0.tar.gz tdepim-460c52653ab0dcca6f19a4f492ed2c5e4e963ab0.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmailcvt/filter_oe.hxx')
-rw-r--r-- | kmailcvt/filter_oe.hxx | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/kmailcvt/filter_oe.hxx b/kmailcvt/filter_oe.hxx new file mode 100644 index 00000000..348b29ff --- /dev/null +++ b/kmailcvt/filter_oe.hxx @@ -0,0 +1,84 @@ +/*************************************************************************** + filter_oe.hxx - Outlook Express mail import + ------------------- + begin : Sat Feb 1 2003 + copyright : (C) 2003 by Laurence Anderson + email : l.d.anderson@warwick.ac.uk + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef FILTER_OE_HXX +#define FILTER_OE_HXX + +#include "filters.hxx" + +/** + *imports outlook text messages into KMail + *@author Laurence Anderson + */ + +class FilterOE : public Filter +{ +public: + FilterOE(); + ~FilterOE(); + + void import(FilterInfo *info); + +protected: + void importMailBox( FilterInfo *info, const QString& fileName); + void mbxImport( FilterInfo *info, QDataStream& ds); + void dbxImport( FilterInfo *info, QDataStream& ds); + void dbxReadIndex( FilterInfo *info, QDataStream& ds, int filePos); + void dbxReadDataBlock( FilterInfo *info, QDataStream& ds, int filePos); + void dbxReadEmail( FilterInfo *info, QDataStream& ds, int filePos); + + /** helperfunctions for folder structure support */ + QString parseFolderString( QDataStream& ds, int filePos); + QString getFolderName(QString filename); + +private: // Private methods + /** which file (of totalFiles) is now in the work? */ + int currentFile; + /** total number of files that get imported */ + int totalFiles; + /** total emails in current file */ + int totalEmails; + /** which email (of totalFiles) is now in the work? */ + int currentEmail; + /** number of imported mails with flag 0x04 */ + int count0x04; + /** number of imported mails with flag 0x84 */ + int count0x84; + + /** true if the folderstructure is parsed */ + bool parsedFolder; + /** true if the current parsing file is the folder file */ + bool currentIsFolderFile; + + /** Folder structure with following 4 entries: + 1. descriptive folder name + 2. filename + 3. ID of current folder + 4. ID of parent folder + */ + typedef FolderStructureBase<4> FolderStructure; + /** matrix with information about the folder structure*/ + QValueList<FolderStructure> folderStructure; + typedef QValueList<FolderStructure>::Iterator FolderStructureIterator; + + /** name of the current folder */ + QString folderName; + /** name of the chosen folder */ + QString mailDir; +}; + +#endif |