KCalCore Library
attachment.h
Go to the documentation of this file.
00001 /* 00002 This file is part of the kcalcore library. 00003 00004 Copyright (c) 2002 Michael Brade <brade@kde.org> 00005 00006 This library is free software; you can redistribute it and/or 00007 modify it under the terms of the GNU Library General Public 00008 License as published by the Free Software Foundation; either 00009 version 2 of the License, or (at your option) any later version. 00010 00011 This library is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 Library General Public License for more details. 00015 00016 You should have received a copy of the GNU Library General Public License 00017 along with this library; see the file COPYING.LIB. If not, write to 00018 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00019 Boston, MA 02110-1301, USA. 00020 */ 00029 #ifndef KCALCORE_ATTACHMENT_H 00030 #define KCALCORE_ATTACHMENT_H 00031 00032 #include "kcalcore_export.h" 00033 00034 #include <QtCore/QHash> 00035 #include <QtCore/QString> 00036 #include <QtCore/QSharedPointer> 00037 00038 namespace KCalCore { 00039 00058 class KCALCORE_EXPORT Attachment 00059 { 00060 public: 00064 typedef QSharedPointer<Attachment> Ptr; 00065 00069 typedef QVector<Ptr> List; 00070 00077 explicit Attachment( const QString &uri, const QString &mime = QString() ); 00078 00086 explicit Attachment( const QByteArray &base64, 00087 const QString &mime = QString() ); 00088 00094 Attachment( const Attachment &attachment ); 00095 00099 ~Attachment(); 00100 00108 void setUri( const QString &uri ); 00109 00115 QString uri() const; 00116 00122 bool isUri() const; 00123 00129 bool isBinary() const; 00130 00138 void setData( const QByteArray &base64 ); 00139 00146 QByteArray data() const; 00147 00155 void setDecodedData( const QByteArray &data ); 00156 00163 QByteArray decodedData() const; 00164 00170 uint size() const; 00171 00179 void setMimeType( const QString &mime ); 00180 00186 QString mimeType() const; 00187 00197 void setShowInline( bool showinline ); 00198 00204 bool showInline() const; 00205 00214 void setLabel( const QString &label ); 00215 00219 QString label() const; 00220 00230 void setLocal( bool local ); 00231 00235 bool isLocal() const; 00236 00240 Attachment &operator=( const Attachment &attachment ); 00241 00247 bool operator==( const Attachment &attachment ) const; 00248 00254 bool operator!=( const Attachment &attachment ) const; 00255 00256 private: 00257 //@cond PRIVATE 00258 class Private; 00259 Private *const d; 00260 //@endcond 00261 }; 00262 00263 } 00264 00265 Q_DECLARE_TYPEINFO( KCalCore::Attachment::Ptr, Q_MOVABLE_TYPE ); 00266 00267 //@cond PRIVATE 00268 inline uint qHash( const QSharedPointer<KCalCore::Attachment> &key ) 00269 { 00270 return qHash<KCalCore::Attachment>( key.data() ); 00271 } 00272 //@endcond 00273 00274 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon May 7 2012 23:54:00 by doxygen 1.8.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon May 7 2012 23:54:00 by doxygen 1.8.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.