#include </home/clem/local/src/opie/libopie2/opiepim/backend/ocontactaccessbackend_xml.h>
Inheritance diagram for Opie::OPimContactAccessBackend_XML:


Public Member Functions | |
| OPimContactAccessBackend_XML (const QString &appname, const QString &filename=QString::null) | |
| bool | save () |
| bool | load () |
| void | clear () |
| bool | wasChangedExternally () |
| UIDArray | allRecords () const |
| OPimContact | find (int uid) const |
| UIDArray | matchRegexp (const QRegExp &r) const |
| bool | add (const OPimContact &newcontact) |
| bool | replace (const OPimContact &contact) |
| bool | remove (int uid) |
| bool | reload () |
Protected Attributes | |
| bool | m_changed |
| QString | m_journalName |
| QString | m_fileName |
| QString | m_appName |
| QList< OPimContact > | m_contactList |
| QDateTime | m_readtime |
| QDict< OPimContact > | m_uidToContact |
Private Types | |
| enum | journal_action { ACTION_ADD, ACTION_REMOVE, ACTION_REPLACE } |
Private Member Functions | |
| void | addContact_p (const OPimContact &newcontact) |
| bool | load (const QString filename, bool isJournal) |
| void | updateJournal (const OPimContact &cnt, journal_action action) |
| void | removeJournal () |
Definition at line 49 of file ocontactaccessbackend_xml.h.
|
|
Definition at line 76 of file ocontactaccessbackend_xml.h. |
|
||||||||||||
|
Definition at line 59 of file ocontactaccessbackend_xml.cpp. References Global::applicationFileName(), QString::isEmpty(), load(), m_appName, m_contactList, m_fileName, m_journalName, m_uidToContact, and QPtrCollection::setAutoDelete(). |
|
|
Implements Opie::OPimAccessBackend< OPimContact >. Definition at line 265 of file ocontactaccessbackend_xml.cpp. References ACTION_ADD, addContact_p(), m_changed, and updateJournal(). |
|
|
Definition at line 316 of file ocontactaccessbackend_xml.cpp. References QDict< type >::insert(), m_contactList, m_uidToContact, and Qtopia::Record::uid(). |
|
|
Implements Opie::OPimAccessBackend< OPimContact >. Definition at line 186 of file ocontactaccessbackend_xml.cpp. References m_contactList. |
|
|
Implements Opie::OPimAccessBackend< OPimContact >. Definition at line 169 of file ocontactaccessbackend_xml.cpp. References QDict< type >::clear(), m_changed, m_contactList, and m_uidToContact. |
|
|
Definition at line 199 of file ocontactaccessbackend_xml.cpp. References QDict< type >::find(), and m_uidToContact. Referenced by load(). |
|
||||||||||||
|
|
Implements Opie::OPimAccessBackend< OPimContact >. Definition at line 150 of file ocontactaccessbackend_xml.cpp. References QDict< type >::clear(), m_contactList, m_fileName, m_journalName, and m_uidToContact. Referenced by OPimContactAccessBackend_XML(), and reload(). |
|
|
Reimplemented from Opie::OPimAccessBackend< OPimContact >. Definition at line 213 of file ocontactaccessbackend_xml.cpp. References m_contactList. |
|
|
Implements Opie::OPimAccessBackend< OPimContact >. Definition at line 311 of file ocontactaccessbackend_xml.cpp. References load(). |
|
|
Definition at line 295 of file ocontactaccessbackend_xml.cpp. References ACTION_REMOVE, QDict< type >::find(), m_changed, m_contactList, m_uidToContact, QDict< type >::remove(), and updateJournal(). Referenced by load(). |
|
|
Definition at line 529 of file ocontactaccessbackend_xml.cpp. References QFile::exists(), f, m_journalName, and QFile::remove(). Referenced by save(). |
|
|
Implements Opie::OPimAccessBackend< OPimContact >. Definition at line 275 of file ocontactaccessbackend_xml.cpp. References ACTION_REPLACE, QDict< type >::find(), QDict< type >::insert(), m_changed, m_contactList, m_uidToContact, QDict< type >::remove(), Qtopia::Record::uid(), and updateJournal(). Referenced by load(). |
|
|
Implements Opie::OPimAccessBackend< OPimContact >. Definition at line 83 of file ocontactaccessbackend_xml.cpp. References QFile::close(), f, IO_Raw, IO_WriteOnly, QString::latin1(), QCString::length(), m_changed, m_contactList, m_fileName, QFile::open(), out, QFile::remove(), removeJournal(), QString::utf8(), and QFile::writeBlock(). |
|
||||||||||||
|
Definition at line 501 of file ocontactaccessbackend_xml.cpp. References buf, created, QFile::exists(), f, IO_Append, IO_WriteOnly, QCString::length(), m_journalName, QString::number(), QFile::open(), Opie::OPimContact::save(), str, QString::utf8(), and QFile::writeBlock(). |
|
|
Return if database was changed externally. This may just make sense on file based databases like a XML-File. It is used to prevent to overwrite the current database content if the file was already changed by something else ! If this happens, we have to reload before save our data. If we use real databases, this should be handled by the database management system themselve, therefore this function should always return false in this case. It is not our problem to handle this conflict ...
Implements Opie::OPimContactAccessBackend. Definition at line 177 of file ocontactaccessbackend_xml.cpp. References QFileInfo::lastModified(), m_fileName, and m_readtime. |
|
|
Definition at line 91 of file ocontactaccessbackend_xml.h. Referenced by OPimContactAccessBackend_XML(). |
|
|
Definition at line 88 of file ocontactaccessbackend_xml.h. Referenced by add(), clear(), remove(), replace(), and save(). |
|
|
Definition at line 92 of file ocontactaccessbackend_xml.h. Referenced by addContact_p(), allRecords(), clear(), load(), matchRegexp(), OPimContactAccessBackend_XML(), remove(), replace(), and save(). |
|
|
Definition at line 90 of file ocontactaccessbackend_xml.h. Referenced by load(), OPimContactAccessBackend_XML(), save(), and wasChangedExternally(). |
|
|
Definition at line 89 of file ocontactaccessbackend_xml.h. Referenced by load(), OPimContactAccessBackend_XML(), removeJournal(), and updateJournal(). |
|
|
Definition at line 93 of file ocontactaccessbackend_xml.h. Referenced by load(), and wasChangedExternally(). |
|
|
Definition at line 95 of file ocontactaccessbackend_xml.h. Referenced by addContact_p(), clear(), find(), load(), OPimContactAccessBackend_XML(), remove(), and replace(). |
1.4.2