diff options
Diffstat (limited to 'tderesources/groupwise/soap')
-rw-r--r-- | tderesources/groupwise/soap/contactconverter.cpp | 78 | ||||
-rw-r--r-- | tderesources/groupwise/soap/contactconverter.h | 20 | ||||
-rw-r--r-- | tderesources/groupwise/soap/groupwiseserver.cpp | 8 | ||||
-rw-r--r-- | tderesources/groupwise/soap/groupwiseserver.h | 12 | ||||
-rw-r--r-- | tderesources/groupwise/soap/gwjobs.cpp | 12 | ||||
-rw-r--r-- | tderesources/groupwise/soap/gwjobs.h | 6 | ||||
-rw-r--r-- | tderesources/groupwise/soap/incidenceconverter.cpp | 2 | ||||
-rw-r--r-- | tderesources/groupwise/soap/soapdebug.cpp | 8 |
8 files changed, 73 insertions, 73 deletions
diff --git a/tderesources/groupwise/soap/contactconverter.cpp b/tderesources/groupwise/soap/contactconverter.cpp index 1ce391381..2076ccb6f 100644 --- a/tderesources/groupwise/soap/contactconverter.cpp +++ b/tderesources/groupwise/soap/contactconverter.cpp @@ -28,7 +28,7 @@ ContactConverter::ContactConverter( struct soap* soap ) { } -ngwt__Contact* ContactConverter::convertToContact( const KABC::Addressee &addr ) +ngwt__Contact* ContactConverter::convertToContact( const TDEABC::Addressee &addr ) { if ( addr.isEmpty() ) return 0; @@ -128,15 +128,15 @@ ngwt__Contact* ContactConverter::convertToContact( const KABC::Addressee &addr ) phoneList->default_ = 0; std::vector<class ngwt__PhoneNumber*> *list = soap_new_std__vectorTemplateOfPointerTongwt__PhoneNumber( soap(), -1 ); - KABC::PhoneNumber::List phones = addr.phoneNumbers(); - KABC::PhoneNumber::List::Iterator it; + TDEABC::PhoneNumber::List phones = addr.phoneNumbers(); + TDEABC::PhoneNumber::List::Iterator it; for ( it = phones.begin(); it != phones.end(); ++it ) { ngwt__PhoneNumber* number = convertPhoneNumber( *it ); if ( number ) { list->push_back( number ); // if preferred number assign it - if ( (*it).type() & KABC::PhoneNumber::Pref ) + if ( (*it).type() & TDEABC::PhoneNumber::Pref ) phoneList->default_ = qStringToString( (*it).number() ); } } @@ -151,8 +151,8 @@ ngwt__Contact* ContactConverter::convertToContact( const KABC::Addressee &addr ) ngwt__PostalAddressList* addressList = soap_new_ngwt__PostalAddressList( soap(), -1 ); std::vector<class ngwt__PostalAddress*> *list = soap_new_std__vectorTemplateOfPointerTongwt__PostalAddress( soap(), -1 ); - KABC::Address::List addresses = addr.addresses(); - KABC::Address::List::Iterator it; + TDEABC::Address::List addresses = addr.addresses(); + TDEABC::Address::List::Iterator it; for ( it = addresses.begin(); it != addresses.end(); ++it ) { ngwt__PostalAddress* address = convertPostalAddress( *it ); if ( address ) @@ -213,10 +213,10 @@ ngwt__Contact* ContactConverter::convertToContact( const KABC::Addressee &addr ) return contact; } -KABC::Addressee ContactConverter::convertFromAddressBookItem( ngwt__AddressBookItem * addrBkItem ) +TDEABC::Addressee ContactConverter::convertFromAddressBookItem( ngwt__AddressBookItem * addrBkItem ) { //kdDebug() << "ContactConverter::convertFromAddressBookItem()" << endl; - KABC::Addressee addr; + TDEABC::Addressee addr; if ( !addrBkItem ) { kdDebug() << "Null AddressBookItem, bailing out!" << endl; @@ -232,17 +232,17 @@ KABC::Addressee ContactConverter::convertFromAddressBookItem( ngwt__AddressBookI return addr; } -KABC::Addressee ContactConverter::convertFromResource( ngwt__Resource* resource ) +TDEABC::Addressee ContactConverter::convertFromResource( ngwt__Resource* resource ) { //kdDebug() << "ContactConverter::convertFromResource()" << endl; - KABC::Addressee addr = convertFromAddressBookItem( resource ); + TDEABC::Addressee addr = convertFromAddressBookItem( resource ); if ( !resource ) { kdDebug() << "Null Resource, bailing out!" << endl; return addr; } if ( resource->phone ) - addr.insertPhoneNumber( KABC::PhoneNumber( stringToTQString( resource->phone ), KABC::PhoneNumber::Work ) ); + addr.insertPhoneNumber( TDEABC::PhoneNumber( stringToTQString( resource->phone ), TDEABC::PhoneNumber::Work ) ); if ( resource->email ) addr.insertEmail( stringToTQString( resource->email ), true ); if ( resource->owner ) @@ -252,10 +252,10 @@ KABC::Addressee ContactConverter::convertFromResource( ngwt__Resource* resource return addr; } -KABC::Addressee ContactConverter::convertFromGroup( ngwt__Group* group) +TDEABC::Addressee ContactConverter::convertFromGroup( ngwt__Group* group) { // kdDebug() << "ContactConverter::convertFromGroup()" << endl; - KABC::Addressee addr = convertFromAddressBookItem( group ); + TDEABC::Addressee addr = convertFromAddressBookItem( group ); if ( !group ) { kdDebug() << "Null Resource, bailing out!" << endl; @@ -265,11 +265,11 @@ KABC::Addressee ContactConverter::convertFromGroup( ngwt__Group* group) return addr; } -KABC::Addressee ContactConverter::convertFromContact( ngwt__Contact* contact ) +TDEABC::Addressee ContactConverter::convertFromContact( ngwt__Contact* contact ) { // kdDebug() << "ContactConverter::convertFromContact()" << endl; - KABC::Addressee addr = convertFromAddressBookItem( contact ); + TDEABC::Addressee addr = convertFromAddressBookItem( contact ); if ( !contact ) { @@ -329,10 +329,10 @@ KABC::Addressee ContactConverter::convertFromContact( ngwt__Contact* contact ) std::vector<class ngwt__PhoneNumber*> list = contact->phoneList->phone; std::vector<class ngwt__PhoneNumber*>::const_iterator it; for ( it = list.begin(); it != list.end(); ++it ) { - KABC::PhoneNumber phone = convertPhoneNumber( *it ); + TDEABC::PhoneNumber phone = convertPhoneNumber( *it ); if ( !phone.number().isEmpty() ) { if ( phone.number() == defaultNumber ) - phone.setType( phone.type() | KABC::PhoneNumber::Pref ); + phone.setType( phone.type() | TDEABC::PhoneNumber::Pref ); addr.insertPhoneNumber( phone ); } } @@ -343,7 +343,7 @@ KABC::Addressee ContactConverter::convertFromContact( ngwt__Contact* contact ) std::vector<class ngwt__PostalAddress*> list = contact->addressList->address; std::vector<class ngwt__PostalAddress*>::const_iterator it; for ( it = list.begin(); it != list.end(); ++it ) { - KABC::Address address = convertPostalAddress( *it ); + TDEABC::Address address = convertPostalAddress( *it ); if ( !address.isEmpty() ) addr.insertAddress( address ); } @@ -425,24 +425,24 @@ KABC::Addressee ContactConverter::convertFromContact( ngwt__Contact* contact ) return addr; } -KABC::PhoneNumber ContactConverter::convertPhoneNumber( ngwt__PhoneNumber *phone ) const +TDEABC::PhoneNumber ContactConverter::convertPhoneNumber( ngwt__PhoneNumber *phone ) const { - KABC::PhoneNumber phoneNumber; + TDEABC::PhoneNumber phoneNumber; if ( !phone ) return phoneNumber; phoneNumber.setNumber( stringToTQString( phone->__item ) ); if ( phone->type == Fax ) { - phoneNumber.setType( KABC::PhoneNumber::Fax ); + phoneNumber.setType( TDEABC::PhoneNumber::Fax ); } else if ( phone->type == Home ) { - phoneNumber.setType( KABC::PhoneNumber::Home ); + phoneNumber.setType( TDEABC::PhoneNumber::Home ); } else if ( phone->type == Mobile ) { - phoneNumber.setType( KABC::PhoneNumber::Cell ); + phoneNumber.setType( TDEABC::PhoneNumber::Cell ); } else if ( phone->type == Office ) { - phoneNumber.setType( KABC::PhoneNumber::Work ); + phoneNumber.setType( TDEABC::PhoneNumber::Work ); } else if ( phone->type == Pager ) { - phoneNumber.setType( KABC::PhoneNumber::Pager ); + phoneNumber.setType( TDEABC::PhoneNumber::Pager ); } else { // should never been reached, phone numbers have always a type set... } @@ -450,7 +450,7 @@ KABC::PhoneNumber ContactConverter::convertPhoneNumber( ngwt__PhoneNumber *phone return phoneNumber; } -ngwt__PhoneNumber* ContactConverter::convertPhoneNumber( const KABC::PhoneNumber &number ) const +ngwt__PhoneNumber* ContactConverter::convertPhoneNumber( const TDEABC::PhoneNumber &number ) const { if ( number.number().isEmpty() ) return 0; @@ -458,15 +458,15 @@ ngwt__PhoneNumber* ContactConverter::convertPhoneNumber( const KABC::PhoneNumber ngwt__PhoneNumber* phoneNumber = soap_new_ngwt__PhoneNumber( soap(), -1 ); phoneNumber->__item = number.number().utf8().data(); - if ( number.type() & KABC::PhoneNumber::Fax ) { + if ( number.type() & TDEABC::PhoneNumber::Fax ) { phoneNumber->type = Fax; - } else if ( number.type() == KABC::PhoneNumber::Home ) { + } else if ( number.type() == TDEABC::PhoneNumber::Home ) { phoneNumber->type = Home; - } else if ( number.type() & KABC::PhoneNumber::Cell ) { + } else if ( number.type() & TDEABC::PhoneNumber::Cell ) { phoneNumber->type = Mobile; - } else if ( number.type() == KABC::PhoneNumber::Work ) { + } else if ( number.type() == TDEABC::PhoneNumber::Work ) { phoneNumber->type = Office; - } else if ( number.type() & KABC::PhoneNumber::Pager ) { + } else if ( number.type() & TDEABC::PhoneNumber::Pager ) { phoneNumber->type = Pager; } else { // TODO: cache unsupported types @@ -475,9 +475,9 @@ ngwt__PhoneNumber* ContactConverter::convertPhoneNumber( const KABC::PhoneNumber return phoneNumber; } -KABC::Address ContactConverter::convertPostalAddress( ngwt__PostalAddress *addr ) const +TDEABC::Address ContactConverter::convertPostalAddress( ngwt__PostalAddress *addr ) const { - KABC::Address address; + TDEABC::Address address; if ( !addr ) return address; @@ -501,9 +501,9 @@ KABC::Address ContactConverter::convertPostalAddress( ngwt__PostalAddress *addr address.setCountry( stringToTQString( addr->country ) ); if ( addr->type == Home_ ) { - address.setType( KABC::Address::Home ); + address.setType( TDEABC::Address::Home ); } else if ( addr->type == Office_ ) { - address.setType( KABC::Address::Work ); + address.setType( TDEABC::Address::Work ); } else { // should never been reached, addresses have always a type set... } @@ -511,7 +511,7 @@ KABC::Address ContactConverter::convertPostalAddress( ngwt__PostalAddress *addr return address; } -ngwt__PostalAddress* ContactConverter::convertPostalAddress( const KABC::Address &address ) +ngwt__PostalAddress* ContactConverter::convertPostalAddress( const TDEABC::Address &address ) { if ( address.isEmpty() ) return 0; @@ -550,9 +550,9 @@ ngwt__PostalAddress* ContactConverter::convertPostalAddress( const KABC::Address else postalAddress->country = 0; - if ( address.type() & KABC::Address::Home ) { + if ( address.type() & TDEABC::Address::Home ) { postalAddress->type = Home_; - } else if ( address.type() & KABC::Address::Work ) { + } else if ( address.type() & TDEABC::Address::Work ) { postalAddress->type = Office_; } else { // TODO: cache unsupported types @@ -561,7 +561,7 @@ ngwt__PostalAddress* ContactConverter::convertPostalAddress( const KABC::Address return postalAddress; } -ngwt__ImAddressList* ContactConverter::convertImAddresses( const KABC::Addressee& addr ) +ngwt__ImAddressList* ContactConverter::convertImAddresses( const TDEABC::Addressee& addr ) { //return 0; /* TODO: use IM address dedicated functions in KDE 4.0. diff --git a/tderesources/groupwise/soap/contactconverter.h b/tderesources/groupwise/soap/contactconverter.h index 2f98a328c..ffb12e0d3 100644 --- a/tderesources/groupwise/soap/contactconverter.h +++ b/tderesources/groupwise/soap/contactconverter.h @@ -30,22 +30,22 @@ class ContactConverter : public GWConverter public: ContactConverter( struct soap* ); - KABC::Addressee convertFromContact( ngwt__Contact* ); - ngwt__Contact* convertToContact( const KABC::Addressee& ); - KABC::Addressee convertFromResource( ngwt__Resource* ); - KABC::Addressee convertFromGroup( ngwt__Group* ); + TDEABC::Addressee convertFromContact( ngwt__Contact* ); + ngwt__Contact* convertToContact( const TDEABC::Addressee& ); + TDEABC::Addressee convertFromResource( ngwt__Resource* ); + TDEABC::Addressee convertFromGroup( ngwt__Group* ); private: - KABC::Addressee convertFromAddressBookItem( ngwt__AddressBookItem * ); - KABC::PhoneNumber convertPhoneNumber( ngwt__PhoneNumber* ) const; - ngwt__PhoneNumber* convertPhoneNumber( const KABC::PhoneNumber& ) const; + TDEABC::Addressee convertFromAddressBookItem( ngwt__AddressBookItem * ); + TDEABC::PhoneNumber convertPhoneNumber( ngwt__PhoneNumber* ) const; + ngwt__PhoneNumber* convertPhoneNumber( const TDEABC::PhoneNumber& ) const; - KABC::Address convertPostalAddress( ngwt__PostalAddress* ) const; - ngwt__PostalAddress* convertPostalAddress( const KABC::Address& ); + TDEABC::Address convertPostalAddress( ngwt__PostalAddress* ) const; + ngwt__PostalAddress* convertPostalAddress( const TDEABC::Address& ); /* we convert all IM addresses in the addressee at once, because multiple values per IM system are stored in a custom field each which is a different structure to that used for phone numbers, email addresses etc */ - ngwt__ImAddressList* convertImAddresses( const KABC::Addressee& ); + ngwt__ImAddressList* convertImAddresses( const TDEABC::Addressee& ); // splits up an arbitrary custom field void splitField( const TQString &str, TQString &app, TQString &name, TQString &value ); static TQMap<TQString, TQString > mIMProtocolMap; diff --git a/tderesources/groupwise/soap/groupwiseserver.cpp b/tderesources/groupwise/soap/groupwiseserver.cpp index d3e98f08f..07342ec4f 100644 --- a/tderesources/groupwise/soap/groupwiseserver.cpp +++ b/tderesources/groupwise/soap/groupwiseserver.cpp @@ -1219,7 +1219,7 @@ bool GroupwiseServer::retractRequest( KCal::Incidence *incidence, RetractCause c return checkResponse( result, response.status ); } -bool GroupwiseServer::insertAddressee( const TQString &addrBookId, KABC::Addressee &addr ) +bool GroupwiseServer::insertAddressee( const TQString &addrBookId, TDEABC::Addressee &addr ) { if ( mSession.empty() ) { kdError() << "GroupwiseServer::insertAddressee(): no session." << endl; @@ -1250,7 +1250,7 @@ bool GroupwiseServer::insertAddressee( const TQString &addrBookId, KABC::Address return true; } -bool GroupwiseServer::changeAddressee( const KABC::Addressee &addr ) +bool GroupwiseServer::changeAddressee( const TDEABC::Addressee &addr ) { if ( mSession.empty() ) { kdError() << "GroupwiseServer::changeAddressee(): no session." << endl; @@ -1282,7 +1282,7 @@ bool GroupwiseServer::changeAddressee( const KABC::Addressee &addr ) return checkResponse( result, response.status ); } -bool GroupwiseServer::removeAddressee( const KABC::Addressee &addr ) +bool GroupwiseServer::removeAddressee( const TDEABC::Addressee &addr ) { if ( mSession.empty() ) { kdError() << "GroupwiseServer::removeAddressee(): no session." << endl; @@ -1463,7 +1463,7 @@ void GroupwiseServer::emitErrorMessage( const TQString & msg, bool fatal ) emit errorMessage( msg, fatal ); } -void GroupwiseServer::emitGotAddressees( const KABC::Addressee::List addressees ) +void GroupwiseServer::emitGotAddressees( const TDEABC::Addressee::List addressees ) { emit gotAddressees( addressees ); } diff --git a/tderesources/groupwise/soap/groupwiseserver.h b/tderesources/groupwise/soap/groupwiseserver.h index 71c6f6d54..0a0f70e0b 100644 --- a/tderesources/groupwise/soap/groupwiseserver.h +++ b/tderesources/groupwise/soap/groupwiseserver.h @@ -37,7 +37,7 @@ #include "gwjobs.h" -namespace KABC { +namespace TDEABC { class AddresseeList; class Resource; } @@ -154,9 +154,9 @@ class GroupwiseServer : public TQObject bool updateAddressBooks( const TQStringList &addrBookIds, const unsigned long startSequenceNumber, const unsigned long lastPORebuildTime ); - bool insertAddressee( const TQString &addrBookId, KABC::Addressee& ); - bool changeAddressee( const KABC::Addressee& ); - bool removeAddressee( const KABC::Addressee& ); + bool insertAddressee( const TQString &addrBookId, TDEABC::Addressee& ); + bool changeAddressee( const TDEABC::Addressee& ); + bool removeAddressee( const TDEABC::Addressee& ); bool readFreeBusy( const TQString &email, const TQDate &start, const TQDate &end, KCal::FreeBusy * ); @@ -178,7 +178,7 @@ class GroupwiseServer : public TQObject void emitReadAddressBookTotalSize( int ); void emitReadAddressBookProcessedSize( int ); void emitErrorMessage( const TQString &, bool ); - void emitGotAddressees( const KABC::Addressee::List ); + void emitGotAddressees( const TDEABC::Addressee::List ); bool readUserSettings( ngwt__Settings *&settings ); bool modifyUserSettings( TQMap<TQString, TQString> & ); @@ -191,7 +191,7 @@ class GroupwiseServer : public TQObject void readAddressBookTotalSize( int ); void readAddressBookProcessedSize( int ); void errorMessage( const TQString &, bool ); - void gotAddressees( const KABC::Addressee::List ); + void gotAddressees( const TDEABC::Addressee::List ); protected: void dumpCalendarFolder( const std::string &id ); diff --git a/tderesources/groupwise/soap/gwjobs.cpp b/tderesources/groupwise/soap/gwjobs.cpp index 8857ff8e5..4bbf728a3 100644 --- a/tderesources/groupwise/soap/gwjobs.cpp +++ b/tderesources/groupwise/soap/gwjobs.cpp @@ -152,7 +152,7 @@ void ReadAddressBooksJob::readAddressBook( std::string &id ) ngwt__Contact *contact = dynamic_cast<ngwt__Contact *>( item ); - KABC::Addressee addr = converter.convertFromContact( contact ); + TDEABC::Addressee addr = converter.convertFromContact( contact ); if ( !addr.isEmpty() ) { addr.setResource( mResource ); @@ -160,7 +160,7 @@ void ReadAddressBooksJob::readAddressBook( std::string &id ) TQString remoteUid = converter.stringToTQString( (*it)->id ); - KABC::Addressee oldAddressee = mResource->findByUid( mResource->idMapper().localId( remoteUid ) ); + TDEABC::Addressee oldAddressee = mResource->findByUid( mResource->idMapper().localId( remoteUid ) ); if ( oldAddressee.isEmpty() ) // new addressee mResource->idMapper().setRemoteId( addr.uid(), remoteUid ); else { @@ -241,7 +241,7 @@ void ReadAddressBooksJob::readAddressBook( std::string &id ) while ( true ) { - KABC::Addressee::List contacts; + TDEABC::Addressee::List contacts; mSoap->header->ngwt__session = mSession; kdDebug() << "sending readCursorRequest with session: " << mSession.c_str() << endl; _ngwm__readCursorResponse readCursorResponse; @@ -276,7 +276,7 @@ void ReadAddressBooksJob::readAddressBook( std::string &id ) kdDebug() << "ITEM is null" << endl; #endif ngwt__Contact *contact = dynamic_cast<ngwt__Contact *>( item ); - KABC::Addressee addr; + TDEABC::Addressee addr; if ( contact ) { addr = converter.convertFromContact( contact ); @@ -689,7 +689,7 @@ void UpdateAddressBooksJob::run() #if 1 kdDebug() << " - got " << items.size() << "contacts" << endl; #endif - KABC::Addressee::List contacts; + TDEABC::Addressee::List contacts; ContactConverter converter( mSoap ); std::vector<class ngwt__Item * >::const_iterator it; @@ -709,7 +709,7 @@ void UpdateAddressBooksJob::run() ngwt__Contact *contact = dynamic_cast<ngwt__Contact *>( item ); - KABC::Addressee addr = converter.convertFromContact( contact ); + TDEABC::Addressee addr = converter.convertFromContact( contact ); if ( !addr.isEmpty() ) contacts.append( addr ); } diff --git a/tderesources/groupwise/soap/gwjobs.h b/tderesources/groupwise/soap/gwjobs.h index e562ebd5a..75f9564ab 100644 --- a/tderesources/groupwise/soap/gwjobs.h +++ b/tderesources/groupwise/soap/gwjobs.h @@ -26,7 +26,7 @@ #include <tdeabc/addressee.h> -namespace KABC { +namespace TDEABC { class Resource; } @@ -71,7 +71,7 @@ class ReadAddressBooksJob : public GWJob private: TQStringList mAddressBookIds; - KABC::Resource *mResource; + TDEABC::Resource *mResource; int mProgress; }; @@ -123,7 +123,7 @@ class UpdateAddressBooksJob : public GWJob private: TQStringList mAddressBookIds; - KABC::Resource *mResource; + TDEABC::Resource *mResource; int mProgress; unsigned long mLastPORebuildTime; unsigned long mStartSequenceNumber; // first and last sequence numbers define the current state of the system addressbook diff --git a/tderesources/groupwise/soap/incidenceconverter.cpp b/tderesources/groupwise/soap/incidenceconverter.cpp index 580d84e6e..3f08a534f 100644 --- a/tderesources/groupwise/soap/incidenceconverter.cpp +++ b/tderesources/groupwise/soap/incidenceconverter.cpp @@ -474,7 +474,7 @@ void IncidenceConverter::setAttendees( KCal::Incidence *incidence, kdDebug() << "IncidenceConverter::setAttendees(), adding " << (*it)->fullName() << endl; TQString uuid; - TQValueList<KABC::Addressee> addList = KABC::StdAddressBook::self()->findByEmail( (*it)->email() ); + TQValueList<TDEABC::Addressee> addList = TDEABC::StdAddressBook::self()->findByEmail( (*it)->email() ); if ( !addList.first().isEmpty() ) uuid = addList.first().custom( "GWRESOURCE", "UUID" ); //uuid may be mandatory for the recipients list to be stored on the server... item->distribution->recipients->recipient.push_back( createRecipient( (*it)->name(), (*it)->email(), uuid ) ); diff --git a/tderesources/groupwise/soap/soapdebug.cpp b/tderesources/groupwise/soap/soapdebug.cpp index 0afff20da..d1c1256d0 100644 --- a/tderesources/groupwise/soap/soapdebug.cpp +++ b/tderesources/groupwise/soap/soapdebug.cpp @@ -15,7 +15,7 @@ #include <iostream> -namespace KABC { +namespace TDEABC { class ResourceMemory : public ResourceCached { @@ -142,7 +142,7 @@ int main( int argc, char **argv ) TQStringList ids; ids.append( id ); - KABC::ResourceMemory resource; + TDEABC::ResourceMemory resource; kdDebug() << "Login" << endl; if ( !server.login() ) { @@ -156,8 +156,8 @@ int main( int argc, char **argv ) server.logout(); } - KABC::Addressee::List addressees; - KABC::Resource::Iterator it2; + TDEABC::Addressee::List addressees; + TDEABC::Resource::Iterator it2; for( it2 = resource.begin(); it2 != resource.end(); ++it2 ) { kdDebug() << "ADDRESSEE: " << (*it2).fullEmail() << endl; addressees.append( *it2 ); |