-rw-r--r-- | libkcal/attachment.h | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/libkcal/attachment.h b/libkcal/attachment.h new file mode 100644 index 0000000..cdf2458 --- a/dev/null +++ b/libkcal/attachment.h | |||
@@ -0,0 +1,69 @@ | |||
1 | /* | ||
2 | This file is part of libkcal. | ||
3 | Copyright (c) 2002 Michael Brade <brade@kde.org> | ||
4 | |||
5 | This library is free software; you can redistribute it and/or | ||
6 | modify it under the terms of the GNU Library General Public | ||
7 | License as published by the Free Software Foundation; either | ||
8 | version 2 of the License, or (at your option) any later version. | ||
9 | |||
10 | This library is distributed in the hope that it will be useful, | ||
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | Library General Public License for more details. | ||
14 | |||
15 | 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 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | ||
18 | Boston, MA 02111-1307, USA. | ||
19 | */ | ||
20 | |||
21 | #ifndef _ATTACHMENT_H | ||
22 | #define _ATTACHMENT_H | ||
23 | |||
24 | #include <qstring.h> | ||
25 | |||
26 | |||
27 | namespace KCal { | ||
28 | |||
29 | /** | ||
30 | * This class represents information related to an attachment. | ||
31 | */ | ||
32 | class Attachment | ||
33 | { | ||
34 | public: | ||
35 | /** | ||
36 | * Create a Reference to some URI. | ||
37 | * @param uri the uri this attachment refers to | ||
38 | * @param mime the mime type of the resource being linked to | ||
39 | */ | ||
40 | Attachment(const QString& uri, const QString& mime = QString::null); | ||
41 | |||
42 | /** | ||
43 | * Create a binary attachment. | ||
44 | * @param base64 the attachment in base64 format | ||
45 | * @param mime the mime type of the attachment | ||
46 | */ | ||
47 | Attachment(const char *base64, const QString& mime = QString::null); | ||
48 | |||
49 | /* The VALUE parameter in Cal */ | ||
50 | bool isURI() const; | ||
51 | QString uri() const; | ||
52 | void setURI(const QString& uri); | ||
53 | |||
54 | bool isBinary() const; | ||
55 | char *data() const; | ||
56 | void setData(const char *base64); | ||
57 | |||
58 | /* The optional FMTTYPE parameter in iCal */ | ||
59 | QString mimeType() const; | ||
60 | void setMimeType(const QString& mime); | ||
61 | private: | ||
62 | QString mMimeType; | ||
63 | QString mData; | ||
64 | bool mBinary; | ||
65 | }; | ||
66 | |||
67 | } | ||
68 | |||
69 | #endif | ||