summaryrefslogtreecommitdiffstats
path: root/kopete/libkopete/connectionmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/libkopete/connectionmanager.cpp')
-rw-r--r--kopete/libkopete/connectionmanager.cpp56
1 files changed, 28 insertions, 28 deletions
diff --git a/kopete/libkopete/connectionmanager.cpp b/kopete/libkopete/connectionmanager.cpp
index 62169986..4530fa9e 100644
--- a/kopete/libkopete/connectionmanager.cpp
+++ b/kopete/libkopete/connectionmanager.cpp
@@ -45,19 +45,19 @@ void ConnectionManager::initialise()
{
// determine initial state and set the state object accordingly.
d->m_state = Inactive;
- updatetqStatus();
+ updateStatus();
}
-void ConnectionManager::updatetqStatus()
+void ConnectionManager::updateStatus()
{
- NetworktqStatus::EnumtqStatus daemontqStatus = (NetworktqStatus::EnumtqStatus)d->m_stub->status( TQString() );
+ NetworkStatus::EnumStatus daemonStatus = (NetworkStatus::EnumStatus)d->m_stub->status( TQString() );
kdDebug() << k_funcinfo << endl;
- switch ( daemontqStatus )
+ switch ( daemonStatus )
{
- case NetworktqStatus::Offline:
- case NetworktqStatus::OfflineFailed:
- case NetworktqStatus::OfflineDisconnected:
- case NetworktqStatus::ShuttingDown:
+ case NetworkStatus::Offline:
+ case NetworkStatus::OfflineFailed:
+ case NetworkStatus::OfflineDisconnected:
+ case NetworkStatus::ShuttingDown:
if ( d->m_state == Online )
{
kdDebug() << "STATE IS PENDING" << endl;
@@ -69,13 +69,13 @@ void ConnectionManager::updatetqStatus()
d->m_state = Offline;
}
break;
- case NetworktqStatus::Establishing:
- case NetworktqStatus::Online:
+ case NetworkStatus::Establishing:
+ case NetworkStatus::Online:
kdDebug() << "STATE IS ONLINE" << endl;
d->m_state = Online;
break;
- case NetworktqStatus::NoNetworks:
- case NetworktqStatus::Unreachable:
+ case NetworkStatus::NoNetworks:
+ case NetworkStatus::Unreachable:
kdDebug() << "STATE IS INACTIVE" << endl;
d->m_state = Inactive;
break;
@@ -87,38 +87,38 @@ ConnectionManager::~ConnectionManager()
delete d;
}
-NetworktqStatus::EnumtqStatus ConnectionManager::status( const TQString & host )
+NetworkStatus::EnumStatus ConnectionManager::status( const TQString & host )
{
// need also to check that the daemon hasn't died
- updatetqStatus();
+ updateStatus();
if ( d->m_state == Pending )
- return NetworktqStatus::Offline;
+ return NetworkStatus::Offline;
if ( d->m_state == Online )
- return NetworktqStatus::Online;
+ return NetworkStatus::Online;
if ( d->m_state == Offline )
- return NetworktqStatus::Offline;
- return NetworktqStatus::NoNetworks;
+ return NetworkStatus::Offline;
+ return NetworkStatus::NoNetworks;
}
-NetworktqStatus::EnumRequestResult ConnectionManager::requestConnection( TQWidget * mainWidget, const TQString & host, bool userInitiated )
+NetworkStatus::EnumRequestResult ConnectionManager::requestConnection( TQWidget * mainWidget, const TQString & host, bool userInitiated )
{
kdDebug() << k_funcinfo << endl;
- NetworktqStatus::EnumRequestResult result;
+ NetworkStatus::EnumRequestResult result;
// if offline and the user has previously indicated they didn't want any new connections, suppress it
if ( d->m_state == Offline && !userInitiated && d->m_userInitiatedOnly )
- result = NetworktqStatus::UserRefused;
+ result = NetworkStatus::UserRefused;
// if offline, ask the user whether this connection should be allowed
if ( d->m_state == Offline )
{
if ( askToConnect( mainWidget ) )
- //result = NetworktqStatus::Connected;
- result = (NetworktqStatus::EnumRequestResult)d->m_stub->request( host, userInitiated );
+ //result = NetworkStatus::Connected;
+ result = (NetworkStatus::EnumRequestResult)d->m_stub->request( host, userInitiated );
else
- result = NetworktqStatus::UserRefused;
+ result = NetworkStatus::UserRefused;
}
// otherwise, just ask for the connection
else
- result = (NetworktqStatus::EnumRequestResult)d->m_stub->request( host, userInitiated );
+ result = (NetworkStatus::EnumRequestResult)d->m_stub->request( host, userInitiated );
return result;
}
@@ -131,12 +131,12 @@ void ConnectionManager::relinquishConnection( const TQString & host )
void ConnectionManager::slotStatusChanged( TQString host, int status )
{
kdDebug() << k_funcinfo << endl;
- updatetqStatus();
+ updateStatus();
// reset user initiated only flag if we are now online
if ( d->m_state == Online )
d->m_userInitiatedOnly = false;
- emit statusChanged( host, (NetworktqStatus::EnumtqStatus)status );
+ emit statusChanged( host, (NetworkStatus::EnumStatus)status );
}
bool ConnectionManager::askToConnect( TQWidget * mainWidget )
@@ -147,7 +147,7 @@ bool ConnectionManager::askToConnect( TQWidget * mainWidget )
i18n("This application is currently in offline mode. Do you want to connect in order to carry out this operation?"),
i18n("Leave Offline Mode?"),
i18n("Connect"), i18n("Stay Offline"),
- TQString::tqfromLatin1("OfflineModeAlwaysGoOnline") ) == KMessageBox::Yes );
+ TQString::fromLatin1("OfflineModeAlwaysGoOnline") ) == KMessageBox::Yes );
}
#include "connectionmanager.moc"