~ubuntu-branches/ubuntu/raring/kdepim/raring-proposed

« back to all changes in this revision

Viewing changes to kmailcvt/filter_pmail.hxx

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2012-06-07 07:56:38 UTC
  • mfrom: (0.2.27)
  • Revision ID: package-import@ubuntu.com-20120607075638-0luhdq11z7sgvs4m
Tags: 4:4.8.80-0ubuntu1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/***************************************************************************
2
 
                          FilterPMail.hxx  -  Pegasus-Mail import
3
 
                             -------------------
4
 
    begin                : Sat Jan 6 2001
5
 
    copyright            : (C) 2001 by Holger Schurig
6
 
    email                : holgerschurig@gmx.de
7
 
 ***************************************************************************/
8
 
 
9
 
/***************************************************************************
10
 
 *                                                                         *
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.                                   *
15
 
 *                                                                         *
16
 
 ***************************************************************************/
17
 
 
18
 
#ifndef FILTER_PMAIL_HXX
19
 
#define FILTER_PMAIL_HXX
20
 
 
21
 
#include <QDir>
22
 
 
23
 
#include "filters.hxx"
24
 
 
25
 
class FilterPMail : public Filter
26
 
{
27
 
public:
28
 
    FilterPMail();
29
 
    ~FilterPMail();
30
 
 
31
 
    void import(FilterInfo *info);
32
 
 
33
 
protected:
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); 
46
 
    
47
 
private:
48
 
    /** the working directory */
49
 
    QDir dir;
50
 
    /**  pointer to the info */
51
 
    FilterInfo * inf;
52
 
 
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
61
 
    */
62
 
    QList<FolderStructure> folderMatrix;
63
 
    typedef QList<FolderStructure>::Iterator FolderStructureIterator;
64
 
    
65
 
    bool folderParsed;
66
 
    
67
 
    QString chosenDir;
68
 
    
69
 
    /** which file (of totalFiles) is now in the work? */
70
 
    int currentFile;
71
 
    /** total number of files that get imported */
72
 
    int totalFiles;
73
 
    
74
 
};
75
 
#endif