author | zecke <zecke> | 2004-02-19 02:05:37 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-02-19 02:05:37 (UTC) |
commit | 34e732b3490bcad2cb05a1252ef5f06b3feef9ad (patch) (unidiff) | |
tree | 1114cf4d32dd0955550536f93b4054f76207c90e /libopie2 | |
parent | f98fdfa6509fd1db5ea9ee834b5808ee12c8e697 (diff) | |
download | opie-34e732b3490bcad2cb05a1252ef5f06b3feef9ad.zip opie-34e732b3490bcad2cb05a1252ef5f06b3feef9ad.tar.gz opie-34e732b3490bcad2cb05a1252ef5f06b3feef9ad.tar.bz2 |
Add notes for API fixes and BC stuff
-rw-r--r-- | libopie2/opiepim/backend/ocontactaccessbackend.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libopie2/opiepim/backend/ocontactaccessbackend.h b/libopie2/opiepim/backend/ocontactaccessbackend.h index 280e05c..0eac6dc 100644 --- a/libopie2/opiepim/backend/ocontactaccessbackend.h +++ b/libopie2/opiepim/backend/ocontactaccessbackend.h | |||
@@ -1,119 +1,128 @@ | |||
1 | /** | 1 | /** |
2 | * The class responsible for managing a backend. | 2 | * The class responsible for managing a backend. |
3 | * The implementation of this abstract class contains | 3 | * The implementation of this abstract class contains |
4 | * the complete database handling. | 4 | * the complete database handling. |
5 | * | 5 | * |
6 | * Copyright (c) 2002 by Stefan Eilers (Eilers.Stefan@epost.de) | 6 | * Copyright (c) 2002 by Stefan Eilers (Eilers.Stefan@epost.de) |
7 | * Copyright (c) 2002 by Holger Freyther (zecke@handhelds.org) | 7 | * Copyright (c) 2002 by Holger Freyther (zecke@handhelds.org) |
8 | * | 8 | * |
9 | * ===================================================================== | 9 | * ===================================================================== |
10 | *This program is free software; you can redistribute it and/or | 10 | *This program is free software; you can redistribute it and/or |
11 | *modify it under the terms of the GNU Library General Public | 11 | *modify it under the terms of the GNU Library General Public |
12 | * License as published by the Free Software Foundation; | 12 | * License as published by the Free Software Foundation; |
13 | * either version 2 of the License, or (at your option) any later | 13 | * either version 2 of the License, or (at your option) any later |
14 | * version. | 14 | * version. |
15 | * ===================================================================== | 15 | * ===================================================================== |
16 | * ToDo: Define enum for query settings | 16 | * ToDo: Define enum for query settings |
17 | * ===================================================================== | 17 | * ===================================================================== |
18 | * Version: $Id$ | 18 | * Version: $Id$ |
19 | * ===================================================================== | 19 | * ===================================================================== |
20 | * History: | 20 | * History: |
21 | * $Log$ | 21 | * $Log$ |
22 | * Revision 1.7 2004/02/19 02:05:37 zecke | ||
23 | * Add notes for API fixes and BC stuff | ||
24 | * | ||
22 | * Revision 1.6 2003/08/01 12:30:16 eilers | 25 | * Revision 1.6 2003/08/01 12:30:16 eilers |
23 | * Merging changes from BRANCH_1_0 to HEAD | 26 | * Merging changes from BRANCH_1_0 to HEAD |
24 | * | 27 | * |
25 | * Revision 1.5.4.1 2003/06/30 14:34:19 eilers | 28 | * Revision 1.5.4.1 2003/06/30 14:34:19 eilers |
26 | * Patches from Zecke: | 29 | * Patches from Zecke: |
27 | * Fixing and cleaning up extraMap handling | 30 | * Fixing and cleaning up extraMap handling |
28 | * Adding d_ptr for binary compatibility in the future | 31 | * Adding d_ptr for binary compatibility in the future |
29 | * | 32 | * |
30 | * Revision 1.5 2003/04/13 18:07:10 zecke | 33 | * Revision 1.5 2003/04/13 18:07:10 zecke |
31 | * More API doc | 34 | * More API doc |
32 | * QString -> const QString& | 35 | * QString -> const QString& |
33 | * QString = 0l -> QString::null | 36 | * QString = 0l -> QString::null |
34 | * | 37 | * |
35 | * Revision 1.4 2002/11/13 14:14:51 eilers | 38 | * Revision 1.4 2002/11/13 14:14:51 eilers |
36 | * Added sorted for Contacts.. | 39 | * Added sorted for Contacts.. |
37 | * | 40 | * |
38 | * Revision 1.3 2002/11/01 15:10:42 eilers | 41 | * Revision 1.3 2002/11/01 15:10:42 eilers |
39 | * Added regExp-search in database for all fields in a contact. | 42 | * Added regExp-search in database for all fields in a contact. |
40 | * | 43 | * |
41 | * Revision 1.2 2002/10/07 17:34:24 eilers | 44 | * Revision 1.2 2002/10/07 17:34:24 eilers |
42 | * added OBackendFactory for advanced backend access | 45 | * added OBackendFactory for advanced backend access |
43 | * | 46 | * |
44 | * Revision 1.1 2002/09/27 17:11:44 eilers | 47 | * Revision 1.1 2002/09/27 17:11:44 eilers |
45 | * Added API for accessing the Contact-Database ! It is compiling, but | 48 | * Added API for accessing the Contact-Database ! It is compiling, but |
46 | * please do not expect that anything is working ! | 49 | * please do not expect that anything is working ! |
47 | * I will debug that stuff in the next time .. | 50 | * I will debug that stuff in the next time .. |
48 | * Please read README_COMPILE for compiling ! | 51 | * Please read README_COMPILE for compiling ! |
49 | * | 52 | * |
50 | * ===================================================================== | 53 | * ===================================================================== |
51 | * | 54 | * |
52 | */ | 55 | */ |
53 | 56 | ||
54 | #ifndef _OCONTACTACCESSBACKEND_H_ | 57 | #ifndef _OCONTACTACCESSBACKEND_H_ |
55 | #define _OCONTACTACCESSBACKEND_H_ | 58 | #define _OCONTACTACCESSBACKEND_H_ |
56 | 59 | ||
57 | #include "ocontact.h" | 60 | #include "ocontact.h" |
58 | #include "opimaccessbackend.h" | 61 | #include "opimaccessbackend.h" |
59 | 62 | ||
60 | #include <qregexp.h> | 63 | #include <qregexp.h> |
61 | 64 | ||
62 | /** | 65 | /** |
63 | * This class represents the interface of all Contact Backends. | 66 | * This class represents the interface of all Contact Backends. |
64 | * Derivates of this class will be used to access the contacts. | 67 | * Derivates of this class will be used to access the contacts. |
65 | * As implementation currently XML and vCard exist. This class needs to be implemented | 68 | * As implementation currently XML and vCard exist. This class needs to be implemented |
66 | * if you want to provide your own storage. | 69 | * if you want to provide your own storage. |
67 | * In all queries a list of uids is passed on instead of loading the actual record! | 70 | * In all queries a list of uids is passed on instead of loading the actual record! |
68 | * | 71 | * |
69 | * @see OContactAccessBackend_VCard | 72 | * @see OContactAccessBackend_VCard |
70 | * @see OContactAccessBackend_XML | 73 | * @see OContactAccessBackend_XML |
71 | */ | 74 | */ |
72 | class OContactAccessBackend: public OPimAccessBackend<OContact> { | 75 | class OContactAccessBackend: public OPimAccessBackend<OContact> { |
73 | public: | 76 | public: |
77 | /** | ||
78 | * @todo make non line in regard to BC guide of KDE | ||
79 | */ | ||
74 | OContactAccessBackend() {} | 80 | OContactAccessBackend() {} |
81 | /** | ||
82 | * @todo make non inline in regard to the BC guide of KDE | ||
83 | */ | ||
75 | virtual ~OContactAccessBackend() {} | 84 | virtual ~OContactAccessBackend() {} |
76 | 85 | ||
77 | 86 | ||
78 | /** | 87 | /** |
79 | * Return if database was changed externally. | 88 | * Return if database was changed externally. |
80 | * This may just make sense on file based databases like a XML-File. | 89 | * This may just make sense on file based databases like a XML-File. |
81 | * It is used to prevent to overwrite the current database content | 90 | * It is used to prevent to overwrite the current database content |
82 | * if the file was already changed by something else ! | 91 | * if the file was already changed by something else ! |
83 | * If this happens, we have to reload before save our data. | 92 | * If this happens, we have to reload before save our data. |
84 | * If we use real databases, this should be handled by the database | 93 | * If we use real databases, this should be handled by the database |
85 | * management system themselve, therefore this function should always return false in | 94 | * management system themselve, therefore this function should always return false in |
86 | * this case. It is not our problem to handle this conflict ... | 95 | * this case. It is not our problem to handle this conflict ... |
87 | * @return <i>true</i> if the database was changed and if save without reload will | 96 | * @return <i>true</i> if the database was changed and if save without reload will |
88 | * be dangerous. <i>false</i> if the database was not changed or it is save to write | 97 | * be dangerous. <i>false</i> if the database was not changed or it is save to write |
89 | * in this situation. | 98 | * in this situation. |
90 | */ | 99 | */ |
91 | virtual bool wasChangedExternally() = 0; | 100 | virtual bool wasChangedExternally() = 0; |
92 | 101 | ||
93 | virtual QArray<int> matchRegexp( const QRegExp &r ) const = 0; | 102 | virtual QArray<int> matchRegexp( const QRegExp &r ) const = 0; |
94 | 103 | ||
95 | /** | 104 | /** |
96 | * Return all possible settings. | 105 | * Return all possible settings. |
97 | * @return All settings provided by the current backend | 106 | * @return All settings provided by the current backend |
98 | * (i.e.: query_WildCards & query_IgnoreCase) | 107 | * (i.e.: query_WildCards & query_IgnoreCase) |
99 | */ | 108 | */ |
100 | virtual const uint querySettings() = 0; | 109 | virtual const uint querySettings() = 0; |
101 | 110 | ||
102 | /** | 111 | /** |
103 | * Check whether settings are correct. | 112 | * Check whether settings are correct. |
104 | * @return <i>true</i> if the given settings are correct and possible. | 113 | * @return <i>true</i> if the given settings are correct and possible. |
105 | */ | 114 | */ |
106 | virtual bool hasQuerySettings (uint querySettings) const = 0; | 115 | virtual bool hasQuerySettings (uint querySettings) const = 0; |
107 | 116 | ||
108 | /** | 117 | /** |
109 | * FIXME!!! | 118 | * FIXME!!! |
110 | * Returns a sorted list of records either ascendinf or descending for a giving criteria and category | 119 | * Returns a sorted list of records either ascendinf or descending for a giving criteria and category |
111 | */ | 120 | */ |
112 | virtual QArray<int> sorted( bool ascending, int sortOrder, int sortFilter, int cat ) = 0; | 121 | virtual QArray<int> sorted( bool ascending, int sortOrder, int sortFilter, int cat ) = 0; |
113 | 122 | ||
114 | 123 | ||
115 | private: | 124 | private: |
116 | class Private; | 125 | class Private; |
117 | Private *d; | 126 | Private *d; |
118 | }; | 127 | }; |
119 | #endif | 128 | #endif |