Diffstat (limited to 'libopie/pim/odatebookaccessbackend_xml.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie/pim/odatebookaccessbackend_xml.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libopie/pim/odatebookaccessbackend_xml.h b/libopie/pim/odatebookaccessbackend_xml.h index 7848f7c..a5cc0fc 100644 --- a/libopie/pim/odatebookaccessbackend_xml.h +++ b/libopie/pim/odatebookaccessbackend_xml.h | |||
@@ -1,48 +1,49 @@ | |||
1 | #ifndef OPIE_DATE_BOOK_ACCESS_BACKEND_XML__H | 1 | #ifndef OPIE_DATE_BOOK_ACCESS_BACKEND_XML__H |
2 | #define OPIE_DATE_BOOK_ACCESS_BACKEND_XML__H | 2 | #define OPIE_DATE_BOOK_ACCESS_BACKEND_XML__H |
3 | 3 | ||
4 | #include <qmap.h> | 4 | #include <qmap.h> |
5 | 5 | ||
6 | #include "odatebookaccessbackend.h" | 6 | #include "odatebookaccessbackend.h" |
7 | 7 | ||
8 | /** | 8 | /** |
9 | * This is the default XML implementation for DateBoook XML storage | 9 | * This is the default XML implementation for DateBoook XML storage |
10 | * It fully implements the interface | 10 | * It fully implements the interface |
11 | * @see ODateBookAccessBackend | 11 | * @see ODateBookAccessBackend |
12 | * @see OPimAccessBackend | 12 | * @see OPimAccessBackend |
13 | */ | 13 | */ |
14 | class ODateBookAccessBackend_XML : public ODateBookAccessBackend { | 14 | class ODateBookAccessBackend_XML : public ODateBookAccessBackend { |
15 | public: | 15 | public: |
16 | ODateBookAccessBackend_XML( const QString& appName, | 16 | ODateBookAccessBackend_XML( const QString& appName, |
17 | const QString& fileName = QString::null); | 17 | const QString& fileName = QString::null); |
18 | ~ODateBookAccessBackend_XML(); | 18 | ~ODateBookAccessBackend_XML(); |
19 | 19 | ||
20 | bool load(); | 20 | bool load(); |
21 | bool reload(); | 21 | bool reload(); |
22 | bool save(); | 22 | bool save(); |
23 | 23 | ||
24 | QArray<int> allRecords()const; | 24 | QArray<int> allRecords()const; |
25 | QArray<int> matchRegexp(const QRegExp &r) const; | ||
25 | QArray<int> queryByExample( const OEvent&, int, const QDateTime& d = QDateTime() ); | 26 | QArray<int> queryByExample( const OEvent&, int, const QDateTime& d = QDateTime() ); |
26 | OEvent find( int uid )const; | 27 | OEvent find( int uid )const; |
27 | void clear(); | 28 | void clear(); |
28 | bool add( const OEvent& ev ); | 29 | bool add( const OEvent& ev ); |
29 | bool remove( int uid ); | 30 | bool remove( int uid ); |
30 | bool replace( const OEvent& ev ); | 31 | bool replace( const OEvent& ev ); |
31 | 32 | ||
32 | QArray<UID> rawEvents()const; | 33 | QArray<UID> rawEvents()const; |
33 | QArray<UID> rawRepeats()const; | 34 | QArray<UID> rawRepeats()const; |
34 | QArray<UID> nonRepeats()const; | 35 | QArray<UID> nonRepeats()const; |
35 | 36 | ||
36 | OEvent::ValueList directNonRepeats(); | 37 | OEvent::ValueList directNonRepeats(); |
37 | OEvent::ValueList directRawRepeats(); | 38 | OEvent::ValueList directRawRepeats(); |
38 | 39 | ||
39 | private: | 40 | private: |
40 | bool m_changed :1 ; | 41 | bool m_changed :1 ; |
41 | bool loadFile(); | 42 | bool loadFile(); |
42 | inline void finalizeRecord( OEvent& ev ); | 43 | inline void finalizeRecord( OEvent& ev ); |
43 | inline void setField( OEvent&, int field, const QString& val ); | 44 | inline void setField( OEvent&, int field, const QString& val ); |
44 | QString m_name; | 45 | QString m_name; |
45 | QMap<int, OEvent> m_raw; | 46 | QMap<int, OEvent> m_raw; |
46 | QMap<int, OEvent> m_rep; | 47 | QMap<int, OEvent> m_rep; |
47 | 48 | ||
48 | struct Data; | 49 | struct Data; |