MailImporter

filters.h
1 /***************************************************************************
2  filters.h - description
3  -------------------
4  begin : Fri Jun 30 2000
5  copyright : (C) 2000 by Hans Dijkema
6  email : [email protected]
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 /* Copyright (c) 2012-2020 Laurent Montel <[email protected]> */
18 
19 #ifndef FILTERS_H
20 #define FILTERS_H
21 
22 #ifndef MAX_LINE
23 #define MAX_LINE 4096
24 #endif
25 
26 #include "filterinfo.h"
27 #include "filters.h"
28 #include "mailimporter_export.h"
29 
30 #include <MailImporter/FilterImporterBase>
31 
32 #include <QDir>
33 
34 namespace MailImporter {
39 class MAILIMPORTER_EXPORT Filter
40 {
41 public:
42  explicit Filter(const QString &name, const QString &author, const QString &info = QString());
43  virtual ~Filter();
44  virtual void import() = 0;
45 
46  Q_REQUIRED_RESULT QString author() const;
47  Q_REQUIRED_RESULT QString name() const;
48  Q_REQUIRED_RESULT QString info() const;
49 
50  void setAuthor(const QString &);
51  void setName(const QString &);
52  void setInfo(const QString &);
53 
54  void clear();
55  void setFilterInfo(MailImporter::FilterInfo *info);
56 
57  MailImporter::FilterInfo *filterInfo() const;
58 
59  void setFilterImporter(MailImporter::FilterImporterBase *importer);
60  MailImporter::FilterImporterBase *filterImporter() const;
61 
62  void clearCountDuplicate();
63  Q_REQUIRED_RESULT int countDuplicates() const;
64 
65  void setMailDir(const QString &mailDir);
66  Q_REQUIRED_RESULT QString mailDir() const;
67 
68 protected:
69  static int countDirectory(const QDir &dir, bool searchHiddenDirectory);
70  Q_REQUIRED_RESULT bool importMessage(const QString &folderName, const QString &msgPath, bool duplicateCheck, const MessageStatus &status = MailImporter::MessageStatus());
71 private:
72  class Private;
73  Private *const d;
74 };
75 }
76 
77 #endif
The FilterImporterBase class.
The Filter class.
Definition: filters.h:39
The MessageStatus class.
Definition: messagestatus.h:30
The FilterInfo class.
Definition: filterinfo.h:30
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sun Jul 5 2020 23:15:54 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.