File indexing completed on 2024-11-17 04:45:07

0001 /*
0002     SPDX-FileCopyrightText: 2014 Christian Mollekopf <mollekopf@kolabsys.com>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include <Akonadi/Item>
0010 #include <KMime/Message>
0011 #include <kimap/FetchJob>
0012 
0013 class MessageHelper
0014 {
0015 public:
0016     using Ptr = QSharedPointer<MessageHelper>;
0017 
0018     virtual ~MessageHelper();
0019     virtual Akonadi::Item createItemFromMessage(const KMime::Message::Ptr &message,
0020                                                 const qint64 uid,
0021                                                 const qint64 size,
0022                                                 const QMap<QByteArray, QVariant> &attrs,
0023                                                 const QList<QByteArray> &flags,
0024                                                 const KIMAP::FetchJob::FetchScope &scope,
0025                                                 bool &ok) const;
0026 };