00001
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 <tqstring.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 TQString &uri, const TQString &mime = TQString() );
00053
00060 Attachment( const char *base64, const TQString &mime = TQString() );
00061
00062 ~Attachment();
00063
00064
00065 bool isUri() const;
00066 TQString uri() const;
00067 void setUri( const TQString &uri );
00068
00069 bool isBinary() const;
00070 char *data() const;
00071 void setData( const char *base64 );
00072
00073 void setDecodedData( const TQByteArray &data );
00074 TQByteArray &decodedData();
00075
00076 uint size();
00077
00078
00079 TQString mimeType() const;
00080 void setMimeType( const TQString &mime );
00081
00082
00083 bool showInline() const;
00084 void setShowInline( bool showinline );
00085
00086
00087 TQString label() const;
00088 void setLabel( const TQString &label );
00089
00099 void setLocal( bool local );
00100
00104 bool isLocal() const;
00105
00106 private:
00107 TQByteArray mDataCache;
00108 uint mSize;
00109 TQString mMimeType;
00110 TQString mUri;
00111 char *mData;
00112 TQString mLabel;
00113 bool mBinary;
00114 bool mLocal;
00115 bool mShowInline;
00116
00117 class Private;
00118 Private *d;
00119 };
00120
00121 }
00122
00123 #endif