author | eilers <eilers> | 2002-09-27 17:11:44 (UTC) |
---|---|---|
committer | eilers <eilers> | 2002-09-27 17:11:44 (UTC) |
commit | 44c98b497ff1cb8cddba10b56435f136a583cce2 (patch) (unidiff) | |
tree | d76ab641b0a9151031f1ec7ac19ff00c11f82b53 /libopie2/opiepim/backend/ocontactaccessbackend.h | |
parent | d44b205c9009af71db036b3951363a91110e1c20 (diff) | |
download | opie-44c98b497ff1cb8cddba10b56435f136a583cce2.zip opie-44c98b497ff1cb8cddba10b56435f136a583cce2.tar.gz opie-44c98b497ff1cb8cddba10b56435f136a583cce2.tar.bz2 |
Added API for accessing the Contact-Database ! It is compiling, but
please do not expect that anything is working !
I will debug that stuff in the next time ..
Please read README_COMPILE for compiling !
Diffstat (limited to 'libopie2/opiepim/backend/ocontactaccessbackend.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiepim/backend/ocontactaccessbackend.h | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/libopie2/opiepim/backend/ocontactaccessbackend.h b/libopie2/opiepim/backend/ocontactaccessbackend.h new file mode 100644 index 0000000..9469bbc --- a/dev/null +++ b/libopie2/opiepim/backend/ocontactaccessbackend.h | |||
@@ -0,0 +1,70 @@ | |||
1 | /** | ||
2 | * The class responsible for managing a backend. | ||
3 | * The implementation of this abstract class contains | ||
4 | * the complete database handling. | ||
5 | * | ||
6 | * Copyright (c) 2002 by Stefan Eilers (Eilers.Stefan@epost.de) | ||
7 | * Copyright (c) 2002 by Holger Freyther (zecke@handhelds.org) | ||
8 | * | ||
9 | * ===================================================================== | ||
10 | *This program is free software; you can redistribute it and/or | ||
11 | *modify it under the terms of the GNU Library General Public | ||
12 | * License as published by the Free Software Foundation; | ||
13 | * either version 2 of the License, or (at your option) any later | ||
14 | * version. | ||
15 | * ===================================================================== | ||
16 | * ToDo: Define enum for query settings | ||
17 | * ===================================================================== | ||
18 | * Version: $Id$ | ||
19 | * ===================================================================== | ||
20 | * History: | ||
21 | * $Log$ | ||
22 | * Revision 1.1 2002/09/27 17:11:44 eilers | ||
23 | * Added API for accessing the Contact-Database ! It is compiling, but | ||
24 | * please do not expect that anything is working ! | ||
25 | * I will debug that stuff in the next time .. | ||
26 | * Please read README_COMPILE for compiling ! | ||
27 | * | ||
28 | * ===================================================================== | ||
29 | * | ||
30 | */ | ||
31 | |||
32 | #ifndef _OCONTACTACCESSBACKEND_H_ | ||
33 | #define _OCONTACTACCESSBACKEND_H_ | ||
34 | |||
35 | #include "opimaccessbackend.h" | ||
36 | |||
37 | class OContactAccessBackend: public OPimAccessBackend<OContact> { | ||
38 | public: | ||
39 | OContactAccessBackend() {} | ||
40 | virtual ~OContactAccessBackend() {} | ||
41 | |||
42 | |||
43 | /** Return if database was changed externally. | ||
44 | * This may just make sense on file based databases like a XML-File. | ||
45 | * It is used to prevent to overwrite the current database content | ||
46 | * if the file was already changed by something else ! | ||
47 | * If this happens, we have to reload before save our data. | ||
48 | * If we use real databases, this should be handled by the database | ||
49 | * management system themselve, therefore this function should always return false in | ||
50 | * this case. It is not our problem to handle this conflict ... | ||
51 | * @return <i>true</i> if the database was changed and if save without reload will | ||
52 | * be dangerous. <i>false</i> if the database was not changed or it is save to write | ||
53 | * in this situation. | ||
54 | */ | ||
55 | virtual bool wasChangedExternally() = 0; | ||
56 | |||
57 | /** Return all possible settings. | ||
58 | * @return All settings provided by the current backend | ||
59 | * (i.e.: query_WildCards & query_IgnoreCase) | ||
60 | */ | ||
61 | virtual const uint querySettings() = 0; | ||
62 | |||
63 | /** Check whether settings are correct. | ||
64 | * @return <i>true</i> if the given settings are correct and possible. | ||
65 | */ | ||
66 | virtual bool hasQuerySettings (uint querySettings) const = 0; | ||
67 | |||
68 | |||
69 | }; | ||
70 | #endif | ||