1/*
2 This file is part of the kcal library.
3
4 Copyright (c) 2001-2003 Cornelius Schumacher <schumacher@kde.org>
5 Copyright (C) 2003-2004 Reinhold Kainhofer <reinhold@kainhofer.com>
6
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Library General Public
9 License as published by the Free Software Foundation; either
10 version 2 of the License, or (at your option) any later version.
11
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Library General Public License for more details.
16
17 You should have received a copy of the GNU Library General Public License
18 along with this library; see the file COPYING.LIB. If not, write to
19 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 Boston, MA 02110-1301, USA.
21*/
22/**
23 @file
24 This file is part of the API for handling calendar data and
25 defines the Journal class.
26
27 @author Cornelius Schumacher \<schumacher@kde.org\>
28 @author Reinhold Kainhofer \<reinhold@kainhofer.com\>
29*/
30#ifndef KCAL_JOURNAL_H
31#define KCAL_JOURNAL_H
32
33#include "incidence.h"
34#include <kpimutils/supertrait.h>
35#include <QtCore/QByteArray>
36
37namespace KCal {
38
39/**
40 @brief
41 Provides a Journal in the sense of RFC2445.
42*/
43class KCAL_DEPRECATED_EXPORT Journal : public Incidence
44{
45 public:
46 /**
47 List of journals.
48 */
49 typedef ListBase<Journal> List;
50
51 /**
52 A shared pointer to a Journal object.
53 */
54 typedef boost::shared_ptr<Journal> Ptr;
55
56 /**
57 A shared pointer to a non-mutable Journal object.
58 */
59 typedef boost::shared_ptr<const Journal> ConstPtr;
60
61 /**
62 Constructs an empty journal.
63 */
64 Journal();
65
66 /**
67 Destroys a journal.
68 */
69 ~Journal();
70
71 /**
72 @copydoc
73 IncidenceBase::type()
74 */
75 QByteArray type() const;
76
77 /**
78 @copydoc
79 IncidenceBase::typeStr()
80 */
81 //KDE5: QString typeStr() const;
82
83 /**
84 Returns an exact copy of this journal. The returned object is owned
85 by the caller.
86 */
87 Journal *clone();
88
89 /**
90 Assignment operator.
91 */
92 Journal &operator=( const Journal &other );
93
94 /**
95 Compare this with @p journal for equality.
96
97 @param journal is the journal to compare.
98 */
99 bool operator==( const Journal &journal ) const;
100
101 private:
102 /**
103 @copydoc
104 IncidenceBase::accept()
105 */
106 bool accept( Visitor &v ) { return v.visit( this ); }
107
108 //@cond PRIVATE
109 class Private;
110 Private *const d;
111 //@endcond
112};
113
114}
115
116//@cond PRIVATE
117// super class trait specialization
118namespace KPIMUtils {
119 template <> struct SuperClass<KCal::Journal> : public SuperClassTrait<KCal::Incidence>{};
120}
121//@endcond
122
123#endif
124