kopete/protocols/messenger/libpapillon
mimeheader.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef PAPILLONMIMEHEADER_H
00016 #define PAPILLONMIMEHEADER_H
00017
00018 #include <Papillon/Macros>
00019
00020 #include <QtCore/QSharedDataPointer>
00021 #include <QtCore/QVariant>
00022
00023 namespace Papillon
00024 {
00025
00037 class PAPILLON_EXPORT MimeHeader
00038 {
00039 public:
00043 MimeHeader();
00049 MimeHeader(const MimeHeader ©);
00053 ~MimeHeader();
00060 MimeHeader &operator=(const MimeHeader &other);
00061
00068 static MimeHeader parseMimeHeader(const QString &data);
00069
00075 bool isValid() const;
00076
00082 bool hasKey(const QString &key) const;
00083
00088 QVariant value(const QString &key) const;
00094 void setValue(const QString &key, const QVariant &value);
00095
00100 QString mimeVersion() const;
00106 void setMimeVersion(const QString &mimeVersion = QString("1.0"));
00107
00112 QString contentType() const;
00117 void setContentType(const QString &type);
00118
00123 QString charset() const;
00128 void setCharset(const QString &charset);
00129
00134 QString toString() const;
00135
00136 private:
00137 class Private;
00138 QSharedDataPointer<Private> d;
00139 };
00140
00141 }
00142
00143 #endif