diff --git a/conduits/abbrowserconduit/abbrowser-conduit.cc b/conduits/abbrowserconduit/abbrowser-conduit.cc index 4179500..f89e78f 100644 --- a/conduits/abbrowserconduit/abbrowser-conduit.cc +++ b/conduits/abbrowserconduit/abbrowser-conduit.cc @@ -65,14 +65,14 @@ unsigned long version_conduit_address = Pilot::PLUGIN_API; /* This is partly stolen from the boost libraries, partly from * "Modern C++ design" for doing compile time checks; we need -* to make sure that the enum values in KABCSync:: and in the +* to make sure that the enum values in TDEABCSync:: and in the * AbbrowserSettings class are the same so that both interpret * configuration values the same way. */ template struct EnumerationMismatch; template<> struct EnumerationMismatch{}; -#define CHECK_ENUM(a) (void)sizeof(EnumerationMismatch<((int)KABCSync::a)==((int)AbbrowserSettings::a)>) +#define CHECK_ENUM(a) (void)sizeof(EnumerationMismatch<((int)TDEABCSync::a)==((int)AbbrowserSettings::a)>) static inline void compile_time_check() { @@ -163,7 +163,7 @@ void AbbrowserConduit::_mapContactsToPilot(TQMap < recordid_t, TQString > &idCon contactIter != aBook->end(); ++contactIter) { Addressee aContact = *contactIter; - TQString recid = aContact.custom(KABCSync::appString, KABCSync::idString); + TQString recid = aContact.custom(TDEABCSync::appString, TDEABCSync::idString); if(!recid.isEmpty()) { recordid_t id = recid.toULong(); @@ -180,7 +180,7 @@ void AbbrowserConduit::_mapContactsToPilot(TQMap < recordid_t, TQString > &idCon DEBUGKPILOT << fname << ": found duplicate pilot key: [" << id << "], removing pilot id from addressee: [" << aContact.realName() << "]" << endl; - aContact.removeCustom(KABCSync::appString, KABCSync::idString); + aContact.removeCustom(TDEABCSync::appString, TDEABCSync::idString); aBook->insertAddressee(aContact); abChanged = true; } @@ -489,7 +489,7 @@ void AbbrowserConduit::showAddresses( if (debug_level >= 3) { DEBUGKPILOT << fname << "abEntry:" << endl; - KABCSync::showAddressee(pcAddr); + TDEABCSync::showAddressee(pcAddr); DEBUGKPILOT << fname << "pilotAddress:" << endl; showPilotAddress(palmAddr); DEBUGKPILOT << fname << "backupAddress:" << endl; @@ -674,7 +674,7 @@ void AbbrowserConduit::slotPCRecToPalm() abiter++; // If marked as archived, don't sync! - if (KABCSync::isArchived(ad)) + if (TDEABCSync::isArchived(ad)) { DEBUGKPILOT << fname << ": address with id " << ad.uid() << " marked archived, so don't sync." << endl; @@ -683,7 +683,7 @@ void AbbrowserConduit::slotPCRecToPalm() } - TQString recID(ad.custom(KABCSync::appString, KABCSync::idString)); + TQString recID(ad.custom(TDEABCSync::appString, TDEABCSync::idString)); bool ok; recordid_t rid = recID.toLong(&ok); if (recID.isEmpty() || !ok || !rid) @@ -946,7 +946,7 @@ bool AbbrowserConduit::syncAddressee(Addressee &pcAddr, PilotAddress*backupAddr, E/A 0 | HH -> PC E/A E/A| merge/CR */ - if (!palmAddr && KABCSync::isArchived(pcAddr) ) + if (!palmAddr && TDEABCSync::isArchived(pcAddr) ) { return true; } @@ -1081,10 +1081,10 @@ bool AbbrowserConduit::_copyToHH(Addressee &pcAddr, PilotAddress*backupAddr, { fCtrHH->updated(); } - KABCSync::copy(*paddr, pcAddr, *fAddressAppInfo, fSyncSettings); + TDEABCSync::copy(*paddr, pcAddr, *fAddressAppInfo, fSyncSettings); DEBUGKPILOT << fname << "palmAddr->id=" << paddr->id() - << ", pcAddr.ID=" << pcAddr.custom(KABCSync::appString, KABCSync::idString) << endl; + << ", pcAddr.ID=" << pcAddr.custom(TDEABCSync::appString, TDEABCSync::idString) << endl; if(_savePalmAddr(paddr, pcAddr)) { @@ -1115,10 +1115,10 @@ bool AbbrowserConduit::_copyToPC(Addressee &pcAddr, PilotAddress*backupAddr, } showPilotAddress(palmAddr); - KABCSync::copy(pcAddr, *palmAddr, *fAddressAppInfo, fSyncSettings); + TDEABCSync::copy(pcAddr, *palmAddr, *fAddressAppInfo, fSyncSettings); if (isArchived(palmAddr)) { - KABCSync::makeArchived(pcAddr); + TDEABCSync::makeArchived(pcAddr); } _savePCAddr(pcAddr, backupAddr, palmAddr); @@ -1212,10 +1212,10 @@ bool AbbrowserConduit::_savePalmAddr(PilotAddress *palmAddr, Addressee &pcAddr) } recordid_t abId = 0; - abId = pcAddr.custom(KABCSync::appString, KABCSync::idString).toUInt(); + abId = pcAddr.custom(TDEABCSync::appString, TDEABCSync::idString).toUInt(); if(abId != pilotId) { - pcAddr.insertCustom(KABCSync::appString, KABCSync::idString, TQString::number(pilotId)); + pcAddr.insertCustom(TDEABCSync::appString, TDEABCSync::idString, TQString::number(pilotId)); return true; } @@ -1229,8 +1229,8 @@ bool AbbrowserConduit::_savePCAddr(Addressee &pcAddr, PilotAddress*, { FUNCTIONSETUP; - DEBUGKPILOT<<"Before _savePCAddr, pcAddr.custom="<getField(entryAddress))) { DEBUGKPILOT << fname << ": address not equal" << endl; @@ -1443,7 +1443,7 @@ bool AbbrowserConduit::_equal(const PilotAddress *piAddress, const Addressee &ab for ( ; customIndex<4; ++customIndex,++hhField ) { - if (!_equal(KABCSync::getFieldForHHCustom(customIndex, abEntry, fSyncSettings), + if (!_equal(TDEABCSync::getFieldForHHCustom(customIndex, abEntry, fSyncSettings), piAddress->getField(hhField))) { DEBUGKPILOT << fname << ": Custom field " << customIndex @@ -1455,7 +1455,7 @@ bool AbbrowserConduit::_equal(const PilotAddress *piAddress, const Addressee &ab // if any side is marked archived, but the other is not, the two // are not equal. - if ( (flags & eqFlagsFlags) && (isArchived(piAddress) || KABCSync::isArchived(abEntry) ) ) + if ( (flags & eqFlagsFlags) && (isArchived(piAddress) || TDEABCSync::isArchived(abEntry) ) ) { DEBUGKPILOT << fname << ": archived flags don't match" << endl; return false; @@ -1552,20 +1552,20 @@ bool AbbrowserConduit::_buildResolutionTable(ResolutionTable*tab, const Addresse appendAddr(i18n("Title"), pcAddr.prefix(), entryTitle); appendAddr(i18n("Note"), pcAddr.note(), entryNote); - appendAddr(i18n("Custom 1"), KABCSync::getFieldForHHCustom(0, pcAddr, fSyncSettings), entryCustom1); - appendAddr(i18n("Custom 2"), KABCSync::getFieldForHHCustom(1, pcAddr, fSyncSettings), entryCustom2); - appendAddr(i18n("Custom 3"), KABCSync::getFieldForHHCustom(2, pcAddr, fSyncSettings), entryCustom3); - appendAddr(i18n("Custom 4"), KABCSync::getFieldForHHCustom(3, pcAddr, fSyncSettings), entryCustom4); + appendAddr(i18n("Custom 1"), TDEABCSync::getFieldForHHCustom(0, pcAddr, fSyncSettings), entryCustom1); + appendAddr(i18n("Custom 2"), TDEABCSync::getFieldForHHCustom(1, pcAddr, fSyncSettings), entryCustom2); + appendAddr(i18n("Custom 3"), TDEABCSync::getFieldForHHCustom(2, pcAddr, fSyncSettings), entryCustom3); + appendAddr(i18n("Custom 4"), TDEABCSync::getFieldForHHCustom(3, pcAddr, fSyncSettings), entryCustom4); appendPhone(i18n("Work Phone"), Work, eWork); appendPhone(i18n("Home Phone"), Home, eHome); appendPhone(i18n("Mobile Phone"), Cell, eMobile); appendGenPhone(i18n("Fax"), pcAddr.phoneNumber(faxTypeOnPC()).number(), eFax); appendPhone(i18n("Pager"), Pager, ePager); - appendGenPhone(i18n("Other"), KABCSync::getFieldForHHOtherPhone(pcAddr,fSyncSettings), eOther); + appendGenPhone(i18n("Other"), TDEABCSync::getFieldForHHOtherPhone(pcAddr,fSyncSettings), eOther); appendGenPhone(i18n("Email"), pcAddr.preferredEmail(), eEmail); - TDEABC::Address abAddress = KABCSync::getAddress(pcAddr,fSyncSettings); + TDEABC::Address abAddress = TDEABCSync::getAddress(pcAddr,fSyncSettings); appendAddr(i18n("Address"), abAddress.street(), entryAddress); appendAddr(i18n("City"), abAddress.locality(), entryCity); appendAddr(i18n("Region"), abAddress.region(), entryState); @@ -1587,7 +1587,7 @@ bool AbbrowserConduit::_buildResolutionTable(ResolutionTable*tab, const Addresse i18n("Category"), tab->fExistItems, !pcAddr.isEmpty() ? - KABCSync::bestMatchedCategoryName(pcAddr.categories(), *fAddressAppInfo, category) : + TDEABCSync::bestMatchedCategoryName(pcAddr.categories(), *fAddressAppInfo, category) : TQString(), palmAddrCategoryLabel, backupAddrCategoryLabel)); @@ -1629,7 +1629,7 @@ bool AbbrowserConduit::_applyResolutionTable(ResolutionTable*tab, Addressee &pcA #define SETFIELD(abfield, palmfield) \ SETGENFIELD(pcAddr.set##abfield(item->fResolved), palmfield) #define SETCUSTOMFIELD(abfield, palmfield) \ - SETGENFIELD(KABCSync::setFieldFromHHCustom(abfield, pcAddr, item->fResolved, fSyncSettings), palmfield) + SETGENFIELD(TDEABCSync::setFieldFromHHCustom(abfield, pcAddr, item->fResolved, fSyncSettings), palmfield) #define SETGENPHONE(abfield, palmfield) \ if (item) { \ abfield; \ @@ -1657,7 +1657,7 @@ bool AbbrowserConduit::_applyResolutionTable(ResolutionTable*tab, Addressee &pcA SETPHONEFIELD(Cell, eMobile); SETGENPHONE(setPhoneNumber(pcAddr, faxTypeOnPC(), item->fResolved), eFax); SETPHONEFIELD(Pager, ePager); - SETGENPHONE(KABCSync::setFieldFromHHOtherPhone(pcAddr, item->fResolved, fSyncSettings), eOther); + SETGENPHONE(TDEABCSync::setFieldFromHHOtherPhone(pcAddr, item->fResolved, fSyncSettings), eOther); // TODO: fix email if (item) @@ -1672,7 +1672,7 @@ bool AbbrowserConduit::_applyResolutionTable(ResolutionTable*tab, Addressee &pcA } item=tab->next(); - TDEABC::Address abAddress = KABCSync::getAddress(pcAddr, fSyncSettings); + TDEABC::Address abAddress = TDEABCSync::getAddress(pcAddr, fSyncSettings); SETADDRESSFIELD(setStreet, entryAddress); SETADDRESSFIELD(setLocality, entryCity); SETADDRESSFIELD(setRegion, entryState); @@ -1684,7 +1684,7 @@ bool AbbrowserConduit::_applyResolutionTable(ResolutionTable*tab, Addressee &pcA if (item) { palmAddr->setCategory( fAddressAppInfo->findCategory(item->fResolved) ); - KABCSync::setCategory(pcAddr, item->fResolved); + TDEABCSync::setCategory(pcAddr, item->fResolved); } @@ -1784,7 +1784,7 @@ bool AbbrowserConduit::_smartMergeAddressee(Addressee &pcAddr, switch (res) { case SyncAction::eDuplicate: // Set the Palm ID to 0 so we don't overwrite the existing record. - pcAddr.removeCustom(KABCSync::appString, KABCSync::idString); + pcAddr.removeCustom(TDEABCSync::appString, TDEABCSync::idString); result &= _copyToHH(pcAddr, 0L, 0L); { Addressee pcadr; @@ -1800,7 +1800,7 @@ bool AbbrowserConduit::_smartMergeAddressee(Addressee &pcAddr, result &= _copyToHH(pcAddr, backupAddr, pAddr); break; case SyncAction::ePreviousSyncOverrides: - KABCSync::copy(pcAddr, *backupAddr, *fAddressAppInfo, fSyncSettings); + TDEABCSync::copy(pcAddr, *backupAddr, *fAddressAppInfo, fSyncSettings); if (palmAddr && backupAddr) *palmAddr=*backupAddr; result &= _savePalmAddr(backupAddr, pcAddr); result &= _savePCAddr(pcAddr, backupAddr, backupAddr); @@ -1852,7 +1852,7 @@ Addressee AbbrowserConduit::_findMatch(const PilotAddress & pilotAddress) const for(AddressBook::Iterator iter = aBook->begin(); iter != aBook->end(); ++iter) { Addressee abEntry = *iter; - TQString recID(abEntry.custom(KABCSync::appString, KABCSync::idString)); + TQString recID(abEntry.custom(TDEABCSync::appString, TDEABCSync::idString)); bool ok; if (!recID.isEmpty() ) { diff --git a/conduits/abbrowserconduit/abbrowser-conduit.h b/conduits/abbrowserconduit/abbrowser-conduit.h index 0fdb035..652915c 100644 --- a/conduits/abbrowserconduit/abbrowser-conduit.h +++ b/conduits/abbrowserconduit/abbrowser-conduit.h @@ -196,7 +196,7 @@ private: PilotAddressInfo *fAddressAppInfo; - KABCSync::Settings fSyncSettings; + TDEABCSync::Settings fSyncSettings; int pilotindex; bool abChanged; diff --git a/conduits/abbrowserconduit/kabcRecord.cc b/conduits/abbrowserconduit/kabcRecord.cc index 0040a91..dae2539 100644 --- a/conduits/abbrowserconduit/kabcRecord.cc +++ b/conduits/abbrowserconduit/kabcRecord.cc @@ -74,7 +74,7 @@ static TDEABC::PhoneNumber::Types pilotToPhoneMap[8] = { TDEABC::PhoneNumber::Cell // eMobile } ; -TDEABC::PhoneNumber::List KABCSync::getPhoneNumbers(const PilotAddress &a) +TDEABC::PhoneNumber::List TDEABCSync::getPhoneNumbers(const PilotAddress &a) { FUNCTIONSETUP; @@ -131,7 +131,7 @@ TDEABC::PhoneNumber::List KABCSync::getPhoneNumbers(const PilotAddress &a) return list; } -void KABCSync::setPhoneNumbers(const PilotAddressInfo &info, +void TDEABCSync::setPhoneNumbers(const PilotAddressInfo &info, PilotAddress &a, const TDEABC::PhoneNumber::List &list) { @@ -222,7 +222,7 @@ void KABCSync::setPhoneNumbers(const PilotAddressInfo &info, } } -unsigned int KABCSync::bestMatchedCategory(const TQStringList &pccategories, +unsigned int TDEABCSync::bestMatchedCategory(const TQStringList &pccategories, const PilotAddressInfo &info, unsigned int hhcategory) { @@ -258,7 +258,7 @@ unsigned int KABCSync::bestMatchedCategory(const TQStringList &pccategories, return Pilot::Unfiled; } -void KABCSync::setCategory(TDEABC::Addressee & abEntry, const TQString &cat) +void TDEABCSync::setCategory(TDEABC::Addressee & abEntry, const TQString &cat) { if ( (!cat.isEmpty())) { @@ -267,10 +267,10 @@ void KABCSync::setCategory(TDEABC::Addressee & abEntry, const TQString &cat) } -TQString KABCSync::getFieldForHHCustom( +TQString TDEABCSync::getFieldForHHCustom( const unsigned int index, const TDEABC::Addressee &abEntry, - const KABCSync::Settings &settings) + const TDEABCSync::Settings &settings) { FUNCTIONSETUPL(4); @@ -318,11 +318,11 @@ TQString KABCSync::getFieldForHHCustom( return retval; } -void KABCSync::setFieldFromHHCustom( +void TDEABCSync::setFieldFromHHCustom( const unsigned int index, TDEABC::Addressee &abEntry, const TQString &value, - const KABCSync::Settings &settings) + const TDEABCSync::Settings &settings) { FUNCTIONSETUPL(4); @@ -392,7 +392,7 @@ void KABCSync::setFieldFromHHCustom( * for home or work as specified in the config dialog. If we don't have * such one, either, search for the other type. If we still have no luck, * return an address with preferred + home/work flag (from config dlg). */ -TDEABC::Address KABCSync::getAddress(const TDEABC::Addressee &abEntry, const KABCSync::Settings &s) +TDEABC::Address TDEABCSync::getAddress(const TDEABC::Addressee &abEntry, const TDEABCSync::Settings &s) { // preferhome == (AbbrowserSettings::pilotStreet==0) @@ -416,7 +416,7 @@ TDEABC::Address KABCSync::getAddress(const TDEABC::Addressee &abEntry, const KAB } -TQString KABCSync::getFieldForHHOtherPhone(const TDEABC::Addressee & abEntry, const KABCSync::Settings &s) +TQString TDEABCSync::getFieldForHHOtherPhone(const TDEABC::Addressee & abEntry, const TDEABCSync::Settings &s) { switch(s.fieldForOtherPhone()) { @@ -441,7 +441,7 @@ TQString KABCSync::getFieldForHHOtherPhone(const TDEABC::Addressee & abEntry, co } } -void KABCSync::setFieldFromHHOtherPhone(TDEABC::Addressee & abEntry, const TQString &nr, const KABCSync::Settings &s) +void TDEABCSync::setFieldFromHHOtherPhone(TDEABC::Addressee & abEntry, const TQString &nr, const TDEABCSync::Settings &s) { int phoneType = 0; switch (s.fieldForOtherPhone()) @@ -483,7 +483,7 @@ void KABCSync::setFieldFromHHOtherPhone(TDEABC::Addressee & abEntry, const TQStr abEntry.insertPhoneNumber(phone); } -void KABCSync::setAddress(PilotAddress &toPilotAddr, +void TDEABCSync::setAddress(PilotAddress &toPilotAddr, const TDEABC::Address & abAddress) { toPilotAddr.setField(entryAddress, abAddress.street()); @@ -494,25 +494,25 @@ void KABCSync::setAddress(PilotAddress &toPilotAddr, } -bool KABCSync::isArchived(const TDEABC::Addressee &addr) +bool TDEABCSync::isArchived(const TDEABC::Addressee &addr) { - return addr.custom(KABCSync::appString, KABCSync::flagString) == TQString::number(SYNCDEL); + return addr.custom(TDEABCSync::appString, TDEABCSync::flagString) == TQString::number(SYNCDEL); } -void KABCSync::makeArchived(TDEABC::Addressee &addr) +void TDEABCSync::makeArchived(TDEABC::Addressee &addr) { FUNCTIONSETUP; - addr.insertCustom(KABCSync::appString, KABCSync::flagString, TQString::number(SYNCDEL)); - addr.removeCustom(KABCSync::appString, KABCSync::idString); + addr.insertCustom(TDEABCSync::appString, TDEABCSync::flagString, TQString::number(SYNCDEL)); + addr.removeCustom(TDEABCSync::appString, TDEABCSync::idString); } -void KABCSync::copy(PilotAddress &toPilotAddr, +void TDEABCSync::copy(PilotAddress &toPilotAddr, const TDEABC::Addressee &fromAbEntry, const PilotAddressInfo &appInfo, - const KABCSync::Settings &syncSettings) + const TDEABCSync::Settings &syncSettings) { FUNCTIONSETUP; @@ -532,17 +532,17 @@ void KABCSync::copy(PilotAddress &toPilotAddr, // now in one fell swoop, set all phone numbers from the Addressee. Note, // we don't need to differentiate between Fax numbers here--all Fax numbers // (Home Fax or Work Fax or just plain old Fax) will get synced to the Pilot - KABCSync::setPhoneNumbers(appInfo,toPilotAddr,fromAbEntry.phoneNumbers()); + TDEABCSync::setPhoneNumbers(appInfo,toPilotAddr,fromAbEntry.phoneNumbers()); // Other field is an oddball and if the user has more than one field set // as "Other" then only one will be carried over. - TQString oth = KABCSync::getFieldForHHOtherPhone(fromAbEntry,syncSettings); + TQString oth = TDEABCSync::getFieldForHHOtherPhone(fromAbEntry,syncSettings); DEBUGKPILOT << fname << ": putting: ["<pack(); if (r) {