MailImporter

filteroe.h
1/*
2 filter_oe.h - Outlook Express mail import
3
4 SPDX-FileCopyrightText: 2003 Laurence Anderson <l.d.anderson@warwick.ac.uk>
5
6 SPDX-License-Identifier: GPL-2.0-or-later
7*/
8
9#pragma once
10
11#include "filters.h"
12
13#include <QList>
14
15#include "mailimporter_utils.h"
16namespace MailImporter
17{
18/**
19 *imports outlook text messages into KMail
20 *@author Laurence Anderson
21 */
22class MAILIMPORTER_EXPORT FilterOE : public Filter
23{
24public:
25 FilterOE();
26 ~FilterOE() override;
27
28 void import() override;
29 void importMails(const QString &maildir);
30
31private:
32 MAILIMPORTER_NO_EXPORT void importMailBox(const QString &fileName);
33 MAILIMPORTER_NO_EXPORT void mbxImport(QDataStream &ds);
34 MAILIMPORTER_NO_EXPORT void dbxImport(QDataStream &ds);
35 MAILIMPORTER_NO_EXPORT void dbxReadIndex(QDataStream &ds, int filePos);
36 MAILIMPORTER_NO_EXPORT void dbxReadDataBlock(QDataStream &ds, int filePos);
37 MAILIMPORTER_NO_EXPORT void dbxReadEmail(QDataStream &ds, int filePos);
38
39 /** helperfunctions for folder structure support */
40 [[nodiscard]] MAILIMPORTER_NO_EXPORT QString parseFolderOEString(QDataStream &ds, int filePos);
41 [[nodiscard]] MAILIMPORTER_NO_EXPORT QString getFolderName(const QString &filename);
42
43 /** which file (of totalFiles) is now in the work? */
44 int currentFile;
45 /** total number of files that get imported */
46 int totalFiles;
47 /** total emails in current file */
48 int totalEmails;
49 /** which email (of totalFiles) is now in the work? */
50 int currentEmail;
51 /** number of imported mails with flag 0x04 */
52 int count0x04;
53 /** number of imported mails with flag 0x84 */
54 int count0x84;
55
56 /** true if the folderstructure is parsed */
57 bool parsedFolder;
58 /** true if the current parsing file is the folder file */
59 bool currentIsFolderFile;
60
61 /** Folder structure with following 4 entries:
62 1. descriptive folder name
63 2. filename
64 3. ID of current folder
65 4. ID of parent folder
66 */
68 /** matrix with information about the folder structure*/
69 QList<FolderStructure> folderStructure;
70 using FolderStructureIterator = QList<FolderStructure>::Iterator;
71
72 /** name of the current folder */
73 QString folderName;
74 /** name of the chosen folder */
75};
76}
imports outlook text messages into KMail
Definition filteroe.h:23
The Filter class.
Definition filters.h:29
Glorified QString[N] for (a) understandability (b) older gcc compatibility.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:14:55 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.