summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/backend/odatebookaccessbackend_xml.h
authorzecke <zecke>2003-02-21 23:31:52 (UTC)
committer zecke <zecke>2003-02-21 23:31:52 (UTC)
commit46f47c0a1e542a8b4222f3ced8f3304534c7509d (patch) (unidiff)
tree82dc97a07bae77387987711c0c21697691955937 /libopie2/opiepim/backend/odatebookaccessbackend_xml.h
parenta7448ec87d97a0128618e83ad7526bd884ef8853 (diff)
downloadopie-46f47c0a1e542a8b4222f3ced8f3304534c7509d.zip
opie-46f47c0a1e542a8b4222f3ced8f3304534c7509d.tar.gz
opie-46f47c0a1e542a8b4222f3ced8f3304534c7509d.tar.bz2
Add XML datebookresource
-clean up todoaccessxml header -implement some more stuff in the oeven tester -extend DefaultFactory to not crash and to use datebook -reading of OEvents is working nicely.. saving will be added tomorrow -fix spelling in ODateBookAcces
Diffstat (limited to 'libopie2/opiepim/backend/odatebookaccessbackend_xml.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/backend/odatebookaccessbackend_xml.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/libopie2/opiepim/backend/odatebookaccessbackend_xml.h b/libopie2/opiepim/backend/odatebookaccessbackend_xml.h
new file mode 100644
index 0000000..40f69d8
--- a/dev/null
+++ b/libopie2/opiepim/backend/odatebookaccessbackend_xml.h
@@ -0,0 +1,48 @@
1#ifndef OPIE_DATE_BOOK_ACCESS_BACKEND_XML__H
2#define OPIE_DATE_BOOK_ACCESS_BACKEND_XML__H
3
4#include <qmap.h>
5
6#include "odatebookaccessbackend.h"
7
8class ODateBookAccessBackend_XML : public ODateBookAccessBackend {
9public:
10 ODateBookAccessBackend_XML( const QString& appName,
11 const QString& fileName = QString::null);
12 ~ODateBookAccessBackend_XML();
13
14 bool load();
15 bool reload();
16 bool save();
17
18 QArray<int> allRecords()const;
19 QArray<int> queryByExample( const OEvent&, int );
20 OEvent find( int uid )const;
21 void clear();
22 bool add( const OEvent& ev );
23 bool remove( int uid );
24 bool replace( const OEvent& ev );
25
26 QArray<UID> rawEvents()const;
27 QArray<UID> rawRepeats()const;
28 QArray<UID> nonRepeats()const;
29
30 OEvent::ValueList directNonRepeats();
31 OEvent::ValueList directRawRepeats();
32
33private:
34 bool m_changed :1 ;
35 bool loadFile();
36 inline void finalizeRecord( OEvent& ev );
37 inline void setField( OEvent&, int field, const QString& val );
38 QString m_name;
39 QMap<int, OEvent> m_raw;
40 QMap<int, OEvent> m_rep;
41
42 struct Data;
43 Data* data;
44 class Private;
45 Private *d;
46};
47
48#endif