author | eilers <eilers> | 2002-10-16 10:52:40 (UTC) |
---|---|---|
committer | eilers <eilers> | 2002-10-16 10:52:40 (UTC) |
commit | f9756ca203a06fa60413ef1a96416d87b9dc1a6b (patch) (side-by-side diff) | |
tree | 0b67c3c485349a1c31ea82e7c12526b990654d58 /libopie2/opiepim/core/ocontactaccess.cpp | |
parent | 9eba62fc184260f1a0455a6dd057e2ccebf4bdac (diff) | |
download | opie-f9756ca203a06fa60413ef1a96416d87b9dc1a6b.zip opie-f9756ca203a06fa60413ef1a96416d87b9dc1a6b.tar.gz opie-f9756ca203a06fa60413ef1a96416d87b9dc1a6b.tar.bz2 |
Added some docu to the interface and now using the cache infrastucture by zecke.. :)
Diffstat (limited to 'libopie2/opiepim/core/ocontactaccess.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | libopie2/opiepim/core/ocontactaccess.cpp | 47 |
1 files changed, 6 insertions, 41 deletions
diff --git a/libopie2/opiepim/core/ocontactaccess.cpp b/libopie2/opiepim/core/ocontactaccess.cpp index e8c0a45..2ca0283 100644 --- a/libopie2/opiepim/core/ocontactaccess.cpp +++ b/libopie2/opiepim/core/ocontactaccess.cpp @@ -23,2 +23,5 @@ * $Log$ + * Revision 1.5 2002/10/16 10:52:40 eilers + * Added some docu to the interface and now using the cache infrastucture by zecke.. :) + * * Revision 1.4 2002/10/14 16:21:54 eilers @@ -64,4 +67,3 @@ OContactAccess::OContactAccess ( const QString appname, const QString , OContactAccessBackend* end, bool autosync ): - OPimAccessTemplate<OContact>( end ), - m_changed ( false ) + OPimAccessTemplate<OContact>( end ) { @@ -96,3 +98,2 @@ OContactAccess::~OContactAccess () */ - if ( m_changed ) save(); @@ -101,6 +102,2 @@ OContactAccess::~OContactAccess () -bool OContactAccess::load() -{ - return ( m_backEnd->load() ); -} @@ -112,10 +109,8 @@ bool OContactAccess::save () */ - if ( m_backEnd->wasChangedExternally() ) + if ( OPimAccessTemplate<OContact>::wasChangedExternally() ) reload(); - if ( m_changed ){ - bool status = m_backEnd->save(); + bool status = OPimAccessTemplate<OContact>::save(); if ( !status ) return false; - m_changed = false; /* Now tell everyone that new data is available. @@ -124,4 +119,2 @@ bool OContactAccess::save () - } - return true; @@ -139,25 +132,2 @@ bool OContactAccess::hasQuerySettings ( int querySettings ) const -bool OContactAccess::add ( const OContact& newcontact ) -{ - m_changed = true; - return ( m_backEnd->add ( newcontact ) ); -} - -bool OContactAccess::replace ( const OContact& contact ) -{ - m_changed = true; - return ( m_backEnd->replace ( contact ) ); -} - -bool OContactAccess::remove ( const OContact& t ) -{ - m_changed = true; - return ( m_backEnd->remove ( t.uid() ) ); -} - -bool OContactAccess::remove ( int uid ) -{ - m_changed = true; - return ( m_backEnd->remove ( uid ) ); -} @@ -169,7 +139,2 @@ bool OContactAccess::wasChangedExternally()const -bool OContactAccess::reload() -{ - return ( m_backEnd->reload() ); -} - void OContactAccess::copMessage( const QCString &msg, const QByteArray & ) |