1/*
2 Copyright (c) 2001-2003 Cornelius Schumacher <schumacher@kde.org>
3 Copyright (c) 2004 Reinhold Kainhofer <reinhold@kainhofer.com>
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19*/
20/**
21 @file
22 This file is part of the API for handling TNEF data and provides
23 static Formatter helpers.
24
25 @brief
26 Provides helpers too format @acronym TNEF attachments into different
27 formats like eg. a HTML representation.
28
29 @author Cornelius Schumacher
30 @author Reinhold Kainhofer
31*/
32
33#ifndef KTNEF_FORMATTER_H
34#define KTNEF_FORMATTER_H
35
36#include <QtCore/QString>
37
38#include <kcalcore/memorycalendar.h>
39
40#include "ktnef_export.h"
41
42namespace KCal {
43class Calendar;
44class InvitationFormatterHelper;
45}
46
47namespace KCalUtils {
48 class InvitationFormatterHelper;
49}
50
51namespace KTnef {
52
53#ifndef KDEPIM_NO_KCAL
54 /**
55 Formats a @acronym TNEF attachment to an HTML mail.
56
57 @param tnef is the QByteArray contain the @acronym TNEF data.
58 @param cal is a pointer to a Calendar object.
59 @param h is a pointer to a InvitationFormatterHelp object.
60 */
61 KTNEF_DEPRECATED_EXPORT QString formatTNEFInvitation( const QByteArray &tnef,
62 KCal::Calendar *cal,
63 KCal::InvitationFormatterHelper *h );
64#endif
65
66 /**
67 Formats a @acronym TNEF attachment to an HTML mail.
68
69 @param tnef is the QByteArray contain the @acronym TNEF data.
70 @param cal is a pointer to a Calendar object.
71 @param h is a pointer to a InvitationFormatterHelp object.
72 */
73 KTNEF_EXPORT QString formatTNEFInvitation( const QByteArray &tnef,
74 const KCalCore::MemoryCalendar::Ptr &cal,
75 KCalUtils::InvitationFormatterHelper *h );
76
77 /**
78 Transforms a @acronym TNEF attachment to an iCal or vCard.
79
80 @param tnef is the QByteArray containing the @acronym TNEF data.
81
82 @return a string containing the transformed attachment.
83 */
84 KTNEF_EXPORT QString msTNEFToVPart( const QByteArray &tnef );
85}
86
87#endif
88