KCalendarCore

calstorage.h
Go to the documentation of this file.
1/*
2 This file is part of the kcalcore library.
3
4 SPDX-FileCopyrightText: 2002, 2003 Cornelius Schumacher <schumacher@kde.org>
5
6 SPDX-License-Identifier: LGPL-2.0-or-later
7*/
8/**
9 @file
10 This file is part of the API for handling calendar data and
11 defines the CalStorage abstract base class.
12
13 @author Cornelius Schumacher <schumacher@kde.org>
14*/
15
16#ifndef KCALCORE_CALSTORAGE_H
17#define KCALCORE_CALSTORAGE_H
18
19#include "calendar.h"
20#include "kcalendarcore_export.h"
21
22#include <QObject>
23
24namespace KCalendarCore
25{
26/**
27 @brief
28 An abstract base class that provides a calendar storage interface.
29
30 This is the base class for calendar storage. It provides an interface for the
31 loading and saving of calendars.
32*/
33class KCALENDARCORE_EXPORT CalStorage : public QObject
34{
35 Q_OBJECT
36
37public:
38 /**
39 Constructs a new storage object for a calendar.
40 @param calendar is a pointer to a valid Calendar object.
41 */
42 explicit CalStorage(const Calendar::Ptr &calendar);
43
44 /**
45 Destuctor.
46 */
47 ~CalStorage() override;
48
49 /**
50 Returns the calendar for this storage object.
51 @return A pointer to the calendar whose storage is being managed.
52 */
53 Calendar::Ptr calendar() const;
54
55 /**
56 Opens the calendar for storage.
57 @return true if the open was successful; false otherwise.
58 */
59 virtual bool open() = 0;
60
61 /**
62 Loads the calendar into memory.
63 @return true if the load was successful; false otherwise.
64 */
65 virtual bool load() = 0;
66
67 /**
68 Saves the calendar.
69 @return true if the save was successful; false otherwise.
70 */
71 virtual bool save() = 0;
72
73 /**
74 Closes the calendar storage.
75 @return true if the close was successful; false otherwise.
76 */
77 virtual bool close() = 0;
78
79private:
80 //@cond PRIVATE
81 Q_DISABLE_COPY(CalStorage)
82 class Private;
83 Private *const d;
84 //@endcond
85};
86
87}
88
89#endif
This file is part of the API for handling calendar data and defines the Calendar class.
An abstract base class that provides a calendar storage interface.
Definition calstorage.h:34
virtual bool save()=0
Saves the calendar.
virtual bool open()=0
Opens the calendar for storage.
virtual bool close()=0
Closes the calendar storage.
virtual bool load()=0
Loads the calendar into memory.
Namespace for all KCalendarCore types.
Definition alarm.h:37
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:57:05 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.