libkcal
attachment.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef KCAL_ATTACHMENT_H
00022 #define KCAL_ATTACHMENT_H
00023
00024 #include "listbase.h"
00025 #include "libkcal_export.h"
00026
00027 #include <qstring.h>
00028
00029 namespace KCal {
00030
00034 class KDE_EXPORT Attachment
00035 {
00036 public:
00037 typedef ListBase<Attachment> List;
00038
00044 Attachment( const Attachment &attachment );
00045
00052 Attachment( const QString &uri, const QString &mime = QString::null );
00053
00060 Attachment( const char *base64, const QString &mime = QString::null );
00061
00062 ~Attachment();
00063
00064
00065 bool isUri() const;
00066 QString uri() const;
00067 void setUri( const QString &uri );
00068
00069 bool isBinary() const;
00070 char *data() const;
00071 void setData( const char *base64 );
00072
00073 void setDecodedData( const QByteArray &data );
00074 QByteArray &decodedData();
00075
00076 uint size();
00077
00078
00079 QString mimeType() const;
00080 void setMimeType( const QString &mime );
00081
00082
00083 bool showInline() const;
00084 void setShowInline( bool showinline );
00085
00086
00087 QString label() const;
00088 void setLabel( const QString &label );
00089
00099 void setLocal( bool local );
00100
00104 bool isLocal() const;
00105
00106 private:
00107 QByteArray mDataCache;
00108 uint mSize;
00109 QString mMimeType;
00110 QString mUri;
00111 char *mData;
00112 QString mLabel;
00113 bool mBinary;
00114 bool mLocal;
00115 bool mShowInline;
00116
00117 class Private;
00118 Private *d;
00119 };
00120
00121 }
00122
00123 #endif
|