summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/backend/ocontactaccessbackend.h
Unidiff
Diffstat (limited to 'libopie2/opiepim/backend/ocontactaccessbackend.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/backend/ocontactaccessbackend.h70
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
37class 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