File indexing completed on 2024-06-23 05:19:20

0001 /*
0002    SPDX-FileCopyrightText: 2017 Sandro Knauß <sknauss@kde.org>
0003 
0004    SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include "interfaces/bodypart.h"
0010 #include "interfaces/bodypartformatter.h"
0011 
0012 namespace MimeTreeParser
0013 {
0014 class EncryptedBodyPartFormatter : public Interface::BodyPartFormatter
0015 {
0016 public:
0017     enum EncryptionFlag {
0018         AutoPGP = 0x0, ///< Detect PGP data automatically
0019         ForcePGP = 0x1, ///< Always decode PGP data
0020     };
0021     Q_DECLARE_FLAGS(EncryptionFlags, EncryptionFlag)
0022 
0023     [[nodiscard]] MessagePartPtr process(Interface::BodyPart &part) const override;
0024     static const Interface::BodyPartFormatter *create(EncryptionFlags flags);
0025 
0026 private:
0027     EncryptionFlags mFlags;
0028 };
0029 
0030 Q_DECLARE_OPERATORS_FOR_FLAGS(EncryptedBodyPartFormatter::EncryptionFlags)
0031 }