summaryrefslogtreecommitdiffstats
path: root/kresources/groupwise/soap/groupwiseserver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kresources/groupwise/soap/groupwiseserver.cpp')
-rw-r--r--kresources/groupwise/soap/groupwiseserver.cpp86
1 files changed, 43 insertions, 43 deletions
diff --git a/kresources/groupwise/soap/groupwiseserver.cpp b/kresources/groupwise/soap/groupwiseserver.cpp
index 8445be9f..28c73b68 100644
--- a/kresources/groupwise/soap/groupwiseserver.cpp
+++ b/kresources/groupwise/soap/groupwiseserver.cpp
@@ -38,8 +38,8 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qnamespace.h>
-#include <qfile.h>
+#include <tqnamespace.h>
+#include <tqfile.h>
#include "ksslsocket.h"
#include "contactconverter.h"
@@ -55,11 +55,11 @@
#include "groupwiseserver.h"
-static QMap<struct soap *,GroupwiseServer *> mServerMap;
+static TQMap<struct soap *,GroupwiseServer *> mServerMap;
int myOpen( struct soap *soap, const char *endpoint, const char *host, int port )
{
- QMap<struct soap *,GroupwiseServer *>::ConstIterator it;
+ TQMap<struct soap *,GroupwiseServer *>::ConstIterator it;
it = mServerMap.find( soap );
if ( it == mServerMap.end() ) {
soap->error = SOAP_FAULT;
@@ -71,7 +71,7 @@ int myOpen( struct soap *soap, const char *endpoint, const char *host, int port
int myClose( struct soap *soap )
{
- QMap<struct soap *,GroupwiseServer *>::ConstIterator it;
+ TQMap<struct soap *,GroupwiseServer *>::ConstIterator it;
it = mServerMap.find( soap );
if ( it == mServerMap.end() ) return SOAP_FAULT;
@@ -80,7 +80,7 @@ int myClose( struct soap *soap )
int mySendCallback( struct soap *soap, const char *s, size_t n )
{
- QMap<struct soap *,GroupwiseServer *>::ConstIterator it;
+ TQMap<struct soap *,GroupwiseServer *>::ConstIterator it;
it = mServerMap.find( soap );
if ( it == mServerMap.end() ) return SOAP_FAULT;
@@ -89,7 +89,7 @@ int mySendCallback( struct soap *soap, const char *s, size_t n )
size_t myReceiveCallback( struct soap *soap, char *s, size_t n )
{
- QMap<struct soap *,GroupwiseServer *>::ConstIterator it;
+ TQMap<struct soap *,GroupwiseServer *>::ConstIterator it;
it = mServerMap.find( soap );
if ( it == mServerMap.end() ) {
kdDebug() << "No soap object found" << endl;
@@ -114,11 +114,11 @@ int GroupwiseServer::gSoapOpen( struct soap *soap, const char *,
// kdDebug() << "Creating KSSLSocket()" << endl;
m_sock = new KSSLSocket();
m_sock->setTimeout( KProtocolManager::connectTimeout() );
- connect( m_sock, SIGNAL( sslFailure() ), SLOT( slotSslError() ) );
+ connect( m_sock, TQT_SIGNAL( sslFailure() ), TQT_SLOT( slotSslError() ) );
} else {
m_sock = new KExtendedSocket();
}
- mErrorText = QString::null;
+ mErrorText = TQString::null;
m_sock->reset();
m_sock->setBlockingMode( false );
@@ -128,8 +128,8 @@ int GroupwiseServer::gSoapOpen( struct soap *soap, const char *,
int rc = m_sock->lookup();
if (rc != 0 ) {
kdError() << "gSoapOpen: lookup of " << host << " failed " << rc << endl;
- QString errorMessage;
- errorMessage = QString::fromLatin1( strerror( errno ) );
+ TQString errorMessage;
+ errorMessage = TQString::fromLatin1( strerror( errno ) );
perror( 0 );
soap->error = SOAP_TCP_ERROR;
mErrorText = i18n("Connect failed: %1.").arg( errorMessage );
@@ -139,15 +139,15 @@ int GroupwiseServer::gSoapOpen( struct soap *soap, const char *,
rc = m_sock->connect();
if ( rc != 0 ) {
kdError() << "gSoapOpen: connect failed " << rc << endl;
- QString errorMessage;
+ TQString errorMessage;
if ( rc == -1 ) {
- errorMessage = QString::fromLatin1( strerror( errno ) );
+ errorMessage = TQString::fromLatin1( strerror( errno ) );
perror( 0 );
}
//set the soap struct's error here!
else {
if ( rc == -3 )
- errorMessage = QString::fromLatin1( "Connection timed out. Check host and port number" );
+ errorMessage = TQString::fromLatin1( "Connection timed out. Check host and port number" );
}
mErrorText = i18n("Connect failed: %1.").arg( errorMessage );
soap->error =SOAP_TCP_ERROR;
@@ -263,9 +263,9 @@ size_t GroupwiseServer::gSoapReceiveCallback( struct soap *soap, char *s,
return ret;
}
-GroupwiseServer::GroupwiseServer( const QString &url, const QString &user,
- const QString &password, QObject *parent )
- : QObject( parent, "GroupwiseServer" ),
+GroupwiseServer::GroupwiseServer( const TQString &url, const TQString &user,
+ const TQString &password, TQObject *parent )
+ : TQObject( parent, "GroupwiseServer" ),
mUrl( url ), mUser( user ), mPassword( password ),
mSSL( url.left(6)=="https:" ), m_sock( 0 ),
mError( 0 )
@@ -644,7 +644,7 @@ bool GroupwiseServer::logout()
return true;
}
-GroupWise::DeltaInfo GroupwiseServer::getDeltaInfo( const QStringList & addressBookIds )
+GroupWise::DeltaInfo GroupwiseServer::getDeltaInfo( const TQStringList & addressBookIds )
{
GroupWise::DeltaInfo info;
info.count = 0;
@@ -719,7 +719,7 @@ GroupWise::AddressBook::List GroupwiseServer::addressBookList()
return books;
}
-bool GroupwiseServer::readAddressBooksSynchronous( const QStringList &addrBookIds )
+bool GroupwiseServer::readAddressBooksSynchronous( const TQStringList &addrBookIds )
{
if ( mSession.empty() ) {
kdError() << "GroupwiseServer::readAddressBooksSynchronous(): no session." << endl;
@@ -735,7 +735,7 @@ bool GroupwiseServer::readAddressBooksSynchronous( const QStringList &addrBookId
return true;
}
-bool GroupwiseServer::updateAddressBooks( const QStringList &addrBookIds, const unsigned long startSequenceNumber, const unsigned long lastPORebuildTime )
+bool GroupwiseServer::updateAddressBooks( const TQStringList &addrBookIds, const unsigned long startSequenceNumber, const unsigned long lastPORebuildTime )
{
if ( mSession.empty() ) {
kdError() << "GroupwiseServer::updateAddressBooks(): no session." << endl;
@@ -757,7 +757,7 @@ bool GroupwiseServer::updateAddressBooks( const QStringList &addrBookIds, const
return true;
}
-std::string GroupwiseServer::getFullIDFor( const QString & gwRecordIDFromIcal )
+std::string GroupwiseServer::getFullIDFor( const TQString & gwRecordIDFromIcal )
{
// first get the ID of the calendar folder - because we don't store this in the resource we have to fetch it manually
std::string calendarFolderID;
@@ -847,12 +847,12 @@ bool GroupwiseServer::acceptIncidence( KCal::Incidence *incidence )
GWConverter conv( mSoap );
- QString qGwUid = incidence->customProperty( "GWRESOURCE", "UID" );
+ TQString qGwUid = incidence->customProperty( "GWRESOURCE", "UID" );
std::string gwUID;
if ( qGwUid.isEmpty() )
{
- QString gwRecordIDFromIcal = incidence->nonKDECustomProperty( "X-GWRECORDID" );
+ TQString gwRecordIDFromIcal = incidence->nonKDECustomProperty( "X-GWRECORDID" );
// we need to do a getItem to get the item's complete ID, including the container portion
// this is only necessary because the Ical GWRECORDID property is incomplete
gwUID = getFullIDFor( gwRecordIDFromIcal );
@@ -899,7 +899,7 @@ bool GroupwiseServer::declineIncidence( KCal::Incidence *incidence )
if ( gwUID.empty() )
{
- QString gwRecordIDFromIcal = incidence->nonKDECustomProperty( "X-GWRECORDID" );
+ TQString gwRecordIDFromIcal = incidence->nonKDECustomProperty( "X-GWRECORDID" );
// we need to do a getItem to get the item's complete ID, including the container portion
// this is only necessary because the Ical GWRECORDID property is incomplete
gwUID = getFullIDFor( gwRecordIDFromIcal );
@@ -941,7 +941,7 @@ bool GroupwiseServer::addIncidence( KCal::Incidence *incidence,
kdDebug() << "GroupwiseServer::addIncidence() " << incidence->summary()
<< endl;
- QString gwRecordIDFromIcal = incidence->nonKDECustomProperty( "X-GWRECORDID" );
+ TQString gwRecordIDFromIcal = incidence->nonKDECustomProperty( "X-GWRECORDID" );
if( !gwRecordIDFromIcal.isEmpty() || !incidence->customProperty( "GWRESOURCE", "UID" ).isEmpty() ) {
kdDebug() << "Incidence has GroupWise ID already: (" << gwRecordIDFromIcal << "ical|" << incidence->customProperty( "GWRESOURCE", "UID" ) << "soap) and organizer : " << incidence->organizer().email() << endl;
return acceptIncidence( incidence );
@@ -985,7 +985,7 @@ bool GroupwiseServer::addIncidence( KCal::Incidence *incidence,
{
std::string firstId = *(response.id.begin() );
incidence->setCustomProperty( "GWRESOURCE", "UID",
- QString::fromUtf8( firstId.c_str() ) );
+ TQString::fromUtf8( firstId.c_str() ) );
}
return true;
}
@@ -1106,7 +1106,7 @@ bool GroupwiseServer::checkResponse( int result, ngwt__Status *status )
kdDebug() << "SOAP call succeeded" << endl;
}
if ( status && status->code != 0 ) {
- QString msg = "SOAP Response Status: " + QString::number( status->code );
+ TQString msg = "SOAP Response Status: " + TQString::number( status->code );
if ( status->description ) {
msg += " ";
msg += status->description->c_str();
@@ -1130,11 +1130,11 @@ bool GroupwiseServer::deleteIncidence( KCal::Incidence *incidence )
<< endl;
// decline if necessary on the server
- QString gwRecordIDFromIcal = incidence->nonKDECustomProperty( "X-GWRECORDID" );
+ TQString gwRecordIDFromIcal = incidence->nonKDECustomProperty( "X-GWRECORDID" );
// debug contents of message custom properties
kdDebug() << "incidence custom properties BEGIN" << endl;
- typedef QMap<QCString, QString> PropMap;
+ typedef TQMap<TQCString, TQString> PropMap;
PropMap customs = incidence->customProperties();
PropMap::Iterator it;
for ( it = customs.begin(); it != customs.end(); ++it )
@@ -1219,7 +1219,7 @@ bool GroupwiseServer::retractRequest( KCal::Incidence *incidence, RetractCause c
return checkResponse( result, response.status );
}
-bool GroupwiseServer::insertAddressee( const QString &addrBookId, KABC::Addressee &addr )
+bool GroupwiseServer::insertAddressee( const TQString &addrBookId, KABC::Addressee &addr )
{
if ( mSession.empty() ) {
kdError() << "GroupwiseServer::insertAddressee(): no session." << endl;
@@ -1244,7 +1244,7 @@ bool GroupwiseServer::insertAddressee( const QString &addrBookId, KABC::Addresse
&request, &response );
if ( !checkResponse( result, response.status ) ) return false;
- addr.insertCustom( "GWRESOURCE", "UID", QString::fromUtf8( response.id.front().c_str() ) );
+ addr.insertCustom( "GWRESOURCE", "UID", TQString::fromUtf8( response.id.front().c_str() ) );
addr.setChanged( false );
return true;
@@ -1325,8 +1325,8 @@ bool GroupwiseServer::readCalendarSynchronous( KCal::Calendar *cal )
return true;
}
-bool GroupwiseServer::readFreeBusy( const QString &email,
- const QDate &start, const QDate &end, KCal::FreeBusy *freeBusy )
+bool GroupwiseServer::readFreeBusy( const TQString &email,
+ const TQDate &start, const TQDate &end, KCal::FreeBusy *freeBusy )
{
if ( mSession.empty() ) {
kdError() << "GroupwiseServer::readFreeBusy(): no session." << endl;
@@ -1370,7 +1370,7 @@ bool GroupwiseServer::readFreeBusy( const QString &email,
// Get free/busy data
_ngwm__getFreeBusyRequest getFreeBusyRequest;
- getFreeBusyRequest.freeBusySessionId = QString::number( fbSessionId ).utf8();
+ getFreeBusyRequest.freeBusySessionId = TQString::number( fbSessionId ).utf8();
_ngwm__getFreeBusyResponse getFreeBusyResponse;
@@ -1408,8 +1408,8 @@ bool GroupwiseServer::readFreeBusy( const QString &email,
if ( blocks ) {
std::vector<class ngwt__FreeBusyBlock *>::const_iterator it2;
for( it2 = blocks->begin(); it2 != blocks->end(); ++it2 ) {
- QDateTime blockStart = conv.charToQDateTime( (*it2)->startDate );
- QDateTime blockEnd = conv.charToQDateTime( (*it2)->endDate );
+ TQDateTime blockStart = conv.charToQDateTime( (*it2)->startDate );
+ TQDateTime blockEnd = conv.charToQDateTime( (*it2)->endDate );
ngwt__AcceptLevel acceptLevel = *(*it2)->acceptLevel;
/* TODO: show Free/Busy subject in diagram - we need to support these as people use it for checking others' calendars */
@@ -1458,7 +1458,7 @@ void GroupwiseServer::emitReadAddressBookProcessedSize( int s )
emit readAddressBookProcessedSize( s );
}
-void GroupwiseServer::emitErrorMessage( const QString & msg, bool fatal )
+void GroupwiseServer::emitErrorMessage( const TQString & msg, bool fatal )
{
emit errorMessage( msg, fatal );
}
@@ -1468,16 +1468,16 @@ void GroupwiseServer::emitGotAddressees( const KABC::Addressee::List addressees
emit gotAddressees( addressees );
}
-void GroupwiseServer::log( const QString &prefix, const char *s, size_t n )
+void GroupwiseServer::log( const TQString &prefix, const char *s, size_t n )
{
if ( mLogFile.isEmpty() ) return;
kdDebug() << "GroupwiseServer::log() " << prefix << " " << n << " bytes"
<< endl;
- QString log = mLogFile + "_" + QString::number( getpid() ) +
+ TQString log = mLogFile + "_" + TQString::number( getpid() ) +
"_" + prefix + ".log";
- QFile f( log );
+ TQFile f( log );
if ( !f.open( IO_WriteOnly | IO_Append ) ) {
kdError() << "Unable to open log file '" << log << "'" << endl;
} else {
@@ -1564,7 +1564,7 @@ bool GroupwiseServer::readUserSettings( ngwt__Settings *&returnedSettings )
return true; /** FIXME return false if no settings fetched */
}
-bool GroupwiseServer::modifyUserSettings( QMap<QString, QString> & settings )
+bool GroupwiseServer::modifyUserSettings( TQMap<TQString, TQString> & settings )
{
kdDebug() << "GroupwiseServer::userSettings()" << endl;
@@ -1575,7 +1575,7 @@ bool GroupwiseServer::modifyUserSettings( QMap<QString, QString> & settings )
_ngwm__modifySettingsRequest request;
_ngwm__modifySettingsResponse response;
request.settings = soap_new_ngwt__SettingsList( mSoap, -1 );
- QMap<QString, QString>::Iterator it;
+ TQMap<TQString, TQString>::Iterator it;
for ( it = settings.begin(); it != settings.end(); ++it )
{
kdDebug() << " creating Custom for " << it.key() << ", " << it.data() << endl;
@@ -1610,7 +1610,7 @@ bool GroupwiseServer::setCompleted( KCal::Todo * todo )
if ( todo )
{
GWConverter conv( mSoap );
- QString id = todo->customProperty( "GWRESOURCE", "UID" );
+ TQString id = todo->customProperty( "GWRESOURCE", "UID" );
ngwt__ItemRefList * items = soap_new_ngwt__ItemRefList( mSoap, 1 );
items->item.push_back( *( conv.qStringToString( id ) ) );
if ( todo->isCompleted() )