knotes

resourcenotes.h
1 /*******************************************************************
2  This file is part of KNotes.
3 
4  Copyright (c) 2004, Bo Thorsen <bo@sonofthor.dk>
5 
6  This program is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation; either version 2 of the License, or
9  (at your option) any later version.
10 
11  This program 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
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program; if not, write to the Free Software
18  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19  MA 02110-1301, USA.
20 
21  In addition, as a special exception, the copyright holders give
22  permission to link the code of this program with any edition of
23  the TQt library by Trolltech AS, Norway (or with modified versions
24  of TQt that use the same license as TQt), and distribute linked
25  combinations including the two. You must obey the GNU General
26  Public License in all respects for all of the code used other than
27  TQt. If you modify this file, you may extend this exception to
28  your version of the file, but you are not obligated to do so. If
29  you do not wish to do so, delete this exception statement from
30  your version.
31 *******************************************************************/
32 
33 #ifndef RESOURCENOTES_H
34 #define RESOURCENOTES_H
35 
36 #include <tderesources/resource.h>
37 #include <tdemacros.h>
38 #include <libkcal/alarm.h>
39 
40 class TDEConfig;
41 class KNotesResourceManager;
42 
43 namespace KCal {
44  class Journal;
45 }
46 
47 
55 class TDE_EXPORT ResourceNotes : public KRES::Resource
56 {
57 public:
58  ResourceNotes( const TDEConfig * );
59  virtual ~ResourceNotes();
60 
64  virtual bool load() = 0;
65 
69  virtual bool save() = 0;
70 
71  virtual bool addNote( KCal::Journal * ) = 0;
72  virtual bool deleteNote( KCal::Journal * ) = 0;
73 
74  virtual KCal::Alarm::List alarms( const TQDateTime& from, const TQDateTime& to ) = 0;
75 
76  void setManager( KNotesResourceManager *manager ) { mManager = manager; }
77  KNotesResourceManager *manager() const { return mManager; }
78 
79 protected:
80  KNotesResourceManager *mManager;
81 };
82 
83 
84 #endif // RESOURCENOTES_H
This class provides the interfaces for a KNotes resource.
Definition: resourcenotes.h:56
virtual bool save()=0
Save resource data.
virtual bool load()=0
Load resource data.