KMime

kmime_util.h
1 /* -*- c++ -*-
2  kmime_util.h
3 
4  KMime, the KDE Internet mail/usenet news message library.
5  Copyright (c) 2001 the KMime authors.
6  See file AUTHORS for details
7 
8  This library is free software; you can redistribute it and/or
9  modify it under the terms of the GNU Library General Public
10  License as published by the Free Software Foundation; either
11  version 2 of the License, or (at your option) any later version.
12 
13  This library is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  Library General Public License for more details.
17 
18  You should have received a copy of the GNU Library General Public License
19  along with this library; see the file COPYING.LIB. If not, write to
20  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21  Boston, MA 02110-1301, USA.
22 */
23 #ifndef __KMIME_UTIL_H__
24 #define __KMIME_UTIL_H__
25 
26 #include "kmime_export.h"
27 #include "kmime_headers.h"
28 #include "kmime_content.h"
29 
30 #include <QString>
31 #include <QVector>
32 
33 namespace KMime
34 {
35 
36 class Message;
37 
42 KMIME_EXPORT extern bool isUsAscii(const QString &s);
43 
51 KMIME_EXPORT extern QString nameForEncoding(KMime::Headers::contentEncoding enc);
52 
58 Q_REQUIRED_RESULT KMIME_EXPORT QVector<KMime::Headers::contentEncoding> encodingsForData(const QByteArray &data);
59 
71 KMIME_EXPORT extern void setUseOutlookAttachmentEncoding(bool violateStandard);
72 
76 KMIME_EXPORT extern bool useOutlookAttachmentEncoding();
77 
86 KMIME_EXPORT extern QByteArray multiPartBoundary();
87 
93 KMIME_EXPORT extern QByteArray unfoldHeader(const QByteArray &header);
94 KMIME_EXPORT extern QByteArray unfoldHeader(const char *header, size_t headerSize);
95 
106 KMIME_EXPORT extern QByteArray extractHeader(const QByteArray &src,
107  const QByteArray &name);
108 
121 KMIME_EXPORT extern QByteArray CRLFtoLF(const QByteArray &s);
122 
135 KMIME_EXPORT extern QByteArray CRLFtoLF(const char *s);
136 
150 KMIME_EXPORT extern QByteArray LFtoCRLF(const QByteArray &s);
151 
164 KMIME_EXPORT extern QByteArray CRtoLF(const char *s);
165 
179 KMIME_EXPORT extern QByteArray CRtoLF(const QByteArray &s);
180 
181 
189 KMIME_EXPORT extern void removeQuotes(QByteArray &str);
190 
198 KMIME_EXPORT extern void removeQuotes(QString &str);
199 
207 KMIME_EXPORT extern void addQuotes(QByteArray &str, bool forceQuotes);
208 
215 KMIME_EXPORT extern void addQuotes(QString &str, bool forceQuotes);
216 
258 KMIME_EXPORT QString balanceBidiState(const QString &input);
259 
268 KMIME_EXPORT QString removeBidiControlChars(const QString &input);
269 
275 KMIME_EXPORT bool isAttachment(Content *content);
276 
283 KMIME_EXPORT bool hasAttachment(Content *content);
284 
291 KMIME_EXPORT bool hasInvitation(Content *content);
292 
299 KMIME_EXPORT bool isSigned(Message *message);
300 
307 KMIME_EXPORT bool isEncrypted(Message *message);
308 
313 KMIME_EXPORT bool isCryptoPart(Content *content);
314 
321 KMIME_EXPORT bool isInvitation(Content *content);
322 
323 } // namespace KMime
324 
325 #endif /* __KMIME_UTIL_H__ */
This file is part of the API for handling MIME data and defines the Content class.
This file is part of the API for handling MIME data and defines the various header classes: ...
contentEncoding
Various possible values for the "Content-Transfer-Encoding" header.
Definition: kmime_headers.h:74
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat Jul 11 2020 23:11:42 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.