Mailcommon

filterimporterclawsmail.h
1/*
2 SPDX-FileCopyrightText: 2012-2024 Laurent Montel <montel@kde.org>
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
12class QFile;
13class QTextStream;
14
15namespace MailCommon
16{
17class MailFilter;
18
19class MAILCOMMON_EXPORT FilterImporterClawsMails : public FilterImporterAbstract
20{
21public:
22 explicit FilterImporterClawsMails(QFile *file);
23 FilterImporterClawsMails(QString string);
24 // Use for unittests
25 FilterImporterClawsMails(bool interactive = false);
26 ~FilterImporterClawsMails();
27 [[nodiscard]] 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 [[nodiscard]] MailFilter *parseLine(const QString &line);
31
32private:
33 [[nodiscard]] MAILCOMMON_NO_EXPORT QString extractString(const QString &tmp, int &pos);
34 [[nodiscard]] MAILCOMMON_NO_EXPORT QString extractConditions(const QString &line, MailFilter *filter);
35 [[nodiscard]] MAILCOMMON_NO_EXPORT QString extractActions(const QString &line, MailFilter *filter);
36 MAILCOMMON_NO_EXPORT void readStream(QTextStream &stream);
37};
38}
The filter dialog.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 6 2024 12:02:04 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.