Mailcommon

filterimporterclawsmail.h
1 /*
2  SPDX-FileCopyrightText: 2012-2022 Laurent Montel <[email protected]>
3 
4  SPDX-License-Identifier: GPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include "filterimporterabstract.h"
10 #include "mailcommon_export.h"
11 
12 class QFile;
13 class QTextStream;
14 
15 namespace MailCommon
16 {
17 class MailFilter;
18 
19 class MAILCOMMON_EXPORT FilterImporterClawsMails : public FilterImporterAbstract
20 {
21 public:
22  explicit FilterImporterClawsMails(QFile *file);
23  FilterImporterClawsMails(QString string);
24  // Use for unittests
25  FilterImporterClawsMails(bool interactive = false);
26  ~FilterImporterClawsMails();
27  static QString defaultFiltersSettingsPath();
28 
29  // the returned mail filter instance will be owned by the caller, who must ensure to delete it at some point
30  Q_REQUIRED_RESULT MailFilter *parseLine(const QString &line);
31 
32 private:
33  Q_REQUIRED_RESULT QString extractString(const QString &tmp, int &pos);
34  Q_REQUIRED_RESULT QString extractConditions(const QString &line, MailFilter *filter);
35  Q_REQUIRED_RESULT QString extractActions(const QString &line, MailFilter *filter);
36  void readStream(QTextStream &stream);
37 };
38 }
The filter dialog.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Sat Sep 24 2022 03:58:15 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.