summaryrefslogtreecommitdiff
path: root/libopie/pim/ocontactaccessbackend_vcard.h
authoreilers <eilers>2003-03-21 10:33:09 (UTC)
committer eilers <eilers>2003-03-21 10:33:09 (UTC)
commit8136284c38384b169cd2843ee61480d45b6c1cba (patch) (unidiff)
treead798e3df8dc27a41f431a2130dbf50947fbca49 /libopie/pim/ocontactaccessbackend_vcard.h
parent6f5f148ff9eac1e4d76bea4460a7984d1e3069b7 (diff)
downloadopie-8136284c38384b169cd2843ee61480d45b6c1cba.zip
opie-8136284c38384b169cd2843ee61480d45b6c1cba.tar.gz
opie-8136284c38384b169cd2843ee61480d45b6c1cba.tar.bz2
Merged speed optimized xml backend for contacts to main.
Added QDateTime to querybyexample. For instance, it is now possible to get all Birthdays/Anniversaries between two dates. This should be used to show all birthdays in the datebook.. This change is sourcecode backward compatible but you have to upgrade the binaries for today-addressbook.
Diffstat (limited to 'libopie/pim/ocontactaccessbackend_vcard.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/pim/ocontactaccessbackend_vcard.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/libopie/pim/ocontactaccessbackend_vcard.h b/libopie/pim/ocontactaccessbackend_vcard.h
index 236da00..93e2da3 100644
--- a/libopie/pim/ocontactaccessbackend_vcard.h
+++ b/libopie/pim/ocontactaccessbackend_vcard.h
@@ -8,24 +8,32 @@
8 *This program is free software; you can redistribute it and/or 8 *This program is free software; you can redistribute it and/or
9 *modify it under the terms of the GNU Library General Public 9 *modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version. 11 * version 2 of the License, or (at your option) any later version.
12 * ===================================================================== 12 * =====================================================================
13 * ToDo: 13 * ToDo:
14 * 14 *
15 * ===================================================================== 15 * =====================================================================
16 * Version: $Id$ 16 * Version: $Id$
17 * ===================================================================== 17 * =====================================================================
18 * History: 18 * History:
19 * $Log$ 19 * $Log$
20 * Revision 1.5 2003/03/21 10:33:09 eilers
21 * Merged speed optimized xml backend for contacts to main.
22 * Added QDateTime to querybyexample. For instance, it is now possible to get
23 * all Birthdays/Anniversaries between two dates. This should be used
24 * to show all birthdays in the datebook..
25 * This change is sourcecode backward compatible but you have to upgrade
26 * the binaries for today-addressbook.
27 *
20 * Revision 1.4 2002/12/07 13:26:22 eilers 28 * Revision 1.4 2002/12/07 13:26:22 eilers
21 * Fixing bug in storing anniversary.. 29 * Fixing bug in storing anniversary..
22 * 30 *
23 * Revision 1.3 2002/11/13 14:14:51 eilers 31 * Revision 1.3 2002/11/13 14:14:51 eilers
24 * Added sorted for Contacts.. 32 * Added sorted for Contacts..
25 * 33 *
26 * Revision 1.2 2002/11/10 15:41:53 eilers 34 * Revision 1.2 2002/11/10 15:41:53 eilers
27 * Bugfixes.. 35 * Bugfixes..
28 * 36 *
29 * Revision 1.1 2002/11/09 14:34:52 eilers 37 * Revision 1.1 2002/11/09 14:34:52 eilers
30 * Added VCard Backend. 38 * Added VCard Backend.
31 * 39 *
@@ -45,25 +53,25 @@ class OContactAccessBackend_VCard : public OContactAccessBackend {
45 53
46 bool load (); 54 bool load ();
47 bool reload(); 55 bool reload();
48 bool save(); 56 bool save();
49 void clear (); 57 void clear ();
50 58
51 bool add ( const OContact& newcontact ); 59 bool add ( const OContact& newcontact );
52 bool remove ( int uid ); 60 bool remove ( int uid );
53 bool replace ( const OContact& contact ); 61 bool replace ( const OContact& contact );
54 62
55 OContact find ( int uid ) const; 63 OContact find ( int uid ) const;
56 QArray<int> allRecords() const; 64 QArray<int> allRecords() const;
57 QArray<int> queryByExample ( const OContact &query, int settings ); 65 QArray<int> queryByExample ( const OContact &query, int settings, const QDateTime& d = QDateTime() );
58 QArray<int> matchRegexp( const QRegExp &r ) const; 66 QArray<int> matchRegexp( const QRegExp &r ) const;
59 67
60 const uint querySettings(); 68 const uint querySettings();
61 bool hasQuerySettings (uint querySettings) const; 69 bool hasQuerySettings (uint querySettings) const;
62 QArray<int> sorted( bool ascending, int sortOrder, int sortFilter, int cat ); 70 QArray<int> sorted( bool ascending, int sortOrder, int sortFilter, int cat );
63 bool wasChangedExternally(); 71 bool wasChangedExternally();
64 72
65private: 73private:
66 OContact parseVObject( VObject* obj ); 74 OContact parseVObject( VObject* obj );
67 VObject* createVObject( const OContact& c ); 75 VObject* createVObject( const OContact& c );
68 QString convDateToVCardDate( const QDate& c ) const; 76 QString convDateToVCardDate( const QDate& c ) const;
69 QDate convVCardDateToDate( const QString& datestr ); 77 QDate convVCardDateToDate( const QString& datestr );