Diffstat (limited to 'libopie2/opiepim/backend/ocontactaccessbackend.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiepim/backend/ocontactaccessbackend.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libopie2/opiepim/backend/ocontactaccessbackend.h b/libopie2/opiepim/backend/ocontactaccessbackend.h index 27d70ab..d5c463b 100644 --- a/libopie2/opiepim/backend/ocontactaccessbackend.h +++ b/libopie2/opiepim/backend/ocontactaccessbackend.h | |||
@@ -1,99 +1,100 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the Opie Project | 2 | This file is part of the Opie Project |
3 | Copyright (C) The Main Author <main-author@whereever.org> | 3 | Copyright (C) Holger Freyther <freyther@handhelds.org> |
4 | Copyright (C) Stefan Eilers <stefan@eilers-online.net> | ||
4 | =. Copyright (C) The Opie Team <opie-devel@handhelds.org> | 5 | =. Copyright (C) The Opie Team <opie-devel@handhelds.org> |
5 | .=l. | 6 | .=l. |
6 | .>+-= | 7 | .>+-= |
7 | _;:, .> :=|. This program is free software; you can | 8 | _;:, .> :=|. This program is free software; you can |
8 | .> <`_, > . <= redistribute it and/or modify it under | 9 | .> <`_, > . <= redistribute it and/or modify it under |
9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | 10 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
10 | .="- .-=="i, .._ License as published by the Free Software | 11 | .="- .-=="i, .._ License as published by the Free Software |
11 | - . .-<_> .<> Foundation; either version 2 of the License, | 12 | - . .-<_> .<> Foundation; either version 2 of the License, |
12 | ._= =} : or (at your option) any later version. | 13 | ._= =} : or (at your option) any later version. |
13 | .%`+i> _;_. | 14 | .%`+i> _;_. |
14 | .i_,=:_. -<s. This program is distributed in the hope that | 15 | .i_,=:_. -<s. This program is distributed in the hope that |
15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 16 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
16 | : .. .:, . . . without even the implied warranty of | 17 | : .. .:, . . . without even the implied warranty of |
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 18 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 19 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
19 | ..}^=.= = ; Library General Public License for more | 20 | ..}^=.= = ; Library General Public License for more |
20 | ++= -. .` .: details. | 21 | ++= -. .` .: details. |
21 | : = ...= . :.=- | 22 | : = ...= . :.=- |
22 | -. .:....=;==+<; You should have received a copy of the GNU | 23 | -. .:....=;==+<; You should have received a copy of the GNU |
23 | -_. . . )=. = Library General Public License along with | 24 | -_. . . )=. = Library General Public License along with |
24 | -- :-=` this library; see the file COPYING.LIB. | 25 | -- :-=` this library; see the file COPYING.LIB. |
25 | If not, write to the Free Software Foundation, | 26 | If not, write to the Free Software Foundation, |
26 | Inc., 59 Temple Place - Suite 330, | 27 | Inc., 59 Temple Place - Suite 330, |
27 | Boston, MA 02111-1307, USA. | 28 | Boston, MA 02111-1307, USA. |
28 | */ | 29 | */ |
29 | /** | 30 | /** |
30 | * The class responsible for managing a backend. | 31 | * The class responsible for managing a backend. |
31 | * The implementation of this abstract class contains | 32 | * The implementation of this abstract class contains |
32 | * the complete database handling. | 33 | * the complete database handling. |
33 | * | 34 | * |
34 | * Copyright (c) 2002 by Stefan Eilers (Eilers.Stefan@epost.de) | 35 | * Copyright (c) 2002 by Stefan Eilers (Eilers.Stefan@epost.de) |
35 | * Copyright (c) 2002 by Holger Freyther (zecke@handhelds.org) | 36 | * Copyright (c) 2002 by Holger Freyther (zecke@handhelds.org) |
36 | * | 37 | * |
37 | */ | 38 | */ |
38 | 39 | ||
39 | #ifndef _OCONTACTACCESSBACKEND_H_ | 40 | #ifndef _OCONTACTACCESSBACKEND_H_ |
40 | #define _OCONTACTACCESSBACKEND_H_ | 41 | #define _OCONTACTACCESSBACKEND_H_ |
41 | 42 | ||
42 | #include <opie2/opimcontact.h> | 43 | #include <opie2/opimcontact.h> |
43 | #include <opie2/opimaccessbackend.h> | 44 | #include <opie2/opimaccessbackend.h> |
44 | 45 | ||
45 | #include <qregexp.h> | 46 | #include <qregexp.h> |
46 | 47 | ||
47 | namespace Opie { | 48 | namespace Opie { |
48 | /** | 49 | /** |
49 | * This class represents the interface of all Contact Backends. | 50 | * This class represents the interface of all Contact Backends. |
50 | * Derivates of this class will be used to access the contacts. | 51 | * Derivates of this class will be used to access the contacts. |
51 | * As implementation currently XML and vCard exist. This class needs to be implemented | 52 | * As implementation currently XML and vCard exist. This class needs to be implemented |
52 | * if you want to provide your own storage. | 53 | * if you want to provide your own storage. |
53 | * In all queries a list of uids is passed on instead of loading the actual record! | 54 | * In all queries a list of uids is passed on instead of loading the actual record! |
54 | * | 55 | * |
55 | * @see OPimContactAccessBackend_VCard | 56 | * @see OPimContactAccessBackend_VCard |
56 | * @see OPimContactAccessBackend_XML | 57 | * @see OPimContactAccessBackend_XML |
57 | */ | 58 | */ |
58 | class OPimContactAccessBackend: public OPimAccessBackend<OPimContact> { | 59 | class OPimContactAccessBackend: public OPimAccessBackend<OPimContact> { |
59 | public: | 60 | public: |
60 | OPimContactAccessBackend(); | 61 | OPimContactAccessBackend(); |
61 | 62 | ||
62 | 63 | ||
63 | /** | 64 | /** |
64 | * Return if database was changed externally. | 65 | * Return if database was changed externally. |
65 | * This may just make sense on file based databases like a XML-File. | 66 | * This may just make sense on file based databases like a XML-File. |
66 | * It is used to prevent to overwrite the current database content | 67 | * It is used to prevent to overwrite the current database content |
67 | * if the file was already changed by something else ! | 68 | * if the file was already changed by something else ! |
68 | * If this happens, we have to reload before save our data. | 69 | * If this happens, we have to reload before save our data. |
69 | * If we use real databases, this should be handled by the database | 70 | * If we use real databases, this should be handled by the database |
70 | * management system themselve, therefore this function should always return false in | 71 | * management system themselve, therefore this function should always return false in |
71 | * this case. It is not our problem to handle this conflict ... | 72 | * this case. It is not our problem to handle this conflict ... |
72 | * @return <i>true</i> if the database was changed and if save without reload will | 73 | * @return <i>true</i> if the database was changed and if save without reload will |
73 | * be dangerous. <i>false</i> if the database was not changed or it is save to write | 74 | * be dangerous. <i>false</i> if the database was not changed or it is save to write |
74 | * in this situation. | 75 | * in this situation. |
75 | */ | 76 | */ |
76 | virtual bool wasChangedExternally() = 0; | 77 | virtual bool wasChangedExternally() = 0; |
77 | 78 | ||
78 | /** | 79 | /** |
79 | * Return all possible settings. | 80 | * Return all possible settings. |
80 | * @return All settings provided by the current backend | 81 | * @return All settings provided by the current backend |
81 | * (i.e.: query_WildCards & query_IgnoreCase) | 82 | * (i.e.: query_WildCards & query_IgnoreCase) |
82 | */ | 83 | */ |
83 | const uint querySettings() const; | 84 | const uint querySettings() const; |
84 | 85 | ||
85 | /** | 86 | /** |
86 | * Check whether settings are correct. | 87 | * Check whether settings are correct. |
87 | * @return <i>true</i> if the given settings are correct and possible. | 88 | * @return <i>true</i> if the given settings are correct and possible. |
88 | */ | 89 | */ |
89 | bool hasQuerySettings (uint querySettings) const; | 90 | bool hasQuerySettings (uint querySettings) const; |
90 | 91 | ||
91 | /** | 92 | /** |
92 | * Advanced search mechanism. | 93 | * Advanced search mechanism. |
93 | */ | 94 | */ |
94 | UIDArray queryByExample( const UIDArray& uidlist, const OPimContact&, int settings, const QDateTime &d = QDateTime() ) const; | 95 | UIDArray queryByExample( const UIDArray& uidlist, const OPimContact&, int settings, const QDateTime &d = QDateTime() ) const; |
95 | /** | 96 | /** |
96 | * Slow and inefficent default implementation | 97 | * Slow and inefficent default implementation |
97 | */ | 98 | */ |
98 | //@{ | 99 | //@{ |
99 | UIDArray sorted( const UIDArray&, bool asc, int, int, const QArray<int>& )const; | 100 | UIDArray sorted( const UIDArray&, bool asc, int, int, const QArray<int>& )const; |