summaryrefslogtreecommitdiff
path: root/libopie/pim/ocontactaccessbackend.h
Unidiff
Diffstat (limited to 'libopie/pim/ocontactaccessbackend.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/pim/ocontactaccessbackend.h128
1 files changed, 0 insertions, 128 deletions
diff --git a/libopie/pim/ocontactaccessbackend.h b/libopie/pim/ocontactaccessbackend.h
deleted file mode 100644
index 0eac6dc..0000000
--- a/libopie/pim/ocontactaccessbackend.h
+++ b/dev/null
@@ -1,128 +0,0 @@
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.7 2004/02/19 02:05:37 zecke
23 * Add notes for API fixes and BC stuff
24 *
25 * Revision 1.6 2003/08/01 12:30:16 eilers
26 * Merging changes from BRANCH_1_0 to HEAD
27 *
28 * Revision 1.5.4.1 2003/06/30 14:34:19 eilers
29 * Patches from Zecke:
30 * Fixing and cleaning up extraMap handling
31 * Adding d_ptr for binary compatibility in the future
32 *
33 * Revision 1.5 2003/04/13 18:07:10 zecke
34 * More API doc
35 * QString -> const QString&
36 * QString = 0l -> QString::null
37 *
38 * Revision 1.4 2002/11/13 14:14:51 eilers
39 * Added sorted for Contacts..
40 *
41 * Revision 1.3 2002/11/01 15:10:42 eilers
42 * Added regExp-search in database for all fields in a contact.
43 *
44 * Revision 1.2 2002/10/07 17:34:24 eilers
45 * added OBackendFactory for advanced backend access
46 *
47 * Revision 1.1 2002/09/27 17:11:44 eilers
48 * Added API for accessing the Contact-Database ! It is compiling, but
49 * please do not expect that anything is working !
50 * I will debug that stuff in the next time ..
51 * Please read README_COMPILE for compiling !
52 *
53 * =====================================================================
54 *
55 */
56
57#ifndef _OCONTACTACCESSBACKEND_H_
58#define _OCONTACTACCESSBACKEND_H_
59
60#include "ocontact.h"
61#include "opimaccessbackend.h"
62
63#include <qregexp.h>
64
65/**
66 * This class represents the interface of all Contact Backends.
67 * Derivates of this class will be used to access the contacts.
68 * As implementation currently XML and vCard exist. This class needs to be implemented
69 * if you want to provide your own storage.
70 * In all queries a list of uids is passed on instead of loading the actual record!
71 *
72 * @see OContactAccessBackend_VCard
73 * @see OContactAccessBackend_XML
74 */
75class OContactAccessBackend: public OPimAccessBackend<OContact> {
76 public:
77 /**
78 * @todo make non line in regard to BC guide of KDE
79 */
80 OContactAccessBackend() {}
81 /**
82 * @todo make non inline in regard to the BC guide of KDE
83 */
84 virtual ~OContactAccessBackend() {}
85
86
87 /**
88 * Return if database was changed externally.
89 * This may just make sense on file based databases like a XML-File.
90 * It is used to prevent to overwrite the current database content
91 * if the file was already changed by something else !
92 * If this happens, we have to reload before save our data.
93 * If we use real databases, this should be handled by the database
94 * management system themselve, therefore this function should always return false in
95 * this case. It is not our problem to handle this conflict ...
96 * @return <i>true</i> if the database was changed and if save without reload will
97 * be dangerous. <i>false</i> if the database was not changed or it is save to write
98 * in this situation.
99 */
100 virtual bool wasChangedExternally() = 0;
101
102 virtual QArray<int> matchRegexp( const QRegExp &r ) const = 0;
103
104 /**
105 * Return all possible settings.
106 * @return All settings provided by the current backend
107 * (i.e.: query_WildCards & query_IgnoreCase)
108 */
109 virtual const uint querySettings() = 0;
110
111 /**
112 * Check whether settings are correct.
113 * @return <i>true</i> if the given settings are correct and possible.
114 */
115 virtual bool hasQuerySettings (uint querySettings) const = 0;
116
117 /**
118 * FIXME!!!
119 * Returns a sorted list of records either ascendinf or descending for a giving criteria and category
120 */
121 virtual QArray<int> sorted( bool ascending, int sortOrder, int sortFilter, int cat ) = 0;
122
123
124private:
125 class Private;
126 Private *d;
127};
128#endif