libkcal

filestorage.h
1 /*
2  This file is part of libkcal.
3 
4  Copyright (c) 2002,2003 Cornelius Schumacher <schumacher@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 */
21 #ifndef KCAL_FILESTORAGE_H
22 #define KCAL_FILESTORAGE_H
23 
24 #include "calstorage.h"
25 
26 namespace KCal {
27 
28 class CalFormat;
32 class LIBKCAL_EXPORT FileStorage : public CalStorage
33 {
34  public:
35  FileStorage( Calendar *, const TQString &fileName = TQString(),
36  CalFormat *format = 0 );
37  virtual ~FileStorage();
38 
39  void setFileName( const TQString &mFileName );
40  TQString fileName() const;
41 
45  void setSaveFormat( CalFormat * );
46  CalFormat *saveFormat() const;
47 
48  bool open();
49  bool load();
50  bool save();
51  bool close();
52 
53  private:
54  TQString mFileName;
55  CalFormat *mSaveFormat;
56 
57  class Private;
58  Private *d;
59 };
60 
61 }
62 
63 #endif
This is the base class for calendar formats.
Definition: calformat.h:44
This class provides the interface to the storage of a calendar.
Definition: calstorage.h:34
This is the main "calendar" object class.
Definition: calendar.h:171
This class provides a calendar storage as a local file.
Definition: filestorage.h:33
Namespace KCal is for global classes, objects and/or functions in libkcal.
Definition: alarm.h:38