diff --git a/conduits/abbrowserconduit/abbrowser-conduit.cc b/conduits/abbrowserconduit/abbrowser-conduit.cc index b9f2bce..4179500 100644 --- a/conduits/abbrowserconduit/abbrowser-conduit.cc +++ b/conduits/abbrowserconduit/abbrowser-conduit.cc @@ -96,14 +96,14 @@ static inline void compile_time_check() inline int faxTypeOnPC() { - return KABC::PhoneNumber::Fax | + return TDEABC::PhoneNumber::Fax | ( (AbbrowserSettings::pilotFax()==0) ? - KABC::PhoneNumber::Home : - KABC::PhoneNumber::Work ); + TDEABC::PhoneNumber::Home : + TDEABC::PhoneNumber::Work ); } -using namespace KABC; +using namespace TDEABC; /********************************************************************* C O N S T R U C T O R @@ -1408,7 +1408,7 @@ bool AbbrowserConduit::_equal(const PilotAddress *piAddress, const Addressee &ab if (flags & eqFlagsAdress) { - KABC::Address address = KABCSync::getAddress(abEntry,fSyncSettings); + TDEABC::Address address = KABCSync::getAddress(abEntry,fSyncSettings); if(!_equal(address.street(), piAddress->getField(entryAddress))) { DEBUGKPILOT << fname << ": address not equal" << endl; @@ -1565,7 +1565,7 @@ bool AbbrowserConduit::_buildResolutionTable(ResolutionTable*tab, const Addresse appendGenPhone(i18n("Other"), KABCSync::getFieldForHHOtherPhone(pcAddr,fSyncSettings), eOther); appendGenPhone(i18n("Email"), pcAddr.preferredEmail(), eEmail); - KABC::Address abAddress = KABCSync::getAddress(pcAddr,fSyncSettings); + TDEABC::Address abAddress = KABCSync::getAddress(pcAddr,fSyncSettings); appendAddr(i18n("Address"), abAddress.street(), entryAddress); appendAddr(i18n("City"), abAddress.locality(), entryCity); appendAddr(i18n("Region"), abAddress.region(), entryState); @@ -1672,7 +1672,7 @@ bool AbbrowserConduit::_applyResolutionTable(ResolutionTable*tab, Addressee &pcA } item=tab->next(); - KABC::Address abAddress = KABCSync::getAddress(pcAddr, fSyncSettings); + TDEABC::Address abAddress = KABCSync::getAddress(pcAddr, fSyncSettings); SETADDRESSFIELD(setStreet, entryAddress); SETADDRESSFIELD(setLocality, entryCity); SETADDRESSFIELD(setRegion, entryState); diff --git a/conduits/abbrowserconduit/abbrowser-conduit.h b/conduits/abbrowserconduit/abbrowser-conduit.h index 61db74b..0fdb035 100644 --- a/conduits/abbrowserconduit/abbrowser-conduit.h +++ b/conduits/abbrowserconduit/abbrowser-conduit.h @@ -39,7 +39,7 @@ class ResolutionTable; -namespace KABC +namespace TDEABC { class Addressee; class Address; @@ -47,7 +47,7 @@ class PhoneNumber; class Ticket; } -using namespace KABC; +using namespace TDEABC; typedef TQValueList RecordIDList; @@ -215,7 +215,7 @@ private: /** if we add a resource from the addressbook, track it to remove it * later... */ - KABC::Resource *fBookResource; + TDEABC::Resource *fBookResource; } ; diff --git a/conduits/abbrowserconduit/kabcRecord.cc b/conduits/abbrowserconduit/kabcRecord.cc index 210ad9d..0040a91 100644 --- a/conduits/abbrowserconduit/kabcRecord.cc +++ b/conduits/abbrowserconduit/kabcRecord.cc @@ -45,9 +45,9 @@ * types. Email addresses are NOT included in this map, and are handled * separately (not in PhoneNumber at all). The Pilot has 8 different kinds * of phone numbers (which may be *labeled* however you like). These - * need to be mapped to the things that KABC::PhoneNumber handles. + * need to be mapped to the things that TDEABC::PhoneNumber handles. * - * From KABC::PhoneNumber + * From TDEABC::PhoneNumber * enum Types { Home = 1, Work = 2, Msg = 4, Pref = 8, Voice = 16, Fax = 32, * Cell = 64, Video = 128, Bbs = 256, Modem = 512, Car = 1024, * Isdn = 2048, Pcs = 4096, Pager = 8192 }; @@ -60,25 +60,25 @@ * }; * * This array must have as many elements as PilotAddress::PhoneType - * and its elements must be KABC::PhoneNumber::Types. + * and its elements must be TDEABC::PhoneNumber::Types. */ -static KABC::PhoneNumber::Types pilotToPhoneMap[8] = { - KABC::PhoneNumber::Work, // eWork - KABC::PhoneNumber::Home, // eHome, - KABC::PhoneNumber::Fax, // eFax, - (KABC::PhoneNumber::Types)0, // eOther -> wasn't mapped properly, - (KABC::PhoneNumber::Types)0, // eEmail -> shouldn't occur, - KABC::PhoneNumber::Home, // eMain - KABC::PhoneNumber::Pager, // ePager, - KABC::PhoneNumber::Cell // eMobile +static TDEABC::PhoneNumber::Types pilotToPhoneMap[8] = { + TDEABC::PhoneNumber::Work, // eWork + TDEABC::PhoneNumber::Home, // eHome, + TDEABC::PhoneNumber::Fax, // eFax, + (TDEABC::PhoneNumber::Types)0, // eOther -> wasn't mapped properly, + (TDEABC::PhoneNumber::Types)0, // eEmail -> shouldn't occur, + TDEABC::PhoneNumber::Home, // eMain + TDEABC::PhoneNumber::Pager, // ePager, + TDEABC::PhoneNumber::Cell // eMobile } ; -KABC::PhoneNumber::List KABCSync::getPhoneNumbers(const PilotAddress &a) +TDEABC::PhoneNumber::List KABCSync::getPhoneNumbers(const PilotAddress &a) { FUNCTIONSETUP; - KABC::PhoneNumber::List list; + TDEABC::PhoneNumber::List list; TQString test; PhoneSlot shownPhone = a.getShownPhone(); @@ -110,11 +110,11 @@ KABC::PhoneNumber::List KABCSync::getPhoneNumbers(const PilotAddress &a) // if this is the preferred phone number, set it as such if (shownPhone == i) { - phoneType |= KABC::PhoneNumber::Pref; + phoneType |= TDEABC::PhoneNumber::Pref; DEBUGKPILOT << fname << ": found preferred pilot index: [" << i << "], text: [" << test << "]" << endl; } - KABC::PhoneNumber ph(test, phoneType); + TDEABC::PhoneNumber ph(test, phoneType); list.append(ph); } else @@ -133,7 +133,7 @@ KABC::PhoneNumber::List KABCSync::getPhoneNumbers(const PilotAddress &a) void KABCSync::setPhoneNumbers(const PilotAddressInfo &info, PilotAddress &a, - const KABC::PhoneNumber::List &list) + const TDEABC::PhoneNumber::List &list) { FUNCTIONSETUP; TQString test; @@ -151,10 +151,10 @@ void KABCSync::setPhoneNumbers(const PilotAddressInfo &info, // now iterate through the list and for each PhoneNumber in the list, // iterate through our phone types using our map and set the first one // we find as the type of address for the Pilot - for(KABC::PhoneNumber::List::ConstIterator listIter = list.begin(); + for(TDEABC::PhoneNumber::List::ConstIterator listIter = list.begin(); listIter != list.end(); ++listIter) { - KABC::PhoneNumber phone = *listIter; + TDEABC::PhoneNumber phone = *listIter; PilotAddressInfo::EPhoneType phoneType = PilotAddressInfo::eHome; @@ -179,7 +179,7 @@ void KABCSync::setPhoneNumbers(const PilotAddressInfo &info, a.setPhoneField(phoneType, phone.number(), PilotAddress::NoFlags); // if this is the preferred phone number, then set it as such - if (fieldSlot.isValid() && (phone.type() & KABC::PhoneNumber::Pref)) + if (fieldSlot.isValid() && (phone.type() & TDEABC::PhoneNumber::Pref)) { DEBUGKPILOT << fname << ": found preferred PhoneNumber. " << "setting showPhone to index: [" @@ -258,7 +258,7 @@ unsigned int KABCSync::bestMatchedCategory(const TQStringList &pccategories, return Pilot::Unfiled; } -void KABCSync::setCategory(KABC::Addressee & abEntry, const TQString &cat) +void KABCSync::setCategory(TDEABC::Addressee & abEntry, const TQString &cat) { if ( (!cat.isEmpty())) { @@ -269,7 +269,7 @@ void KABCSync::setCategory(KABC::Addressee & abEntry, const TQString &cat) TQString KABCSync::getFieldForHHCustom( const unsigned int index, - const KABC::Addressee &abEntry, + const TDEABC::Addressee &abEntry, const KABCSync::Settings &settings) { FUNCTIONSETUPL(4); @@ -320,7 +320,7 @@ TQString KABCSync::getFieldForHHCustom( void KABCSync::setFieldFromHHCustom( const unsigned int index, - KABC::Addressee &abEntry, + TDEABC::Addressee &abEntry, const TQString &value, const KABCSync::Settings &settings) { @@ -392,31 +392,31 @@ 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). */ -KABC::Address KABCSync::getAddress(const KABC::Addressee &abEntry, const KABCSync::Settings &s) +TDEABC::Address KABCSync::getAddress(const TDEABC::Addressee &abEntry, const KABCSync::Settings &s) { // preferhome == (AbbrowserSettings::pilotStreet==0) // Check for preferred address first - KABC::Address ad(abEntry.address(KABC::Address::Pref)); + TDEABC::Address ad(abEntry.address(TDEABC::Address::Pref)); if (!ad.isEmpty()) return ad; // Look for home or work, whichever is preferred - int type = s.preferHome() ? KABC::Address::Home : KABC::Address::Work; + int type = s.preferHome() ? TDEABC::Address::Home : TDEABC::Address::Work; ad=abEntry.address(type); if (!ad.isEmpty()) return ad; // Switch preference if still none found - type = !s.preferHome() ? KABC::Address::Home : KABC::Address::Work; + type = !s.preferHome() ? TDEABC::Address::Home : TDEABC::Address::Work; ad=abEntry.address(type); if (!ad.isEmpty()) return ad; // Last-ditch attempt; see if there is a preferred home or work address - type = s.preferHome() ? KABC::Address::Home : KABC::Address::Work; - return abEntry.address(type | KABC::Address::Pref); + type = s.preferHome() ? TDEABC::Address::Home : TDEABC::Address::Work; + return abEntry.address(type | TDEABC::Address::Pref); } -TQString KABCSync::getFieldForHHOtherPhone(const KABC::Addressee & abEntry, const KABCSync::Settings &s) +TQString KABCSync::getFieldForHHOtherPhone(const TDEABC::Addressee & abEntry, const KABCSync::Settings &s) { switch(s.fieldForOtherPhone()) { @@ -425,23 +425,23 @@ TQString KABCSync::getFieldForHHOtherPhone(const KABC::Addressee & abEntry, cons case eAssistant: return abEntry.custom(CSL1("KADDRESSBOOK"), CSL1("AssistantsName")); case eBusinessFax: - return abEntry.phoneNumber(KABC::PhoneNumber::Fax | KABC::PhoneNumber::Work).number(); + return abEntry.phoneNumber(TDEABC::PhoneNumber::Fax | TDEABC::PhoneNumber::Work).number(); case eCarPhone: - return abEntry.phoneNumber(KABC::PhoneNumber::Car).number(); + return abEntry.phoneNumber(TDEABC::PhoneNumber::Car).number(); case eEmail2: return abEntry.emails().first(); case eHomeFax: - return abEntry.phoneNumber(KABC::PhoneNumber::Fax | KABC::PhoneNumber::Home).number(); + return abEntry.phoneNumber(TDEABC::PhoneNumber::Fax | TDEABC::PhoneNumber::Home).number(); case eTelex: - return abEntry.phoneNumber(KABC::PhoneNumber::Bbs).number(); + return abEntry.phoneNumber(TDEABC::PhoneNumber::Bbs).number(); case eTTYTTDPhone: - return abEntry.phoneNumber(KABC::PhoneNumber::Pcs).number(); + return abEntry.phoneNumber(TDEABC::PhoneNumber::Pcs).number(); default: return TQString(); } } -void KABCSync::setFieldFromHHOtherPhone(KABC::Addressee & abEntry, const TQString &nr, const KABCSync::Settings &s) +void KABCSync::setFieldFromHHOtherPhone(TDEABC::Addressee & abEntry, const TQString &nr, const KABCSync::Settings &s) { int phoneType = 0; switch (s.fieldForOtherPhone()) @@ -459,32 +459,32 @@ void KABCSync::setFieldFromHHOtherPhone(KABC::Addressee & abEntry, const TQStrin phoneType = 0; break; case eBusinessFax: - phoneType = KABC::PhoneNumber::Fax | KABC::PhoneNumber::Work; + phoneType = TDEABC::PhoneNumber::Fax | TDEABC::PhoneNumber::Work; break; case eHomeFax: - phoneType = KABC::PhoneNumber::Fax | KABC::PhoneNumber::Home; + phoneType = TDEABC::PhoneNumber::Fax | TDEABC::PhoneNumber::Home; break; case eCarPhone: - phoneType = KABC::PhoneNumber::Car; + phoneType = TDEABC::PhoneNumber::Car; break; case eTelex: - phoneType = KABC::PhoneNumber::Bbs; + phoneType = TDEABC::PhoneNumber::Bbs; break; case eTTYTTDPhone: - phoneType = KABC::PhoneNumber::Pcs; + phoneType = TDEABC::PhoneNumber::Pcs; break; default: WARNINGKPILOT << "Unknown phone mapping " << s.fieldForOtherPhone() << endl; phoneType = 0; } - KABC::PhoneNumber phone = abEntry.phoneNumber(phoneType); + TDEABC::PhoneNumber phone = abEntry.phoneNumber(phoneType); phone.setNumber(nr); phone.setType(phoneType); // Double-check in case there was no phonenumber of given type abEntry.insertPhoneNumber(phone); } void KABCSync::setAddress(PilotAddress &toPilotAddr, - const KABC::Address & abAddress) + const TDEABC::Address & abAddress) { toPilotAddr.setField(entryAddress, abAddress.street()); toPilotAddr.setField(entryCity, abAddress.locality()); @@ -494,12 +494,12 @@ void KABCSync::setAddress(PilotAddress &toPilotAddr, } -bool KABCSync::isArchived(const KABC::Addressee &addr) +bool KABCSync::isArchived(const TDEABC::Addressee &addr) { return addr.custom(KABCSync::appString, KABCSync::flagString) == TQString::number(SYNCDEL); } -void KABCSync::makeArchived(KABC::Addressee &addr) +void KABCSync::makeArchived(TDEABC::Addressee &addr) { FUNCTIONSETUP; addr.insertCustom(KABCSync::appString, KABCSync::flagString, TQString::number(SYNCDEL)); @@ -510,7 +510,7 @@ void KABCSync::makeArchived(KABC::Addressee &addr) void KABCSync::copy(PilotAddress &toPilotAddr, - const KABC::Addressee &fromAbEntry, + const TDEABC::Addressee &fromAbEntry, const PilotAddressInfo &appInfo, const KABCSync::Settings &syncSettings) { @@ -541,7 +541,7 @@ void KABCSync::copy(PilotAddress &toPilotAddr, toPilotAddr.setPhoneField(PilotAddressInfo::eOther, oth, PilotAddress::Replace); - KABC::Address homeAddress = KABCSync::getAddress(fromAbEntry, syncSettings); + TDEABC::Address homeAddress = KABCSync::getAddress(fromAbEntry, syncSettings); KABCSync::setAddress(toPilotAddr, homeAddress); // Process the additional entries from the Palm(the palm database app block tells us the name of the fields) @@ -567,7 +567,7 @@ void KABCSync::copy(PilotAddress &toPilotAddr, } } -void KABCSync::copy(KABC::Addressee &toAbEntry, +void KABCSync::copy(TDEABC::Addressee &toAbEntry, const PilotAddress &fromPiAddr, const PilotAddressInfo &appInfo, const KABCSync::Settings &syncSettings) @@ -594,18 +594,18 @@ void KABCSync::copy(KABC::Addressee &toAbEntry, // so that they can be set from the Pilot. If we do not do this, then records // will be left in kabc when they are removed from the Pilot and we'll look // broken. - KABC::PhoneNumber::List old = toAbEntry.phoneNumbers(); - for (KABC::PhoneNumber::List::Iterator it = old.begin(); it != old.end(); ++it) { - KABC::PhoneNumber phone = *it; + TDEABC::PhoneNumber::List old = toAbEntry.phoneNumbers(); + for (TDEABC::PhoneNumber::List::Iterator it = old.begin(); it != old.end(); ++it) { + TDEABC::PhoneNumber phone = *it; toAbEntry.removePhoneNumber(phone); } // now, get the phone numbers from the Pilot and set them one at a time in kabc - KABC::PhoneNumber::List phones = KABCSync::getPhoneNumbers(fromPiAddr); - for (KABC::PhoneNumber::List::Iterator it = phones.begin(); it != phones.end(); ++it) { - KABC::PhoneNumber phone = *it; + TDEABC::PhoneNumber::List phones = KABCSync::getPhoneNumbers(fromPiAddr); + for (TDEABC::PhoneNumber::List::Iterator it = phones.begin(); it != phones.end(); ++it) { + TDEABC::PhoneNumber phone = *it; // check for fax number if it is one, set the type per the user's direction - if (phone.type() & KABC::PhoneNumber::Fax) + if (phone.type() & TDEABC::PhoneNumber::Fax) { phone.setType(syncSettings.faxTypeOnPC()); } @@ -622,12 +622,12 @@ void KABCSync::copy(KABC::Addressee &toAbEntry, // so that they can be set from the Pilot. If we do not do this, then records // will be left in kabc when they are removed from the Pilot and we'll look // broken. - KABC::Address::List oAddr = toAbEntry.addresses(); - for (KABC::Address::List::Iterator it = oAddr.begin(); it != oAddr.end(); ++it) { - const KABC::Address addr = *it; + TDEABC::Address::List oAddr = toAbEntry.addresses(); + for (TDEABC::Address::List::Iterator it = oAddr.begin(); it != oAddr.end(); ++it) { + const TDEABC::Address addr = *it; toAbEntry.removeAddress(addr); } - KABC::Address homeAddress = KABCSync::getAddress(toAbEntry,syncSettings); + TDEABC::Address homeAddress = KABCSync::getAddress(toAbEntry,syncSettings); homeAddress.setStreet(fromPiAddr.getField(entryAddress)); homeAddress.setLocality(fromPiAddr.getField(entryCity)); homeAddress.setRegion(fromPiAddr.getField(entryState)); @@ -657,7 +657,7 @@ void KABCSync::copy(KABC::Addressee &toAbEntry, showAddressee(toAbEntry); } -void KABCSync::showAddressee(const KABC::Addressee & abAddress) +void KABCSync::showAddressee(const TDEABC::Addressee & abAddress) { FUNCTIONSETUP; #ifdef DEBUG @@ -675,16 +675,16 @@ void KABCSync::showAddressee(const KABC::Addressee & abAddress) DEBUGKPILOT << "\t\tCategory = " << abAddress.categories().first() << endl; DEBUGKPILOT << "\t\tEmail = " << abAddress.emails().join(",") << endl; - KABC::PhoneNumber::List phs = abAddress.phoneNumbers(); - for (KABC::PhoneNumber::List::Iterator it = phs.begin(); it != phs.end(); ++it) { - KABC::PhoneNumber phone = *it; + TDEABC::PhoneNumber::List phs = abAddress.phoneNumbers(); + for (TDEABC::PhoneNumber::List::Iterator it = phs.begin(); it != phs.end(); ++it) { + TDEABC::PhoneNumber phone = *it; DEBUGKPILOT << "\t\t" << phone.label() << "= " << phone.number() << endl; } - KABC::Address::List ads = abAddress.addresses(); - for (KABC::Address::List::Iterator it = ads.begin(); it != ads.end(); ++it) { - const KABC::Address addr = *it; + TDEABC::Address::List ads = abAddress.addresses(); + for (TDEABC::Address::List::Iterator it = ads.begin(); it != ads.end(); ++it) { + const TDEABC::Address addr = *it; DEBUGKPILOT << "\t\tAddress = " << addr.street() <