1
/***************************************************************************
2
FilterPMail.hxx - Pegasus-Mail import
5
copyright : (C) 2001 by Holger Schurig
6
email : holgerschurig@gmx.de
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
***************************************************************************/
18
#ifndef FILTER_PMAIL_HXX
19
#define FILTER_PMAIL_HXX
23
#include "filters.hxx"
25
class FilterPMail : public Filter
31
void import(FilterInfo *info);
34
/** this looks for all files with the filemask 'mask' and calls the 'workFunc' on each of them */
35
void processFiles(const QString& mask, void(FilterPMail::* workFunc)(const QString&) );
36
/** this function imports one *.CNM message */
37
void importNewMessage(const QString& file);
38
/** this function imports one mail folder file (*.PMM) */
39
void importMailFolder(const QString& file);
40
/** imports a 'unix' format mail folder (*.MBX) */
41
void importUnixMailFolder(const QString& file);
42
/** this function recreate the folder structure */
43
bool parseFolderMatrix();
44
/** this function parse the folder structure */
45
QString getFolderName(QString ID);
48
/** the working directory */
50
/** pointer to the info */
53
/** Folder structure here has 5 entries. */
54
typedef FolderStructureBase<5> FolderStructure;
55
/** List with the folder matrix, which contains following strings:
56
1. type (2 for root-folder, 1 for folder, 0 for mailarchiv)
57
2. type (1 for root-folder, 3 for folder, 0 for mailarchiv)
58
3. "ID:flag:filename" of folder/archiv
59
4. "ID:name" of parent folder
60
5. name of folder/archiv
62
QList<FolderStructure> folderMatrix;
63
typedef QList<FolderStructure>::Iterator FolderStructureIterator;
69
/** which file (of totalFiles) is now in the work? */
71
/** total number of files that get imported */