summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/core/ocontactaccess.h
Side-by-side diff
Diffstat (limited to 'libopie2/opiepim/core/ocontactaccess.h') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opiepim/core/ocontactaccess.h43
1 files changed, 3 insertions, 40 deletions
diff --git a/libopie2/opiepim/core/ocontactaccess.h b/libopie2/opiepim/core/ocontactaccess.h
index adc66cf..da9c942 100644
--- a/libopie2/opiepim/core/ocontactaccess.h
+++ b/libopie2/opiepim/core/ocontactaccess.h
@@ -8,24 +8,27 @@
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation;
* either version 2 of the License, or (at your option) any later
* version.
* =====================================================================
* ToDo: Define enum for query settings
* =====================================================================
* Version: $Id$
* =====================================================================
* History:
* $Log$
+ * Revision 1.3 2002/10/16 10:52:40 eilers
+ * Added some docu to the interface and now using the cache infrastucture by zecke.. :)
+ *
* Revision 1.2 2002/10/14 16:21:54 eilers
* Some minor interface updates
*
* Revision 1.1 2002/09/27 17:11:44 eilers
* 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 !
*
* =====================================================================
*/
#ifndef _OCONTACTACCESS_H
@@ -82,87 +85,47 @@ class OContactAccess: public QObject, public OPimAccessTemplate<OContact>
/** Return all possible settings.
* @return All settings provided by the current backend
* (i.e.: query_WildCards & query_IgnoreCase)
*/
const uint querySettings();
/** Check whether settings are correct.
* @return <i>true</i> if the given settings are correct and possible.
*/
bool hasQuerySettings ( int querySettings ) const;
- /** Add Contact to database.
- * @param newcontact The contact to add.
- * @return <i>true</i> if added successfully.
- */
- bool add (const OContact& newcontact);
-
- /** Replace contact.
- * Replaces given contact with contact with the user id <i>uid</i>.
- * @param uid The user ID
- * @param contact The new contact
- * @return <i>true</i> if successful.
- */
- bool replace ( const OContact& contact );
-
- /** Remove contact.
- * Removes contact with the user id <i>uid</i>.
- * @param The contact to remove
- * @return <i>true</i> if successful.
- */
- bool remove ( const OContact& t );
-
- /** Remove contact.
- * Removes contact with the user id <i>uid</i>.
- * @param The user id of the contact to remove
- * @return <i>true</i> if successful.
- */
- bool remove ( int uid );
-
- /** Load Database *
- */
- bool load();
-
/**
* if the resource was changed externally.
* You should use the signal instead of polling possible changes !
*/
bool wasChangedExternally()const;
- /** Reload database.
- * You should execute this function if the external database
- * was changed.
- * This function will load the external database and afterwards
- * rejoin the local changes. Therefore the local database will be set consistent.
- */
- bool reload();
/** Save contacts database.
* Save is more a "commit". After calling this function, all changes are public available.
* @return true if successful
*/
bool save();
signals:
/* Signal is emitted if the database was changed. Therefore
* we may need to reload to stay consistent.
* @param which Pointer to the database who created this event. This pointer
* is useful if an application has to handle multiple databases at the same time.
* @see reload()
*/
void signalChanged ( const OContactAccess *which );
private:
// class OContactAccessPrivate;
// OContactAccessPrivate* d;
OContactAccessBackend *m_backEnd;
bool m_loading:1;
- bool m_changed;
private slots:
void copMessage( const QCString &msg, const QByteArray &data );
};
#endif