1 /***************************************************************************
2 filter_oe.hxx - Outlook Express mail import
5 copyright : (C) 2003 by Laurence Anderson
6 email : l.d.anderson@warwick.ac.uk
7 ***************************************************************************/
9 /***************************************************************************
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
16 ***************************************************************************/
21 #include "filters.hxx"
26 *imports outlook text messages into KMail
27 *@author Laurence Anderson
30 class FilterOE
: public Filter
36 void import(FilterInfo
*info
);
39 void importMailBox( FilterInfo
*info
, const QString
& fileName
);
40 void mbxImport( FilterInfo
*info
, QDataStream
& ds
);
41 void dbxImport( FilterInfo
*info
, QDataStream
& ds
);
42 void dbxReadIndex( FilterInfo
*info
, QDataStream
& ds
, int filePos
);
43 void dbxReadDataBlock( FilterInfo
*info
, QDataStream
& ds
, int filePos
);
44 void dbxReadEmail( FilterInfo
*info
, QDataStream
& ds
, int filePos
);
46 /** helperfunctions for folder structure support */
47 QString
parseFolderString( QDataStream
& ds
, int filePos
);
48 QString
getFolderName(QString filename
);
50 private: // Private methods
51 /** which file (of totalFiles) is now in the work? */
53 /** total number of files that get imported */
55 /** total emails in current file */
57 /** which email (of totalFiles) is now in the work? */
59 /** number of imported mails with flag 0x04 */
61 /** number of imported mails with flag 0x84 */
64 /** true if the folderstructure is parsed */
66 /** true if the current parsing file is the folder file */
67 bool currentIsFolderFile
;
69 /** Folder structure with following 4 entries:
70 1. descriptive folder name
72 3. ID of current folder
73 4. ID of parent folder
75 typedef FolderStructureBase
<4> FolderStructure
;
76 /** matrix with information about the folder structure*/
77 QList
<FolderStructure
> folderStructure
;
78 typedef QList
<FolderStructure
>::Iterator FolderStructureIterator
;
80 /** name of the current folder */
82 /** name of the chosen folder */