author | eilers <eilers> | 2002-12-08 12:48:57 (UTC) |
---|---|---|
committer | eilers <eilers> | 2002-12-08 12:48:57 (UTC) |
commit | a88b210e6895614027c821bb5cedabc9b06117d3 (patch) (side-by-side diff) | |
tree | 1c38097b1935713d165c1087268701657a38fa11 | |
parent | 6e52c7ae78769be8427b01201aa77c78aef90647 (diff) | |
download | opie-a88b210e6895614027c821bb5cedabc9b06117d3.zip opie-a88b210e6895614027c821bb5cedabc9b06117d3.tar.gz opie-a88b210e6895614027c821bb5cedabc9b06117d3.tar.bz2 |
Moved journal-enum from ocontact into i the xml-backend..
-rw-r--r-- | libopie/pim/ocontact.h | 2 | ||||
-rw-r--r-- | libopie/pim/ocontactaccessbackend_xml.h | 24 | ||||
-rw-r--r-- | libopie2/opiepim/backend/ocontactaccessbackend_xml.h | 24 | ||||
-rw-r--r-- | libopie2/opiepim/ocontact.h | 2 |
4 files changed, 30 insertions, 22 deletions
diff --git a/libopie/pim/ocontact.h b/libopie/pim/ocontact.h index 65ba43e..1fd1c75 100644 --- a/libopie/pim/ocontact.h +++ b/libopie/pim/ocontact.h @@ -46,4 +46,2 @@ public: - enum journal_action { ACTION_ADD, ACTION_REMOVE, ACTION_REPLACE }; - /* diff --git a/libopie/pim/ocontactaccessbackend_xml.h b/libopie/pim/ocontactaccessbackend_xml.h index ae6ec9e..c765ff5 100644 --- a/libopie/pim/ocontactaccessbackend_xml.h +++ b/libopie/pim/ocontactaccessbackend_xml.h @@ -19,2 +19,5 @@ * $Log$ + * Revision 1.9 2002/12/08 12:48:57 eilers + * Moved journal-enum from ocontact into i the xml-backend.. + * * Revision 1.8 2002/11/14 17:04:24 eilers @@ -344,3 +347,3 @@ class OContactAccessBackend_XML : public OContactAccessBackend { //qWarning("odefaultbackend: ACTION::ADD"); - updateJournal (newcontact, OContact::ACTION_ADD); + updateJournal (newcontact, ACTION_ADD); addContact_p( newcontact ); @@ -366,3 +369,3 @@ class OContactAccessBackend_XML : public OContactAccessBackend { if (found) { - updateJournal (contact, OContact::ACTION_REPLACE); + updateJournal (contact, ACTION_REPLACE); m_contactList.remove (it); @@ -387,3 +390,3 @@ class OContactAccessBackend_XML : public OContactAccessBackend { if (found) { - updateJournal ( *it, OContact::ACTION_REMOVE); + updateJournal ( *it, ACTION_REMOVE); m_contactList.remove (it); @@ -400,2 +403,5 @@ class OContactAccessBackend_XML : public OContactAccessBackend { private: + + enum journal_action { ACTION_ADD, ACTION_REMOVE, ACTION_REPLACE }; + void addContact_p( const OContact &newcontact ){ @@ -419,3 +425,3 @@ class OContactAccessBackend_XML : public OContactAccessBackend { bool foundAction = false; - OContact::journal_action action = OContact::ACTION_ADD; + journal_action action = ACTION_ADD; int journalKey = 0; @@ -540,3 +546,3 @@ class OContactAccessBackend_XML : public OContactAccessBackend { case JOURNALACTION: - action = OContact::journal_action(it.data().toInt()); + action = journal_action(it.data().toInt()); foundAction = true; @@ -562,6 +568,6 @@ class OContactAccessBackend_XML : public OContactAccessBackend { switch ( action ) { - case OContact::ACTION_ADD: + case ACTION_ADD: addContact_p (contact); break; - case OContact::ACTION_REMOVE: + case ACTION_REMOVE: if ( !remove (contact.uid()) ) @@ -570,3 +576,3 @@ class OContactAccessBackend_XML : public OContactAccessBackend { break; - case OContact::ACTION_REPLACE: + case ACTION_REPLACE: if ( !replace ( contact ) ) @@ -597,3 +603,3 @@ class OContactAccessBackend_XML : public OContactAccessBackend { void updateJournal( const OContact& cnt, - OContact::journal_action action ) { + journal_action action ) { QFile f( m_journalName ); diff --git a/libopie2/opiepim/backend/ocontactaccessbackend_xml.h b/libopie2/opiepim/backend/ocontactaccessbackend_xml.h index ae6ec9e..c765ff5 100644 --- a/libopie2/opiepim/backend/ocontactaccessbackend_xml.h +++ b/libopie2/opiepim/backend/ocontactaccessbackend_xml.h @@ -19,2 +19,5 @@ * $Log$ + * Revision 1.9 2002/12/08 12:48:57 eilers + * Moved journal-enum from ocontact into i the xml-backend.. + * * Revision 1.8 2002/11/14 17:04:24 eilers @@ -344,3 +347,3 @@ class OContactAccessBackend_XML : public OContactAccessBackend { //qWarning("odefaultbackend: ACTION::ADD"); - updateJournal (newcontact, OContact::ACTION_ADD); + updateJournal (newcontact, ACTION_ADD); addContact_p( newcontact ); @@ -366,3 +369,3 @@ class OContactAccessBackend_XML : public OContactAccessBackend { if (found) { - updateJournal (contact, OContact::ACTION_REPLACE); + updateJournal (contact, ACTION_REPLACE); m_contactList.remove (it); @@ -387,3 +390,3 @@ class OContactAccessBackend_XML : public OContactAccessBackend { if (found) { - updateJournal ( *it, OContact::ACTION_REMOVE); + updateJournal ( *it, ACTION_REMOVE); m_contactList.remove (it); @@ -400,2 +403,5 @@ class OContactAccessBackend_XML : public OContactAccessBackend { private: + + enum journal_action { ACTION_ADD, ACTION_REMOVE, ACTION_REPLACE }; + void addContact_p( const OContact &newcontact ){ @@ -419,3 +425,3 @@ class OContactAccessBackend_XML : public OContactAccessBackend { bool foundAction = false; - OContact::journal_action action = OContact::ACTION_ADD; + journal_action action = ACTION_ADD; int journalKey = 0; @@ -540,3 +546,3 @@ class OContactAccessBackend_XML : public OContactAccessBackend { case JOURNALACTION: - action = OContact::journal_action(it.data().toInt()); + action = journal_action(it.data().toInt()); foundAction = true; @@ -562,6 +568,6 @@ class OContactAccessBackend_XML : public OContactAccessBackend { switch ( action ) { - case OContact::ACTION_ADD: + case ACTION_ADD: addContact_p (contact); break; - case OContact::ACTION_REMOVE: + case ACTION_REMOVE: if ( !remove (contact.uid()) ) @@ -570,3 +576,3 @@ class OContactAccessBackend_XML : public OContactAccessBackend { break; - case OContact::ACTION_REPLACE: + case ACTION_REPLACE: if ( !replace ( contact ) ) @@ -597,3 +603,3 @@ class OContactAccessBackend_XML : public OContactAccessBackend { void updateJournal( const OContact& cnt, - OContact::journal_action action ) { + journal_action action ) { QFile f( m_journalName ); diff --git a/libopie2/opiepim/ocontact.h b/libopie2/opiepim/ocontact.h index 65ba43e..1fd1c75 100644 --- a/libopie2/opiepim/ocontact.h +++ b/libopie2/opiepim/ocontact.h @@ -46,4 +46,2 @@ public: - enum journal_action { ACTION_ADD, ACTION_REMOVE, ACTION_REPLACE }; - /* |