File indexing completed on 2024-04-28 05:19:25
0001 /* 0002 SPDX-FileCopyrightText: 2001-2003 Cornelius Schumacher <schumacher@kde.org> 0003 SPDX-FileCopyrightText: 2004 Reinhold Kainhofer <reinhold@kainhofer.com> 0004 0005 SPDX-License-Identifier: LGPL-2.0-or-later 0006 */ 0007 /** 0008 @file 0009 This file is part of the API for handling TNEF data and provides 0010 static Formatter helpers. 0011 0012 @brief 0013 Provides helpers too format @acronym TNEF attachments into different 0014 formats like eg. a HTML representation. 0015 0016 @author Cornelius Schumacher 0017 @author Reinhold Kainhofer 0018 */ 0019 0020 #pragma once 0021 0022 #include <KCalendarCore/MemoryCalendar> 0023 #include <QString> 0024 0025 #include "ktnef_export.h" 0026 0027 namespace KCalUtils 0028 { 0029 class InvitationFormatterHelper; 0030 } 0031 0032 namespace KTnef 0033 { 0034 /** 0035 Formats a @acronym TNEF attachment to an HTML mail. 0036 0037 @param tnef is the QByteArray contain the @acronym TNEF data. 0038 @param cal is a pointer to a Calendar object. 0039 @param h is a pointer to a InvitationFormatterHelp object. 0040 */ 0041 [[nodiscard]] KTNEF_EXPORT QString formatTNEFInvitation(const QByteArray &tnef, 0042 const KCalendarCore::MemoryCalendar::Ptr &cal, 0043 KCalUtils::InvitationFormatterHelper *h); 0044 0045 /** 0046 Transforms a @acronym TNEF attachment to an iCal or vCard. 0047 0048 @param tnef is the QByteArray containing the @acronym TNEF data. 0049 0050 @return a string containing the transformed attachment. 0051 */ 0052 [[nodiscard]] KTNEF_EXPORT QString msTNEFToVPart(const QByteArray &tnef); 0053 }