diff options
Diffstat (limited to 'kresources/newexchange/exchangeconvertercontact.cpp')
-rw-r--r-- | kresources/newexchange/exchangeconvertercontact.cpp | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/kresources/newexchange/exchangeconvertercontact.cpp b/kresources/newexchange/exchangeconvertercontact.cpp index 1e756574f..0764d3101 100644 --- a/kresources/newexchange/exchangeconvertercontact.cpp +++ b/kresources/newexchange/exchangeconvertercontact.cpp @@ -44,12 +44,12 @@ ExchangeConverterContact::ExchangeConverterContact() #define property( prop ) \ Webdavhandler::addElement( doc, props, prop ) -void ExchangeConverterContact::createRequest( QDomDocument &doc, QDomElement &props ) +void ExchangeConverterContact::createRequest( TQDomDocument &doc, TQDomElement &props ) { - QDomAttr att_c = doc.createAttribute( "xmlns:c" ); + TQDomAttr att_c = doc.createAttribute( "xmlns:c" ); att_c.setValue( "urn:schemas:contacts:" ); doc.documentElement().setAttributeNode( att_c ); - QDomAttr att_cal = doc.createAttribute( "xmlns:cal" ); + TQDomAttr att_cal = doc.createAttribute( "xmlns:cal" ); att_cal.setValue( "urn:schemas:calendar:" ); doc.documentElement().setAttributeNode( att_cal ); @@ -160,15 +160,15 @@ void ExchangeConverterContact::createRequest( QDomDocument &doc, QDomElement &pr #undef property -bool ExchangeConverterContact::extractAddress( const QDomElement &node, +bool ExchangeConverterContact::extractAddress( const TQDomElement &node, Addressee &addressee, int type, - const QString &street, const QString &pobox, const QString &location, - const QString &postalcode, const QString &state, const QString &country, - const QString &/*countycode*/ ) + const TQString &street, const TQString &pobox, const TQString &location, + const TQString &postalcode, const TQString &state, const TQString &country, + const TQString &/*countycode*/ ) { bool haveAddr = false; Address addr( type ); - QString tmpstr; + TQString tmpstr; if ( WebdavHandler::extractString( node, street, tmpstr ) ) { addr.setStreet( tmpstr ); @@ -208,9 +208,9 @@ bool ExchangeConverterContact::extractAddress( const QDomElement &node, /** For the complete list of Exchange <=> KABC field mappings see the file Person.mapping */ -bool ExchangeConverterContact::readAddressee( const QDomElement &node, Addressee &addressee ) +bool ExchangeConverterContact::readAddressee( const TQDomElement &node, Addressee &addressee ) { - QString tmpstr; + TQString tmpstr; long tmplng; // The UID is absolutely required! @@ -283,7 +283,7 @@ bool ExchangeConverterContact::readAddressee( const QDomElement &node, Addressee // General stuff: - QStringList tmplst; + TQStringList tmplst; if ( WebdavHandler::extractStringList( node, "Keywords", tmplst ) ) addressee.setCategories( tmplst ); // Exchange sentitivity values: @@ -345,7 +345,7 @@ bool ExchangeConverterContact::readAddressee( const QDomElement &node, Addressee if ( WebdavHandler::extractString( node, "spousecn", tmpstr ) ) addressee.insertCustom( "KADDRESSBOOK", "X-SpousesName", tmpstr ); - QDateTime tmpdt; + TQDateTime tmpdt; if ( WebdavHandler::extractDateTime( node, "bday", tmpdt ) ) addressee.setBirthday( tmpdt.date() ); if ( WebdavHandler::extractString( node, "weddinganniversary", tmpstr ) ) @@ -369,19 +369,19 @@ bool ExchangeConverterContact::readAddressee( const QDomElement &node, Addressee return true; } -Addressee::List ExchangeConverterContact::parseWebDAV( const QDomDocument& davdata ) +Addressee::List ExchangeConverterContact::parseWebDAV( const TQDomDocument& davdata ) { // TODO: Handle multiple addressees per reply! Addressee::List list; - QDomElement prop = davdata.documentElement().namedItem( "response" ) + TQDomElement prop = davdata.documentElement().namedItem( "response" ) .namedItem( "propstat" ).namedItem( "prop" ).toElement(); if ( prop.isNull() ) { kdDebug()<<"ExchangeConverterContact::parseWebDAV, no response->propstat->prop element!"<<endl; return list; } - QString contentclass; + TQString contentclass; bool success = WebdavHandler::extractString( prop, "contentclass", contentclass ); if ( !success ) { kdDebug()<<"ExchangeConverterContact::parseWebDAV, No contentclass entry"<<endl; @@ -414,18 +414,18 @@ kdDebug()<<"ExchangeConverterContact::parseWebDAV, No contentclass entry"<<endl; domContactProperty( name, addr.phoneNumber( type ).number() ); -QDomDocument ExchangeConverterContact::createWebDAV( Addressee addr ) +TQDomDocument ExchangeConverterContact::createWebDAV( Addressee addr ) { - QDomDocument doc; - QDomElement root = WebdavHandler::addDavElement( doc, doc, "d:propertyupdate" ); - QDomElement set = WebdavHandler::addElement( doc, root, "d:set" ); - QDomElement prop = WebdavHandler::addElement( doc, set, "d:prop" ); + TQDomDocument doc; + TQDomElement root = WebdavHandler::addDavElement( doc, doc, "d:propertyupdate" ); + TQDomElement set = WebdavHandler::addElement( doc, root, "d:set" ); + TQDomElement prop = WebdavHandler::addElement( doc, set, "d:prop" ); - QDomAttr att_c = doc.createAttribute( "xmlns:c" ); + TQDomAttr att_c = doc.createAttribute( "xmlns:c" ); att_c.setValue( "urn:schemas:contacts:" ); doc.documentElement().setAttributeNode( att_c ); - QDomAttr att_b = doc.createAttribute( "xmlns:b" ); + TQDomAttr att_b = doc.createAttribute( "xmlns:b" ); att_b.setValue( "urn:schemas-microsoft-com:datatypes" ); root.setAttributeNode( att_b ); @@ -449,8 +449,8 @@ QDomDocument ExchangeConverterContact::createWebDAV( Addressee addr ) domContactProperty( "manager", addr.custom( "KADDRESSBOOK", "X-ManagersName" ) ); domContactProperty( "secretarycn", addr.custom( "KADDRESSBOOK", "X-AssistantsName" ) ); - QStringList emails = addr.emails(); - QString prefemail = addr.preferredEmail(); + TQStringList emails = addr.emails(); + TQString prefemail = addr.preferredEmail(); if ( emails.contains( prefemail ) ) emails.remove( prefemail ); emails.prepend( prefemail ); @@ -467,27 +467,27 @@ QDomDocument ExchangeConverterContact::createWebDAV( Addressee addr ) // No value for "personalHomePage" domContactProperty( "businesshomepage", addr.url().url() ); - QString fburl = KCal::FreeBusyUrlStore::self()->readUrl( addr.preferredEmail() ); + TQString fburl = KCal::FreeBusyUrlStore::self()->readUrl( addr.preferredEmail() ); if ( !fburl.isEmpty() ) { domContactProperty( "fburl", fburl ); } /* FIXME: This doesn't work! - QStringList cats = addr.categories(); + TQStringList cats = addr.categories(); if ( cats.isEmpty() ) { - QDomElement catsnode = WebdavHandler::addElementNS( doc, prop, + TQDomElement catsnode = WebdavHandler::addElementNS( doc, prop, "urn:schemas-microsoft-com:office:office", "Keywords" ); - for ( QStringList::Iterator it = cats.begin(); it != cats.end(); ++it ) { + for ( TQStringList::Iterator it = cats.begin(); it != cats.end(); ++it ) { WebdavHandler::addElementNS( doc, catsnode, "xml:", "v", *it ); } } else { -// QDomElement catsnode = addProperty( doc, prop, +// TQDomElement catsnode = addProperty( doc, prop, // "urn:schemas-microsoft-com:office:office", "Keywords", "" ); }*/ // Exchange sentitivity values: // 0 None, 1 Personal, 2 Private, 3 Company Confidential - QString value; + TQString value; switch ( addr.secrecy().type() ) { case KABC::Secrecy::Private: value = "2"; break; case KABC::Secrecy::Confidential: value = "3"; break; @@ -574,16 +574,16 @@ QDomDocument ExchangeConverterContact::createWebDAV( Addressee addr ) // TODO: Birthday and Anniversary: // FIXME: Exchange uses the date in the form 8/13, i.e. possibly without a // year! How shall I deal with this? -/* QDate dt = addr.birthday().date(); - QString str = (dt.isValid())?(dt.toString( Qt::ISODate )):(QString::null); +/* TQDate dt = addr.birthday().date(); + TQString str = (dt.isValid())?(dt.toString( Qt::ISODate )):(TQString::null); if ( !str.isEmpty() ) { - QDomElement el = domContactProperty( "bday", str ); + TQDomElement el = domContactProperty( "bday", str ); el.setAttribute( "b:dt", "date" ); } - dt = QDate::fromString( addr.custom( "KADDRESSBOOK", "X-Anniversary" ), Qt::ISODate ); - str = (dt.isValid())?(dt.toString( Qt::ISODate )):(QString::null); + dt = TQDate::fromString( addr.custom( "KADDRESSBOOK", "X-Anniversary" ), Qt::ISODate ); + str = (dt.isValid())?(dt.toString( Qt::ISODate )):(TQString::null); if ( !str.isEmpty() ) { - QDomElement el = domContactProperty( "weddinganniversary", str ); + TQDomElement el = domContactProperty( "weddinganniversary", str ); el.setAttribute( "b:dt", "date" ); }*/ @@ -592,12 +592,12 @@ QDomDocument ExchangeConverterContact::createWebDAV( Addressee addr ) KABC::Geo geo = addr.geo(); if ( geo.isValid() ) { // TODO: Do we need to set any other attribute to make it a float? - QDomAttr att_cal = doc.createAttribute( "xmlns:cal" ); + TQDomAttr att_cal = doc.createAttribute( "xmlns:cal" ); att_cal.setValue( "urn:schemas:calendar:" ); doc.documentElement().setAttributeNode( att_cal ); - QDomElement el = domCalendarProperty( "geolatitude", QString::number( geo.latitude() ) ); + TQDomElement el = domCalendarProperty( "geolatitude", TQString::number( geo.latitude() ) ); el.setAttribute( "b:dt", "float" ); - el = domCalendarProperty( "geolongitude", QString::number( geo.longitude() ) ); + el = domCalendarProperty( "geolongitude", TQString::number( geo.longitude() ) ); el.setAttribute( "b:dt", "float" ); } */ |