summaryrefslogtreecommitdiff
path: root/include
Side-by-side diff
Diffstat (limited to 'include') (more/less context) (ignore whitespace changes)
-rw-r--r--include/opie/tododb.h6
-rw-r--r--include/opie/todoevent.h1
-rw-r--r--include/opie/todoresource.h14
3 files changed, 20 insertions, 1 deletions
diff --git a/include/opie/tododb.h b/include/opie/tododb.h
index 6478363..945f343 100644
--- a/include/opie/tododb.h
+++ b/include/opie/tododb.h
@@ -8,2 +8,3 @@
+class ToDoResource;
class ToDoDB
@@ -12,3 +13,3 @@ class ToDoDB
// if no argument is supplied pick the default book
- ToDoDB(const QString &fileName = QString::null );
+ ToDoDB(const QString &fileName = QString::null, ToDoResource* resource= 0 );
~ToDoDB();
@@ -29,2 +30,4 @@ class ToDoDB
bool save();
+ ToDoResource *resource();
+ void setResource(ToDoResource* res);
@@ -34,2 +37,3 @@ class ToDoDB
QString m_fileName;
+ ToDoResource *m_res;
QValueList<ToDoEvent> m_todos;
diff --git a/include/opie/todoevent.h b/include/opie/todoevent.h
index dd8c0c9..79522b2 100644
--- a/include/opie/todoevent.h
+++ b/include/opie/todoevent.h
@@ -31,2 +31,3 @@ class ToDoEvent {
+ void setUid(int id) {m_uid = id; };
bool operator<(const ToDoEvent &toDoEvent )const;
diff --git a/include/opie/todoresource.h b/include/opie/todoresource.h
new file mode 100644
index 0000000..34edb04
--- a/dev/null
+++ b/include/opie/todoresource.h
@@ -0,0 +1,14 @@
+
+
+#ifndef opietodoresource_h
+#define opietodoresource_h
+
+class ToDoEvent;
+class ToDoResource {
+ public:
+ ToDoResource( ) {};
+ virtual QValueList<ToDoEvent> load(const QString &file ) = 0;
+ virtual bool save( const QString &file, const QValueList<ToDoEvent> & ) = 0;
+};
+
+#endif