-rw-r--r-- | libopie/pim/ocontactaccessbackend_vcard.cpp | 18 | ||||
-rw-r--r-- | libopie/pim/ocontactaccessbackend_vcard.h | 5 | ||||
-rw-r--r-- | libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp | 18 | ||||
-rw-r--r-- | libopie2/opiepim/backend/ocontactaccessbackend_vcard.h | 5 |
4 files changed, 36 insertions, 10 deletions
diff --git a/libopie/pim/ocontactaccessbackend_vcard.cpp b/libopie/pim/ocontactaccessbackend_vcard.cpp index 903c0b7..013f3af 100644 --- a/libopie/pim/ocontactaccessbackend_vcard.cpp +++ b/libopie/pim/ocontactaccessbackend_vcard.cpp @@ -2,4 +2,5 @@ * VCard Backend for the OPIE-Contact Database. * + * Copyright (C) 2000 Trolltech AS. All rights reserved. * Copyright (c) 2002 by Stefan Eilers (Eilers.Stefan@epost.de) * @@ -17,4 +18,7 @@ * History: * $Log$ + * Revision 1.2 2002/11/10 15:41:53 eilers + * Bugfixes.. + * * Revision 1.1 2002/11/09 14:34:52 eilers * Added VCard Backend. @@ -32,5 +36,7 @@ OContactAccessBackend_VCard::OContactAccessBackend_VCard ( QString , QString fil m_dirty( false ), m_file( filename ) -{} +{ + load(); +} @@ -87,9 +93,7 @@ bool OContactAccessBackend_VCard::save() for(QMap<int, OContact>::ConstIterator it=m_map.begin(); it !=m_map.end(); ++it ){ vo = createVObject( *it ); - addVObjectProp( obj, vo ); + writeVObject( file.directHandle() , vo ); + cleanVObject( vo ); } - writeVObject( file.directHandle() , obj ); - cleanVObject( obj ); - cleanStrTbl(); @@ -167,4 +171,8 @@ bool OContactAccessBackend_VCard::hasQuerySettings (uint ) const } +bool OContactAccessBackend_VCard::wasChangedExternally() +{ + return false; // Don't expect concurrent access +} // *** Private stuff *** diff --git a/libopie/pim/ocontactaccessbackend_vcard.h b/libopie/pim/ocontactaccessbackend_vcard.h index c1422b0..177ec24 100644 --- a/libopie/pim/ocontactaccessbackend_vcard.h +++ b/libopie/pim/ocontactaccessbackend_vcard.h @@ -2,4 +2,5 @@ * VCard Backend for the OPIE-Contact Database. * + * Copyright (C) 2000 Trolltech AS. All rights reserved. * Copyright (c) 2002 by Stefan Eilers (Eilers.Stefan@epost.de) * @@ -17,4 +18,7 @@ * History: * $Log$ + * Revision 1.2 2002/11/10 15:41:53 eilers + * Bugfixes.. + * * Revision 1.1 2002/11/09 14:34:52 eilers * Added VCard Backend. @@ -50,4 +54,5 @@ class OContactAccessBackend_VCard : public OContactAccessBackend { const uint querySettings(); bool hasQuerySettings (uint querySettings) const; + bool wasChangedExternally(); private: diff --git a/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp b/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp index 903c0b7..013f3af 100644 --- a/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp +++ b/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp @@ -2,4 +2,5 @@ * VCard Backend for the OPIE-Contact Database. * + * Copyright (C) 2000 Trolltech AS. All rights reserved. * Copyright (c) 2002 by Stefan Eilers (Eilers.Stefan@epost.de) * @@ -17,4 +18,7 @@ * History: * $Log$ + * Revision 1.2 2002/11/10 15:41:53 eilers + * Bugfixes.. + * * Revision 1.1 2002/11/09 14:34:52 eilers * Added VCard Backend. @@ -32,5 +36,7 @@ OContactAccessBackend_VCard::OContactAccessBackend_VCard ( QString , QString fil m_dirty( false ), m_file( filename ) -{} +{ + load(); +} @@ -87,9 +93,7 @@ bool OContactAccessBackend_VCard::save() for(QMap<int, OContact>::ConstIterator it=m_map.begin(); it !=m_map.end(); ++it ){ vo = createVObject( *it ); - addVObjectProp( obj, vo ); + writeVObject( file.directHandle() , vo ); + cleanVObject( vo ); } - writeVObject( file.directHandle() , obj ); - cleanVObject( obj ); - cleanStrTbl(); @@ -167,4 +171,8 @@ bool OContactAccessBackend_VCard::hasQuerySettings (uint ) const } +bool OContactAccessBackend_VCard::wasChangedExternally() +{ + return false; // Don't expect concurrent access +} // *** Private stuff *** diff --git a/libopie2/opiepim/backend/ocontactaccessbackend_vcard.h b/libopie2/opiepim/backend/ocontactaccessbackend_vcard.h index c1422b0..177ec24 100644 --- a/libopie2/opiepim/backend/ocontactaccessbackend_vcard.h +++ b/libopie2/opiepim/backend/ocontactaccessbackend_vcard.h @@ -2,4 +2,5 @@ * VCard Backend for the OPIE-Contact Database. * + * Copyright (C) 2000 Trolltech AS. All rights reserved. * Copyright (c) 2002 by Stefan Eilers (Eilers.Stefan@epost.de) * @@ -17,4 +18,7 @@ * History: * $Log$ + * Revision 1.2 2002/11/10 15:41:53 eilers + * Bugfixes.. + * * Revision 1.1 2002/11/09 14:34:52 eilers * Added VCard Backend. @@ -50,4 +54,5 @@ class OContactAccessBackend_VCard : public OContactAccessBackend { const uint querySettings(); bool hasQuerySettings (uint querySettings) const; + bool wasChangedExternally(); private: |