• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.11.5 API Reference
  • KDE Home
  • Contact Us
 

KCalCore Library

  • kcalcore
attachment.h
Go to the documentation of this file.
1 /*
2  This file is part of the kcalcore library.
3 
4  Copyright (c) 2002 Michael Brade <brade@kde.org>
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Library General Public
8  License as published by the Free Software Foundation; either
9  version 2 of the License, or (at your option) any later version.
10 
11  This library is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  Library General Public License for more details.
15 
16  You should have received a copy of the GNU Library General Public License
17  along with this library; see the file COPYING.LIB. If not, write to
18  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  Boston, MA 02110-1301, USA.
20 */
29 #ifndef KCALCORE_ATTACHMENT_H
30 #define KCALCORE_ATTACHMENT_H
31 
32 #include "kcalcore_export.h"
33 
34 #include <QtCore/QHash>
35 #include <QtCore/QString>
36 #include <QtCore/QSharedPointer>
37 
38 namespace KCalCore {
39 
58 class KCALCORE_EXPORT Attachment
59 {
60 public:
64  typedef QSharedPointer<Attachment> Ptr;
65 
69  typedef QVector<Ptr> List;
70 
77  explicit Attachment(const QString &uri, const QString &mime = QString());
78 
86  explicit Attachment(const QByteArray &base64,
87  const QString &mime = QString());
88 
94  Attachment(const Attachment &attachment);
95 
99  ~Attachment();
100 
108  void setUri(const QString &uri);
109 
115  QString uri() const;
116 
122  bool isUri() const;
123 
129  bool isBinary() const;
130 
138  void setData(const QByteArray &base64);
139 
146  QByteArray data() const;
147 
155  void setDecodedData(const QByteArray &data);
156 
163  QByteArray decodedData() const;
164 
170  uint size() const;
171 
179  void setMimeType(const QString &mime);
180 
186  QString mimeType() const;
187 
197  void setShowInline(bool showinline);
198 
204  bool showInline() const;
205 
214  void setLabel(const QString &label);
215 
219  QString label() const;
220 
230  void setLocal(bool local);
231 
235  bool isLocal() const;
236 
241  Attachment &operator=(const Attachment &attachment);
242 
248  bool operator==(const Attachment &attachment) const;
249 
255  bool operator!=(const Attachment &attachment) const;
256 
257 private:
258  //@cond PRIVATE
259  class Private;
260  Private *const d;
261  //@endcond
262 };
263 
264 }
265 
266 //@cond PRIVATE
267 Q_DECLARE_TYPEINFO(KCalCore::Attachment::Ptr, Q_MOVABLE_TYPE);
268 //@endcond
269 
270 //@cond PRIVATE
271 inline uint qHash(const QSharedPointer<KCalCore::Attachment> &key)
272 {
273  return qHash<KCalCore::Attachment>(key.data());
274 }
275 //@endcond
276 
277 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Fri Jan 17 2014 22:11:59 by doxygen 1.8.3.1 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KCalCore Library

Skip menu "KCalCore Library"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdepimlibs-4.11.5 API Reference

Skip menu "kdepimlibs-4.11.5 API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal