#include </home/clem/local/src/opie/noncore/unsupported/libopie/pim/ocontactaccessbackend_xml.h>
Inheritance diagram for OContactAccessBackend_XML:


Public Member Functions | |
| OContactAccessBackend_XML (const QString &appname, const QString &filename=QString::null) | |
| bool | save () |
| bool | load () |
| void | clear () |
| bool | wasChangedExternally () |
| QArray< int > | allRecords () const |
| OContact | find (int uid) const |
| QArray< int > | queryByExample (const OContact &query, int settings, const QDateTime &d=QDateTime()) |
| QArray< int > | matchRegexp (const QRegExp &r) const |
| const uint | querySettings () |
| bool | hasQuerySettings (uint querySettings) const |
| QArray< int > | sorted (bool asc, int, int, int) |
| bool | add (const OContact &newcontact) |
| bool | replace (const OContact &contact) |
| bool | remove (int uid) |
| bool | reload () |
Protected Attributes | |
| bool | m_changed |
| QString | m_journalName |
| QString | m_fileName |
| QString | m_appName |
| QList< OContact > | m_contactList |
| QDateTime | m_readtime |
| QDict< OContact > | m_uidToContact |
Private Types | |
| enum | journal_action { ACTION_ADD, ACTION_REMOVE, ACTION_REPLACE } |
Private Member Functions | |
| void | addContact_p (const OContact &newcontact) |
| bool | load (const QString filename, bool isJournal) |
| void | updateJournal (const OContact &cnt, journal_action action) |
| void | removeJournal () |
Definition at line 106 of file ocontactaccessbackend_xml.h.
|
|
Definition at line 141 of file ocontactaccessbackend_xml.h. |
|
||||||||||||
|
Definition at line 131 of file ocontactaccessbackend_xml.cpp. References Global::applicationFileName(), QString::isEmpty(), load(), m_appName, m_contactList, m_fileName, m_journalName, m_uidToContact, and QPtrCollection::setAutoDelete(). |
|
|
add T Implements OPimAccessBackend< OContact >. Definition at line 535 of file ocontactaccessbackend_xml.cpp. References ACTION_ADD, addContact_p(), m_changed, and updateJournal(). |
|
|
Definition at line 589 of file ocontactaccessbackend_xml.cpp. References QDict< type >::insert(), m_contactList, m_uidToContact, and Qtopia::Record::uid(). |
|
|
return an array of all available uids Implements OPimAccessBackend< OContact >. Definition at line 261 of file ocontactaccessbackend_xml.cpp. References m_contactList. |
|
|
clear the back end Implements OPimAccessBackend< OContact >. Definition at line 244 of file ocontactaccessbackend_xml.cpp. References QDict< type >::clear(), m_changed, m_contactList, and m_uidToContact. |
|
|
find the OPimRecord with uid
Implements OPimAccessBackend< OContact >. Definition at line 274 of file ocontactaccessbackend_xml.cpp. References QDict< type >::find(), and m_uidToContact. Referenced by load(). |
|
|
Check whether settings are correct.
Implements OContactAccessBackend. Definition at line 459 of file ocontactaccessbackend_xml.cpp. References OContactAccess::DateDay, OContactAccess::DateDiff, OContactAccess::DateMonth, OContactAccess::DateYear, OContactAccess::ExactMatch, OContactAccess::IgnoreCase, OContactAccess::RegExp, and OContactAccess::WildCards. |
|
||||||||||||
|
|
load the resource Implements OPimAccessBackend< OContact >. Definition at line 225 of file ocontactaccessbackend_xml.cpp. References QDict< type >::clear(), m_contactList, m_fileName, m_journalName, and m_uidToContact. Referenced by OContactAccessBackend_XML(), and reload(). |
|
|
return a List of records that match the regex Implements OContactAccessBackend. Definition at line 428 of file ocontactaccessbackend_xml.cpp. References m_contactList. |
|
||||||||||||||||
|
queryByExample for T with the given Settings Implements OPimAccessBackend< OContact >. Definition at line 287 of file ocontactaccessbackend_xml.cpp. References Qtopia::Anniversary, Qtopia::Birthday, QDate::currentDate(), QDateTime::date(), OContactAccess::DateDay, OContactAccess::DateDiff, OContactAccess::DateMonth, OContactAccess::DateYear, QDate::day(), QDate::daysTo(), OContactAccess::ExactMatch, false, Qtopia::Groups, i, OContactAccess::IgnoreCase, QDate::isValid(), l, m_contactList, OContactAccess::MatchOne, QDate::month(), qWarning(), OContactAccess::RegExp, QDate::setYMD(), QDate::toString(), true, OContactAccess::WildCards, and QDate::year(). |
|
|
Return all possible settings.
Implements OContactAccessBackend. Definition at line 446 of file ocontactaccessbackend_xml.cpp. References OContactAccess::DateDay, OContactAccess::DateDiff, OContactAccess::DateMonth, OContactAccess::DateYear, OContactAccess::ExactMatch, OContactAccess::IgnoreCase, OContactAccess::RegExp, and OContactAccess::WildCards. |
|
|
reload the resource Implements OPimAccessBackend< OContact >. Definition at line 584 of file ocontactaccessbackend_xml.cpp. References load(). |
|
|
remove Implements OPimAccessBackend< OContact >. Definition at line 568 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 818 of file ocontactaccessbackend_xml.cpp. References QFile::exists(), f, m_journalName, and QFile::remove(). Referenced by save(). |
|
|
replace a record with T.uid() Implements OPimAccessBackend< OContact >. Definition at line 546 of file ocontactaccessbackend_xml.cpp. References ACTION_REPLACE, QDict< type >::find(), QDict< type >::insert(), m_changed, m_contactList, m_uidToContact, qWarning(), QDict< type >::remove(), Qtopia::Record::uid(), and updateJournal(). Referenced by load(). |
|
|
save the resource and all it's changes Implements OPimAccessBackend< OContact >. Definition at line 155 of file ocontactaccessbackend_xml.cpp. References QFile::close(), f, IO_Raw, IO_WriteOnly, QString::latin1(), QCString::length(), m_changed, m_contactList, m_fileName, m_journalName, QFile::open(), out, qWarning(), QFile::remove(), removeJournal(), QString::utf8(), and QFile::writeBlock(). |
|
||||||||||||||||||||
|
FIXME!!! Returns a sorted list of records either ascendinf or descending for a giving criteria and category Implements OContactAccessBackend. Definition at line 507 of file ocontactaccessbackend_xml.cpp. References QValueList< T >::append(), QValueList< T >::begin(), QValueList< T >::end(), i, QMap< Key, T >::insert(), m_contactList, QString::number(), and QStringList::sort(). |
|
||||||||||||
|
Definition at line 790 of file ocontactaccessbackend_xml.cpp. References buf, created, QFile::exists(), f, IO_Append, IO_WriteOnly, QCString::length(), m_journalName, QString::number(), QFile::open(), OContact::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 OContactAccessBackend. Definition at line 252 of file ocontactaccessbackend_xml.cpp. References QFileInfo::lastModified(), m_fileName, and m_readtime. |
|
|
Definition at line 156 of file ocontactaccessbackend_xml.h. Referenced by OContactAccessBackend_XML(). |
|
|
Definition at line 153 of file ocontactaccessbackend_xml.h. Referenced by add(), clear(), remove(), replace(), and save(). |
|
|
Definition at line 157 of file ocontactaccessbackend_xml.h. Referenced by addContact_p(), allRecords(), clear(), load(), matchRegexp(), OContactAccessBackend_XML(), queryByExample(), remove(), replace(), save(), and sorted(). |
|
|
Definition at line 155 of file ocontactaccessbackend_xml.h. Referenced by load(), OContactAccessBackend_XML(), save(), and wasChangedExternally(). |
|
|
Definition at line 154 of file ocontactaccessbackend_xml.h. Referenced by load(), OContactAccessBackend_XML(), removeJournal(), save(), and updateJournal(). |
|
|
Definition at line 158 of file ocontactaccessbackend_xml.h. Referenced by load(), and wasChangedExternally(). |
|
|
Definition at line 160 of file ocontactaccessbackend_xml.h. Referenced by addContact_p(), clear(), find(), load(), OContactAccessBackend_XML(), remove(), and replace(). |
1.4.2