Diffstat (limited to 'libopie/pim/ocontactaccessbackend_vcard.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie/pim/ocontactaccessbackend_vcard.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libopie/pim/ocontactaccessbackend_vcard.h b/libopie/pim/ocontactaccessbackend_vcard.h index 177ec24..4437756 100644 --- a/libopie/pim/ocontactaccessbackend_vcard.h +++ b/libopie/pim/ocontactaccessbackend_vcard.h | |||
@@ -1,70 +1,74 @@ | |||
1 | /* | 1 | /* |
2 | * VCard Backend for the OPIE-Contact Database. | 2 | * VCard Backend for the OPIE-Contact Database. |
3 | * | 3 | * |
4 | * Copyright (C) 2000 Trolltech AS. All rights reserved. | 4 | * Copyright (C) 2000 Trolltech AS. All rights reserved. |
5 | * Copyright (c) 2002 by Stefan Eilers (Eilers.Stefan@epost.de) | 5 | * Copyright (c) 2002 by Stefan Eilers (Eilers.Stefan@epost.de) |
6 | * | 6 | * |
7 | * ===================================================================== | 7 | * ===================================================================== |
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.3 2002/11/13 14:14:51 eilers | ||
21 | * Added sorted for Contacts.. | ||
22 | * | ||
20 | * Revision 1.2 2002/11/10 15:41:53 eilers | 23 | * Revision 1.2 2002/11/10 15:41:53 eilers |
21 | * Bugfixes.. | 24 | * Bugfixes.. |
22 | * | 25 | * |
23 | * Revision 1.1 2002/11/09 14:34:52 eilers | 26 | * Revision 1.1 2002/11/09 14:34:52 eilers |
24 | * Added VCard Backend. | 27 | * Added VCard Backend. |
25 | * | 28 | * |
26 | */ | 29 | */ |
27 | #ifndef __OCONTACTACCESSBACKEND_VCARD_H_ | 30 | #ifndef __OCONTACTACCESSBACKEND_VCARD_H_ |
28 | #define __OCONTACTACCESSBACKEND_VCARD_H_ | 31 | #define __OCONTACTACCESSBACKEND_VCARD_H_ |
29 | 32 | ||
30 | #include <opie/ocontact.h> | 33 | #include <opie/ocontact.h> |
31 | 34 | ||
32 | #include "ocontactaccessbackend.h" | 35 | #include "ocontactaccessbackend.h" |
33 | 36 | ||
34 | class VObject; | 37 | class VObject; |
35 | 38 | ||
36 | class OContactAccessBackend_VCard : public OContactAccessBackend { | 39 | class OContactAccessBackend_VCard : public OContactAccessBackend { |
37 | public: | 40 | public: |
38 | OContactAccessBackend_VCard ( QString appname, QString filename = 0l ); | 41 | OContactAccessBackend_VCard ( QString appname, QString filename = 0l ); |
39 | 42 | ||
40 | bool load (); | 43 | bool load (); |
41 | bool reload(); | 44 | bool reload(); |
42 | bool save(); | 45 | bool save(); |
43 | void clear (); | 46 | void clear (); |
44 | 47 | ||
45 | bool add ( const OContact& newcontact ); | 48 | bool add ( const OContact& newcontact ); |
46 | bool remove ( int uid ); | 49 | bool remove ( int uid ); |
47 | bool replace ( const OContact& contact ); | 50 | bool replace ( const OContact& contact ); |
48 | 51 | ||
49 | OContact find ( int uid ) const; | 52 | OContact find ( int uid ) const; |
50 | QArray<int> allRecords() const; | 53 | QArray<int> allRecords() const; |
51 | QArray<int> queryByExample ( const OContact &query, int settings ); | 54 | QArray<int> queryByExample ( const OContact &query, int settings ); |
52 | QArray<int> matchRegexp( const QRegExp &r ) const; | 55 | QArray<int> matchRegexp( const QRegExp &r ) const; |
53 | 56 | ||
54 | const uint querySettings(); | 57 | const uint querySettings(); |
55 | bool hasQuerySettings (uint querySettings) const; | 58 | bool hasQuerySettings (uint querySettings) const; |
59 | QArray<int> sorted( bool ascending, int sortOrder, int sortFilter, int cat ); | ||
56 | bool wasChangedExternally(); | 60 | bool wasChangedExternally(); |
57 | 61 | ||
58 | private: | 62 | private: |
59 | OContact parseVObject( VObject* obj ); | 63 | OContact parseVObject( VObject* obj ); |
60 | VObject* createVObject( const OContact& c ); | 64 | VObject* createVObject( const OContact& c ); |
61 | QDate convVCardDateToDate( const QString& datestr ); | 65 | QDate convVCardDateToDate( const QString& datestr ); |
62 | VObject *safeAddPropValue( VObject *o, const char* prop, const QString& value ); | 66 | VObject *safeAddPropValue( VObject *o, const char* prop, const QString& value ); |
63 | VObject *safeAddProp( VObject* o, const char* prop); | 67 | VObject *safeAddProp( VObject* o, const char* prop); |
64 | 68 | ||
65 | bool m_dirty : 1; | 69 | bool m_dirty : 1; |
66 | QString m_file; | 70 | QString m_file; |
67 | QMap<int, OContact> m_map; | 71 | QMap<int, OContact> m_map; |
68 | }; | 72 | }; |
69 | 73 | ||
70 | #endif | 74 | #endif |