summaryrefslogtreecommitdiffabout
path: root/libkcal/attachment.h
authorzautrix <zautrix>2005-07-30 16:17:54 (UTC)
committer zautrix <zautrix>2005-07-30 16:17:54 (UTC)
commit6a32c95e5f0a36cd9a681a3f3302bec6e83acce5 (patch) (unidiff)
tree3f8da30f9fe779ae697c97e16eb4dd6f47c3ed00 /libkcal/attachment.h
parent9ca2cd947f22d33543e065f54c6487e86d80befa (diff)
downloadkdepimpi-6a32c95e5f0a36cd9a681a3f3302bec6e83acce5.zip
kdepimpi-6a32c95e5f0a36cd9a681a3f3302bec6e83acce5.tar.gz
kdepimpi-6a32c95e5f0a36cd9a681a3f3302bec6e83acce5.tar.bz2
fixx
Diffstat (limited to 'libkcal/attachment.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/attachment.h71
1 files changed, 48 insertions, 23 deletions
diff --git a/libkcal/attachment.h b/libkcal/attachment.h
index cdf2458..5301420 100644
--- a/libkcal/attachment.h
+++ b/libkcal/attachment.h
@@ -1,69 +1,94 @@
1/* 1/*
2 This file is part of libkcal. 2 This file is part of libkcal.
3
3 Copyright (c) 2002 Michael Brade <brade@kde.org> 4 Copyright (c) 2002 Michael Brade <brade@kde.org>
4 5
5 This library is free software; you can redistribute it and/or 6 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public 7 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either 8 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version. 9 version 2 of the License, or (at your option) any later version.
9 10
10 This library is distributed in the hope that it will be useful, 11 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details. 14 Library General Public License for more details.
14 15
15 You should have received a copy of the GNU Library General Public License 16 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to 17 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. 19 Boston, MA 02111-1307, USA.
19*/ 20*/
21#ifndef KCAL_ATTACHMENT_H
22#define KCAL_ATTACHMENT_H
20 23
21#ifndef _ATTACHMENT_H
22#define _ATTACHMENT_H
23 24
24#include <qstring.h>
25 25
26#include <qstring.h>
26 27
27namespace KCal { 28namespace KCal {
28 29
29/** 30/**
30 * This class represents information related to an attachment. 31 This class represents information related to an attachment.
31 */ 32*/
32class Attachment 33class Attachment
33{ 34{
34public: 35 public:
36
35 /** 37 /**
36 * Create a Reference to some URI. 38 Create a Reference to some URI by copying an existing Attachment.
37 * @param uri the uri this attachment refers to 39
38 * @param mime the mime type of the resource being linked to 40 @param attachment the attachment to be duplicated
39 */ 41 */
40 Attachment(const QString& uri, const QString& mime = QString::null); 42 Attachment( const Attachment &attachment );
41 43
42 /** 44 /**
43 * Create a binary attachment. 45 Create a Reference to some URI.
44 * @param base64 the attachment in base64 format 46
45 * @param mime the mime type of the attachment 47 @param uri the uri this attachment refers to
46 */ 48 @param mime the mime type of the resource being linked to
47 Attachment(const char *base64, const QString& mime = QString::null); 49 */
48 50 Attachment( const QString &uri, const QString &mime = QString::null );
49 /* The VALUE parameter in Cal */ 51
50 bool isURI() const; 52 /**
53 Create a binary attachment.
54
55 @param base64 the attachment in base64 format
56 @param mime the mime type of the attachment
57 */
58 Attachment( const char *base64, const QString &mime = QString::null );
59
60 /* The VALUE parameter in iCal */
61 bool isUri() const;
51 QString uri() const; 62 QString uri() const;
52 void setURI(const QString& uri); 63 void setUri( const QString &uri );
53 64
54 bool isBinary() const; 65 bool isBinary() const;
55 char *data() const; 66 char *data() const;
56 void setData(const char *base64); 67 void setData( const char *base64 );
57 68
58 /* The optional FMTTYPE parameter in iCal */ 69 /* The optional FMTTYPE parameter in iCal */
59 QString mimeType() const; 70 QString mimeType() const;
60 void setMimeType(const QString& mime); 71 void setMimeType( const QString &mime );
61private: 72
73 /* The custom X-CONTENT-DISPOSITION parameter, used by OGo etc. */
74 bool showInline() const;
75 void setShowInline( bool showinline );
76
77 /* The custom X-LABEL parameter to show a human-readable title */
78 QString label() const;
79 void setLabel( const QString &label );
80
81 private:
62 QString mMimeType; 82 QString mMimeType;
63 QString mData; 83 QString mData;
64 bool mBinary; 84 bool mBinary;
85 bool mShowInline;
86 QString mLabel;
87
88 class Private;
89 Private *d;
65}; 90};
66 91
67} 92}
68 93
69#endif 94#endif