summaryrefslogtreecommitdiffstats
path: root/networkstatus
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-07 03:45:53 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-07 03:45:53 +0000
commit10308be19ef7fa44699562cc75946e7ea1fdf6b9 (patch)
tree4bc444c00a79e88105f2cfce5b6209994c413ca0 /networkstatus
parent307136d8eef0ba133b78ceee8e901138d4c996a1 (diff)
downloadtdelibs-10308be19ef7fa44699562cc75946e7ea1fdf6b9.tar.gz
tdelibs-10308be19ef7fa44699562cc75946e7ea1fdf6b9.zip
Revert automated changes
Sorry guys, they are just not ready for prime time Work will continue as always git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1212479 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'networkstatus')
-rw-r--r--networkstatus/clientiface.h4
-rw-r--r--networkstatus/clientifaceimpl.cpp2
-rw-r--r--networkstatus/clientifaceimpl.h4
-rw-r--r--networkstatus/connectionmanager.cpp38
-rw-r--r--networkstatus/connectionmanager.h10
-rw-r--r--networkstatus/network.cpp18
-rw-r--r--networkstatus/network.h18
-rw-r--r--networkstatus/networkstatus.cpp74
-rw-r--r--networkstatus/networkstatus.desktop10
-rw-r--r--networkstatus/networkstatus.h12
-rw-r--r--networkstatus/networkstatuscommon.cpp12
-rw-r--r--networkstatus/networkstatuscommon.h16
-rw-r--r--networkstatus/networkstatusiface.h6
-rw-r--r--networkstatus/networkstatusindicator.cpp22
-rw-r--r--networkstatus/networkstatusindicator.h10
-rw-r--r--networkstatus/provideriface.h6
-rw-r--r--networkstatus/serviceiface.h4
-rw-r--r--networkstatus/serviceifaceimpl.cpp6
-rw-r--r--networkstatus/serviceifaceimpl.h6
-rw-r--r--networkstatus/testservice.cpp40
-rw-r--r--networkstatus/testservice.h6
21 files changed, 162 insertions, 162 deletions
diff --git a/networkstatus/clientiface.h b/networkstatus/clientiface.h
index d42708ae6..9fcef57a3 100644
--- a/networkstatus/clientiface.h
+++ b/networkstatus/clientiface.h
@@ -35,14 +35,14 @@ k_dcop:
/**
* Get the status of the connection to the given host.
* @param host
- * @return a NetworktqStatus::EnumtqStatus representing the state of the connection to the given host
+ * @return a NetworkStatus::EnumStatus representing the state of the connection to the given host
*/
virtual int status( const TQString & host) = 0;
/**
* Request a connection to the named host, registering the application's usage of this connection
* @param host The hostname the client wants to connect to.
* @param userInitiated Indicates whether the connection is a direct result of a user action or is a background task. Used by the daemon to decide whether to create an on-demand connection.
- * @return An NetworktqStatus::EnumRequestResult indicating whether the request was accepted
+ * @return An NetworkStatus::EnumRequestResult indicating whether the request was accepted
*/
virtual int request( const TQString & host, bool userInitiated ) = 0;
/**
diff --git a/networkstatus/clientifaceimpl.cpp b/networkstatus/clientifaceimpl.cpp
index e03850715..f20957e73 100644
--- a/networkstatus/clientifaceimpl.cpp
+++ b/networkstatus/clientifaceimpl.cpp
@@ -21,7 +21,7 @@
#include "clientifaceimpl.h"
-ClientIfaceImpl::ClientIfaceImpl( NetworktqStatusModule * module ) : m_module ( module )
+ClientIfaceImpl::ClientIfaceImpl( NetworkStatusModule * module ) : m_module ( module )
{
}
diff --git a/networkstatus/clientifaceimpl.h b/networkstatus/clientifaceimpl.h
index 067d8be43..bdc99a19f 100644
--- a/networkstatus/clientifaceimpl.h
+++ b/networkstatus/clientifaceimpl.h
@@ -30,14 +30,14 @@
class ClientIfaceImpl : virtual public ClientIface
{
public:
- ClientIfaceImpl( NetworktqStatusModule * module );
+ ClientIfaceImpl( NetworkStatusModule * module );
int status( TQString host );
int request( TQString host, bool userInitiated );
void relinquish( TQString host );
bool reportFailure( TQString host );
/* TQString statusAsString();*/
private:
- NetworktqStatusModule * m_module;
+ NetworkStatusModule * m_module;
};
#endif
diff --git a/networkstatus/connectionmanager.cpp b/networkstatus/connectionmanager.cpp
index 818df2730..a28c6a124 100644
--- a/networkstatus/connectionmanager.cpp
+++ b/networkstatus/connectionmanager.cpp
@@ -46,7 +46,7 @@ ConnectionManager::ConnectionManager( TQObject * parent, const char * name ) : D
d->m_stub = new ClientIface_stub( kapp->dcopClient(), "kded", "networkstatus" );
- connectDCOPSignal( "kded", "networkstatus", "statusChange(TQString,int)", "slottqStatusChanged(TQString,int)", false );
+ connectDCOPSignal( "kded", "networkstatus", "statusChange(TQString,int)", "slotStatusChanged(TQString,int)", false );
d->m_userInitiatedOnly = false;
initialise();
}
@@ -65,13 +65,13 @@ void ConnectionManager::initialise()
{
// determine initial state and set the state object accordingly.
d->m_state = Offline;
- updatetqStatus();
+ updateStatus();
}
-void ConnectionManager::updatetqStatus()
+void ConnectionManager::updateStatus()
{
- /*NetworktqStatus::EnumtqStatus daemontqStatus = (NetworktqStatus::EnumtqStatus)d->m_stub->status( TQString::null );
- switch ( daemontqStatus )
+ /*NetworkStatus::EnumStatus daemonStatus = (NetworkStatus::EnumStatus)d->m_stub->status( TQString::null );
+ switch ( daemonStatus )
{
case Offline:
case OfflineFailed:
@@ -98,30 +98,30 @@ ConnectionManager::~ConnectionManager()
delete d;
}
-NetworktqStatus::EnumtqStatus ConnectionManager::status( const TQString & host )
+NetworkStatus::EnumStatus ConnectionManager::status( const TQString & host )
{
if ( d->m_state == Inactive )
- return NetworktqStatus::NoNetworks;
+ return NetworkStatus::NoNetworks;
else
- return NetworktqStatus::Offline;
+ return NetworkStatus::Offline;
}
-NetworktqStatus::EnumRequestResult ConnectionManager::requestConnection( TQWidget * mainWidget, const TQString & host, bool userInitiated )
+NetworkStatus::EnumRequestResult ConnectionManager::requestConnection( TQWidget * mainWidget, const TQString & host, bool userInitiated )
{
- 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::EnumRequestResult)d->m_stub->request( host, userInitiated );
+ 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,26 +131,26 @@ void ConnectionManager::relinquishConnection( const TQString & host )
d->m_stub->relinquish( host );
}
-void ConnectionManager::slottqStatusChanged( TQString host, int status )
+void ConnectionManager::slotStatusChanged( TQString host, int status )
{
- 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 )
{
i18n( "A network connection was disconnected. The application is now in offline mode. Do you want the application to resume network operations when the network is available again?" );
i18n( "This application is currently in offline mode. Do you want to connect?" );
- i18n( "Message shown when a network connection failed. The placeholder tqcontains the concrete description of the operation eg 'while performing this operation", "A network connection failed %1. Do you want to place the application in offline mode?" );
+ i18n( "Message shown when a network connection failed. The placeholder contains the concrete description of the operation eg 'while performing this operation", "A network connection failed %1. Do you want to place the application in offline mode?" );
return ( KMessageBox::questionYesNo( 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("Do Not Connect"),
- TQString::tqfromLatin1("OfflineModeAlwaysGoOnline") ) == KMessageBox::Yes );
+ TQString::fromLatin1("OfflineModeAlwaysGoOnline") ) == KMessageBox::Yes );
}
#include "connectionmanager.moc"
diff --git a/networkstatus/connectionmanager.h b/networkstatus/connectionmanager.h
index d88f8d2a7..00ca4e35c 100644
--- a/networkstatus/connectionmanager.h
+++ b/networkstatus/connectionmanager.h
@@ -30,23 +30,23 @@ class ConnectionManager : public TQObject, virtual public DCOPObject
static ConnectionManager* self();
enum State { Inactive, Online, Offline, Pending };
virtual ~ConnectionManager();
- NetworktqStatus::EnumtqStatus status( const TQString & host );
+ NetworkStatus::EnumStatus status( const TQString & host );
// check if a hostname is available. Ask user if offline. Request host
- NetworktqStatus::EnumRequestResult requestConnection( TQWidget* mainWidget, const TQString & host, bool userInitiated );
+ NetworkStatus::EnumRequestResult requestConnection( TQWidget* mainWidget, const TQString & host, bool userInitiated );
// method to relinquish a connection
void relinquishConnection( const TQString & host );
signals:
// signal that the network for a hostname is up/down
- void statusChanged( const TQString & host, NetworktqStatus::EnumtqStatus status );
+ void statusChanged( const TQString & host, NetworkStatus::EnumStatus status );
protected:
// sets up internal state
void initialise();
// reread the desktop status from the daemon and update internal state
- void updatetqStatus();
+ void updateStatus();
// ask if the user would like to reconnect
bool askToConnect( TQWidget * mainWidget );
k_dcop:
- void slottqStatusChanged( TQString host, int status );
+ void slotStatusChanged( TQString host, int status );
private:
ConnectionManager( TQObject *parent, const char * name );
ConnectionManagerPrivate *d;
diff --git a/networkstatus/network.cpp b/networkstatus/network.cpp
index 6d34950c1..fcb4a6f51 100644
--- a/networkstatus/network.cpp
+++ b/networkstatus/network.cpp
@@ -23,29 +23,29 @@
#include "network.h"
-Network::Network( const TQString name, NetworktqStatus::Properties properties )
+Network::Network( const TQString name, NetworkStatus::Properties properties )
: m_name( name )
{
kdDebug() << k_funcinfo << "constructing network '" << name << "', status: " << properties.status << endl;
m_status = properties.status;
- m_nettqmasks = properties.nettqmasks;
+ m_netmasks = properties.netmasks;
m_internet = properties.internet;
m_service = properties.service;
m_onDemandPolicy = properties.onDemandPolicy;
}
-NetworktqStatus::EnumtqStatus Network::reachabilityFor( const TQString & host )
+NetworkStatus::EnumStatus Network::reachabilityFor( const TQString & host )
{
// initially assume all networks are internet
// TODO: compute reachability properly
Q_UNUSED( host );
if ( true /*nss.properties.internet && notPrivateNetwork( host )*/ )
{
- NetworktqStatus::EnumtqStatus status;
- if ( m_status == NetworktqStatus::Establishing || m_status == NetworktqStatus::Online )
- status = NetworktqStatus::Online;
- else if ( m_status == NetworktqStatus::ShuttingDown || m_status == NetworktqStatus::Offline )
- status = NetworktqStatus::Offline;
+ NetworkStatus::EnumStatus status;
+ if ( m_status == NetworkStatus::Establishing || m_status == NetworkStatus::Online )
+ status = NetworkStatus::Online;
+ else if ( m_status == NetworkStatus::ShuttingDown || m_status == NetworkStatus::Offline )
+ status = NetworkStatus::Offline;
else
status = m_status;
@@ -82,7 +82,7 @@ void Network::unregisterUsage( const TQCString appId, const TQString host )
}
}
-void Network::setStatus( NetworktqStatus::EnumtqStatus status )
+void Network::setStatus( NetworkStatus::EnumStatus status )
{
m_status = status;
}
diff --git a/networkstatus/network.h b/networkstatus/network.h
index 819c4d80d..dcd2cd339 100644
--- a/networkstatus/network.h
+++ b/networkstatus/network.h
@@ -37,30 +37,30 @@ typedef TQValueList< NetworkUsageStruct > NetworkUsageList;
class Network
{
public:
- Network( const TQString name, NetworktqStatus::Properties properties );
+ Network( const TQString name, NetworkStatus::Properties properties );
Network( const Network & other );
- NetworktqStatus::EnumtqStatus reachabilityFor( const TQString & host );
+ NetworkStatus::EnumStatus reachabilityFor( const TQString & host );
void registerUsage( const TQCString appId, const TQString host );
void unregisterUsage( const TQCString appId, const TQString host );
- void setStatus( NetworktqStatus::EnumtqStatus status );
+ void setStatus( NetworkStatus::EnumStatus status );
void removeAllUsage();
- NetworktqStatus::EnumtqStatus status() { return m_status; }
+ NetworkStatus::EnumStatus status() { return m_status; }
TQString name() { return m_name; }
bool internet() { return m_internet; }
- TQStringList nettqmasks() { return m_nettqmasks; }
+ TQStringList netmasks() { return m_netmasks; }
TQCString service() { return m_service; }
- NetworktqStatus::EnumOnDemandPolicy onDemandPolicy() { return m_onDemandPolicy; }
+ NetworkStatus::EnumOnDemandPolicy onDemandPolicy() { return m_onDemandPolicy; }
NetworkUsageList usage() { return m_usage; }
private:
- NetworktqStatus::EnumtqStatus m_status;
+ NetworkStatus::EnumStatus m_status;
TQString m_name;
bool m_internet;
- TQStringList m_nettqmasks;
+ TQStringList m_netmasks;
TQCString m_service;
- NetworktqStatus::EnumOnDemandPolicy m_onDemandPolicy;
+ NetworkStatus::EnumOnDemandPolicy m_onDemandPolicy;
NetworkUsageList m_usage;
};
diff --git a/networkstatus/networkstatus.cpp b/networkstatus/networkstatus.cpp
index 0cd620e92..21e34d978 100644
--- a/networkstatus/networkstatus.cpp
+++ b/networkstatus/networkstatus.cpp
@@ -49,7 +49,7 @@
extern "C" {
KDE_EXPORT KDEDModule* create_networkstatus( const TQCString& obj )
{
- return new NetworktqStatusModule( obj );
+ return new NetworkStatusModule( obj );
}
}
@@ -58,7 +58,7 @@ extern "C" {
//typedef TQDict< Network > NetworkList;
typedef TQValueList< Network * > NetworkList;
-class NetworktqStatusModule::Private
+class NetworkStatusModule::Private
{
public:
NetworkList networks;
@@ -68,7 +68,7 @@ public:
// CTORS/DTORS
-NetworktqStatusModule::NetworktqStatusModule( const TQCString & obj ) : KDEDModule( obj )
+NetworkStatusModule::NetworkStatusModule( const TQCString & obj ) : KDEDModule( obj )
{
d = new Private;
/* d->clientIface = new ClientIfaceImpl( this );
@@ -77,7 +77,7 @@ NetworktqStatusModule::NetworktqStatusModule( const TQCString & obj ) : KDEDModu
connect( kapp->dcopClient(), TQT_SIGNAL( applicationRegistered( const TQCString& ) ) , this, TQT_SLOT( registeredToDCOP( const TQCString& ) ) );
}
-NetworktqStatusModule::~NetworktqStatusModule()
+NetworkStatusModule::~NetworkStatusModule()
{
/* delete d->clientIface;
delete d->serviceIface;*/
@@ -86,9 +86,9 @@ NetworktqStatusModule::~NetworktqStatusModule()
// CLIENT INTERFACE
-TQStringList NetworktqStatusModule::networks()
+TQStringList NetworkStatusModule::networks()
{
- kdDebug() << k_funcinfo << " tqcontains " << d->networks.count() << " networks" << endl;
+ kdDebug() << k_funcinfo << " contains " << d->networks.count() << " networks" << endl;
TQStringList networks;
NetworkList::iterator end = d->networks.end();
NetworkList::iterator it = d->networks.begin();
@@ -97,15 +97,15 @@ TQStringList NetworktqStatusModule::networks()
return networks;
}
-int NetworktqStatusModule::status( const TQString & host )
+int NetworkStatusModule::status( const TQString & host )
{
if ( host == "127.0.0.1" || host == "localhost" )
- return NetworktqStatus::Online;
+ return NetworkStatus::Online;
Network * p = networkForHost( host );
if ( !p )
{
//kdDebug() << k_funcinfo << " no networks have status for host '" << host << "'" << endl;
- return (int)NetworktqStatus::NoNetworks;
+ return (int)NetworkStatus::NoNetworks;
}
else
{
@@ -114,65 +114,65 @@ int NetworktqStatusModule::status( const TQString & host )
}
}
-int NetworktqStatusModule::request( const TQString & host, bool userInitiated )
+int NetworkStatusModule::request( const TQString & host, bool userInitiated )
{
// identify most suitable network for host
Network * p = networkForHost( host );
if ( !p )
- return NetworktqStatus::Unavailable;
+ return NetworkStatus::Unavailable;
- NetworktqStatus::EnumtqStatus status = p->status();
+ NetworkStatus::EnumStatus status = p->status();
TQCString appId = kapp->dcopClient()->senderId();
- if ( status == NetworktqStatus::Online )
+ if ( status == NetworkStatus::Online )
{
p->registerUsage( appId, host );
- return NetworktqStatus::Connected;
+ return NetworkStatus::Connected;
}
// if online
// register usage
// return Available
- else if ( status == NetworktqStatus::Establishing )
+ else if ( status == NetworkStatus::Establishing )
{
p->registerUsage( appId, host );
- return NetworktqStatus::RequestAccepted;
+ return NetworkStatus::RequestAccepted;
}
// if establishing
// register usage
// return Accepted
- else if ( status == NetworktqStatus::Offline || status == NetworktqStatus::ShuttingDown )
+ else if ( status == NetworkStatus::Offline || status == NetworkStatus::ShuttingDown )
{
// TODO: check on demand policy
p->registerUsage( appId, host );
- return NetworktqStatus::RequestAccepted;
+ return NetworkStatus::RequestAccepted;
}
// if offline or ShuttingDown
// check ODP::
// always or Permanent: register, return accepted
// user: check userInitiated, register, return Accepted or UserRefused
// never: return UserRefused
- else if ( status == NetworktqStatus::OfflineFailed )
+ else if ( status == NetworkStatus::OfflineFailed )
{
// TODO: check user's preference for dealing with failed networks
p->registerUsage( appId, host );
- return NetworktqStatus::RequestAccepted;
+ return NetworkStatus::RequestAccepted;
}
// if OfflineFailed
// check user's preference
- else if ( status == NetworktqStatus::OfflineDisconnected )
+ else if ( status == NetworkStatus::OfflineDisconnected )
{
- return NetworktqStatus::Unavailable;
+ return NetworkStatus::Unavailable;
}
else
- return NetworktqStatus::Unavailable;
+ return NetworkStatus::Unavailable;
// if OfflineDisconnected or NoNetworks
// return Unavailable
}
-void NetworktqStatusModule::relinquish( const TQString & host )
+void NetworkStatusModule::relinquish( const TQString & host )
{
TQCString appId = kapp->dcopClient()->senderId();
- // tqfind network currently used by app for host...
+ // find network currently used by app for host...
NetworkList::iterator end = d->networks.end();
NetworkList::iterator it = d->networks.begin();
for ( ; it != end; ++it )
@@ -195,9 +195,9 @@ void NetworktqStatusModule::relinquish( const TQString & host )
}
}
-bool NetworktqStatusModule::reportFailure( const TQString & host )
+bool NetworkStatusModule::reportFailure( const TQString & host )
{
- // tqfind network for host
+ // find network for host
// check IP record. remove IP usage record. if other IP exists, return true.
Q_UNUSED( host );
kdDebug() << k_funcinfo << "NOT IMPLEMENTED" << endl;
@@ -208,7 +208,7 @@ bool NetworktqStatusModule::reportFailure( const TQString & host )
/*
* Determine the network to use for the supplied host
*/
-Network * NetworktqStatusModule::networkForHost( const TQString & host ) const
+Network * NetworkStatusModule::networkForHost( const TQString & host ) const
{
// return a null pointer if no networks are registered
if ( d->networks.isEmpty() )
@@ -228,11 +228,11 @@ Network * NetworktqStatusModule::networkForHost( const TQString & host ) const
}
-void NetworktqStatusModule::registeredToDCOP( const TQCString & appId )
+void NetworkStatusModule::registeredToDCOP( const TQCString & appId )
{
}
-void NetworktqStatusModule::unregisteredFromDCOP( const TQCString & appId )
+void NetworkStatusModule::unregisteredFromDCOP( const TQCString & appId )
{
// unregister any networks owned by a service that has just unregistered
NetworkList::iterator it = d->networks.begin();
@@ -249,10 +249,10 @@ void NetworktqStatusModule::unregisteredFromDCOP( const TQCString & appId )
}
// SERVICE INTERFACE //
-void NetworktqStatusModule::setNetworktqStatus( const TQString & networkName, int st )
+void NetworkStatusModule::setNetworkStatus( const TQString & networkName, int st )
{
kdDebug() << k_funcinfo << endl;
- NetworktqStatus::EnumtqStatus status = (NetworktqStatus::EnumtqStatus)st;
+ NetworkStatus::EnumStatus status = (NetworkStatus::EnumStatus)st;
Network * net = 0;
NetworkList::iterator it = d->networks.begin();
NetworkList::iterator end = d->networks.end();
@@ -279,7 +279,7 @@ void NetworktqStatusModule::setNetworktqStatus( const TQString & networkName, in
for ( NetworkUsageList::iterator it = usage.begin(); it != end; ++it )
{
// only notify once per host
- if ( !notified.tqcontains( (*it).host ) )
+ if ( !notified.contains( (*it).host ) )
{
kdDebug() << "notifying statusChange of " << networkName << " to " << (int)status <<
" because " << (*it).appId << " is using " << (*it).host << endl;
@@ -289,14 +289,14 @@ void NetworktqStatusModule::setNetworktqStatus( const TQString & networkName, in
}
// if we are now anything but Establishing or Online, reset the usage records for that network
- if ( !( net->status() == NetworktqStatus::Establishing || net->status() == NetworktqStatus::Establishing ) )
+ if ( !( net->status() == NetworkStatus::Establishing || net->status() == NetworkStatus::Establishing ) )
net->removeAllUsage();
}
else
kdDebug() << k_funcinfo << "No network found by this name" << endl;
}
-void NetworktqStatusModule::registerNetwork( const TQString & networkName, const NetworktqStatus::Properties properties )
+void NetworkStatusModule::registerNetwork( const TQString & networkName, const NetworkStatus::Properties properties )
{
kdDebug() << k_funcinfo << "registering '" << networkName << "', with status " << properties.status << endl;
// TODO: check for re-registration, checking appid matches
@@ -304,13 +304,13 @@ void NetworktqStatusModule::registerNetwork( const TQString & networkName, const
d->networks.append( new Network( networkName, properties ) );
}
-void NetworktqStatusModule::unregisterNetwork( const TQString & networkName )
+void NetworkStatusModule::unregisterNetwork( const TQString & networkName )
{
// TODO: check appid
//d->networks.remove( networkName );
}
-void NetworktqStatusModule::requestShutdown( const TQString & networkName )
+void NetworkStatusModule::requestShutdown( const TQString & networkName )
{
Q_UNUSED( networkName );
kdDebug() << k_funcinfo << "NOT IMPLEMENTED" << endl;
diff --git a/networkstatus/networkstatus.desktop b/networkstatus/networkstatus.desktop
index 5fe452433..4d66b8c51 100644
--- a/networkstatus/networkstatus.desktop
+++ b/networkstatus/networkstatus.desktop
@@ -1,5 +1,5 @@
[Desktop Entry]
-Name=Network tqStatus Daemon
+Name=Network Status Daemon
Name[af]=Netwerk status bediener
Name[ar]=مراقب القرص و التنفيذ لحالة الشبكة
Name[bg]=Демон за състояние на мрежата
@@ -27,14 +27,14 @@ Name[ko]=네트워크 상태 데몬
Name[lt]=Tinklo statuso tarnyba
Name[mk]=Даемон за мрежен статус
Name[ms]=Daemon Berstatus Rangkaian
-Name[nb]=tqStatusnisse for nettverket
+Name[nb]=Statusnisse for nettverket
Name[nds]=Nettwarkstatus-Dämoon
Name[ne]=सञ्जाल स्थिति डेइमन
Name[nl]=Netwerkstatusdaemon
-Name[nn]=tqStatusnisse for nettverket
+Name[nn]=Statusnisse for nettverket
Name[pl]=Usługa stanu sieci
Name[pt]=Servidor de Estado de Rede
-Name[pt_BR]=Daemon de tqStatus da Rede
+Name[pt_BR]=Daemon de Status da Rede
Name[ru]=Служба состояния сети
Name[sk]=Daemon stavu siete
Name[sl]=Demon za omrežno stanje
@@ -52,7 +52,7 @@ Comment[bg]=Следене на състоянието на мрежата и п
Comment[ca]=Controla l'estat de les interfícies de xarxa i proporciona notificacions a les aplicacions que usen la xarxa.
Comment[cs]=Zjiš'tuje stav síťových rozhraní a upozorňuje v případě přístupu aplikací k síti.
Comment[da]=Sporer status af netværksgrænseflade og sørger for meddelelser til programmer der bruger netværket.
-Comment[de]=Überprüft den Netzwerk-tqStatus und benachrichtigt anfragende Anwendungen
+Comment[de]=Überprüft den Netzwerk-Status und benachrichtigt anfragende Anwendungen
Comment[el]=Παρακολουθεί την κατάσταση του δικτύου και παρέχει ειδοποιήσεις σε εφαρμογές που χρησιμοποιούν το δίκτυο.
Comment[es]=Sigue la pista de las interfaces de red y proporciona notificaciones a las aplicaciones que están usando la red.
Comment[et]=Jälgib võrguliideste olekut ja annab sellest võrgu vahendusel rakendustele teada.
diff --git a/networkstatus/networkstatus.h b/networkstatus/networkstatus.h
index 78de9cdcd..710afd79a 100644
--- a/networkstatus/networkstatus.h
+++ b/networkstatus/networkstatus.h
@@ -30,15 +30,15 @@
#include "network.h"
#include "serviceiface.h"
-struct NetworktqStatusStruct;
+struct NetworkStatusStruct;
-class NetworktqStatusModule : virtual public KDEDModule/*, public ClientIface, ServiceIface*/ // <-spot the multiple inheritance pb
+class NetworkStatusModule : virtual public KDEDModule/*, public ClientIface, ServiceIface*/ // <-spot the multiple inheritance pb
{
Q_OBJECT
K_DCOP
public:
- NetworktqStatusModule( const TQCString & obj );
- ~NetworktqStatusModule();
+ NetworkStatusModule( const TQCString & obj );
+ ~NetworkStatusModule();
k_dcop:
// Client interface
TQStringList networks();
@@ -48,8 +48,8 @@ k_dcop:
bool reportFailure( const TQString & host );
// TQString statusAsString();
// Service interface
- void setNetworktqStatus( const TQString & networkName, int status );
- void registerNetwork( const TQString & networkName, NetworktqStatus::Properties properties );
+ void setNetworkStatus( const TQString & networkName, int status );
+ void registerNetwork( const TQString & networkName, NetworkStatus::Properties properties );
void unregisterNetwork( const TQString & networkName );
void requestShutdown( const TQString & networkName );
k_dcop_signals:
diff --git a/networkstatus/networkstatuscommon.cpp b/networkstatus/networkstatuscommon.cpp
index 3d73e5934..574862929 100644
--- a/networkstatus/networkstatuscommon.cpp
+++ b/networkstatus/networkstatuscommon.cpp
@@ -22,32 +22,32 @@
#include "networkstatuscommon.h"
#include <kdebug.h>
-TQDataStream & operator<< ( TQDataStream & s, const NetworktqStatus::Properties p )
+TQDataStream & operator<< ( TQDataStream & s, const NetworkStatus::Properties p )
{
kdDebug() << k_funcinfo << "status is: " << (int)p.status << endl;
s << (int)p.status;
s << (int)p.onDemandPolicy;
s << p.service;
s << ( p.internet ? 1 : 0 );
- s << p.nettqmasks;
+ s << p.netmasks;
return s;
}
-TQDataStream & operator>> ( TQDataStream & s, NetworktqStatus::Properties &p )
+TQDataStream & operator>> ( TQDataStream & s, NetworkStatus::Properties &p )
{
int status, onDemandPolicy, internet;
s >> status;
kdDebug() << k_funcinfo << "status is: " << status << endl;
- p.status = ( NetworktqStatus::EnumtqStatus )status;
+ p.status = ( NetworkStatus::EnumStatus )status;
s >> onDemandPolicy;
- p.onDemandPolicy = ( NetworktqStatus::EnumOnDemandPolicy )onDemandPolicy;
+ p.onDemandPolicy = ( NetworkStatus::EnumOnDemandPolicy )onDemandPolicy;
s >> p.service;
s >> internet;
if ( internet )
p.internet = true;
else
p.internet = false;
- s >> p.nettqmasks;
+ s >> p.netmasks;
kdDebug() << k_funcinfo << "enum converted status is: " << p.status << endl;
return s;
}
diff --git a/networkstatus/networkstatuscommon.h b/networkstatus/networkstatuscommon.h
index 1b3a858e7..63c388c3f 100644
--- a/networkstatus/networkstatuscommon.h
+++ b/networkstatus/networkstatuscommon.h
@@ -24,31 +24,31 @@
#include <tqstringlist.h>
-namespace NetworktqStatus
+namespace NetworkStatus
{
- enum EnumtqStatus { NoNetworks = 1, Unreachable, OfflineDisconnected, OfflineFailed, ShuttingDown, Offline, Establishing, Online };
+ enum EnumStatus { NoNetworks = 1, Unreachable, OfflineDisconnected, OfflineFailed, ShuttingDown, Offline, Establishing, Online };
enum EnumRequestResult { RequestAccepted = 1, Connected, UserRefused, Unavailable };
enum EnumOnDemandPolicy { All, User, None, Permanent };
struct Properties
{
TQString name;
// status of the network
- EnumtqStatus status;
+ EnumStatus status;
// policy for on-demand usage as defined by the service
EnumOnDemandPolicy onDemandPolicy;
// identifier for the service
TQCString service;
// indicate that the connection is to 'the internet' - similar to default gateway in routing
bool internet;
- // list of nettqmasks that the network connects to - overridden by above internet
- TQStringList nettqmasks;
+ // list of netmasks that the network connects to - overridden by above internet
+ TQStringList netmasks;
// for future expansion consider
// EnumChargingModel - FlatRate, TimeCharge, VolumeCharged
- // EnumLinktqStatus - for WLANs - VPOOR, POOR, AVERAGE, GOOD, EXCELLENT
+ // EnumLinkStatus - for WLANs - VPOOR, POOR, AVERAGE, GOOD, EXCELLENT
};
}
-TQDataStream & operator>> ( TQDataStream & s, NetworktqStatus::Properties &p );
-TQDataStream & operator<< ( TQDataStream & s, const NetworktqStatus::Properties p );
+TQDataStream & operator>> ( TQDataStream & s, NetworkStatus::Properties &p );
+TQDataStream & operator<< ( TQDataStream & s, const NetworkStatus::Properties p );
#endif
diff --git a/networkstatus/networkstatusiface.h b/networkstatus/networkstatusiface.h
index 22929dd4d..c35a22db5 100644
--- a/networkstatus/networkstatusiface.h
+++ b/networkstatus/networkstatusiface.h
@@ -28,7 +28,7 @@
#include "networkstatuscommon.h"
-class NetworktqStatusIface : virtual public DCOPObject
+class NetworkStatusIface : virtual public DCOPObject
{
K_DCOP
k_dcop:
@@ -36,8 +36,8 @@ k_dcop:
virtual TQStringList networks() = 0;
virtual int status() = 0;
// Service interface
- virtual void setNetworktqStatus( const TQString & networkName, int status ) = 0;
- virtual void registerNetwork( NetworktqStatus::Properties properties ) = 0;
+ virtual void setNetworkStatus( const TQString & networkName, int status ) = 0;
+ virtual void registerNetwork( NetworkStatus::Properties properties ) = 0;
virtual void unregisterNetwork( const TQString & networkName ) = 0 ;
k_dcop_signals:
/**
diff --git a/networkstatus/networkstatusindicator.cpp b/networkstatus/networkstatusindicator.cpp
index 76888cfde..957d6f739 100644
--- a/networkstatus/networkstatusindicator.cpp
+++ b/networkstatus/networkstatusindicator.cpp
@@ -29,8 +29,8 @@
#include "networkstatusindicator.h"
-StatusBarNetworktqStatusIndicator::StatusBarNetworktqStatusIndicator(
- TQWidget * parent, const char * name ) : TQHBox( parent, name )/*, d( new StatusBarNetworktqStatusIndicatorPrivate )*/
+StatusBarNetworkStatusIndicator::StatusBarNetworkStatusIndicator(
+ TQWidget * parent, const char * name ) : TQHBox( parent, name )/*, d( new StatusBarNetworkStatusIndicatorPrivate )*/
{
setMargin( 2 );
setSpacing( 1 );
@@ -38,28 +38,28 @@ StatusBarNetworktqStatusIndicator::StatusBarNetworktqStatusIndicator(
label->setPixmap( SmallIcon("connect_no") );
TQToolTip::add( label, i18n( "The desktop is offline" ) );
- connect( ConnectionManager::self(), TQT_SIGNAL( statusChanged( const TQString &, NetworktqStatus::EnumtqStatus ) ),
- TQT_SLOT( networktqStatusChanged( const TQString &, NetworktqStatus::EnumtqStatus) ) );
+ connect( ConnectionManager::self(), TQT_SIGNAL( statusChanged( const TQString &, NetworkStatus::EnumStatus ) ),
+ TQT_SLOT( networkStatusChanged( const TQString &, NetworkStatus::EnumStatus) ) );
}
-void StatusBarNetworktqStatusIndicator::init()
+void StatusBarNetworkStatusIndicator::init()
{
- networktqStatusChanged( ConnectionManager::self()->status(TQString("")));
+ networkStatusChanged( ConnectionManager::self()->status(TQString("")));
}
-StatusBarNetworktqStatusIndicator::~StatusBarNetworktqStatusIndicator()
+StatusBarNetworkStatusIndicator::~StatusBarNetworkStatusIndicator()
{
}
-void StatusBarNetworktqStatusIndicator::networktqStatusChanged( const TQString & host, NetworktqStatus::EnumtqStatus status )
+void StatusBarNetworkStatusIndicator::networkStatusChanged( const TQString & host, NetworkStatus::EnumStatus status )
{
- networktqStatusChanged(status);
+ networkStatusChanged(status);
}
-void StatusBarNetworktqStatusIndicator::networktqStatusChanged( NetworktqStatus::EnumtqStatus status )
+void StatusBarNetworkStatusIndicator::networkStatusChanged( NetworkStatus::EnumStatus status )
{
- if ( status == NetworktqStatus::Online || status == NetworktqStatus::NoNetworks ) {
+ if ( status == NetworkStatus::Online || status == NetworkStatus::NoNetworks ) {
hide();
} else {
show();
diff --git a/networkstatus/networkstatusindicator.h b/networkstatus/networkstatusindicator.h
index 3c223e313..f1cfa966a 100644
--- a/networkstatus/networkstatusindicator.h
+++ b/networkstatus/networkstatusindicator.h
@@ -27,16 +27,16 @@
#include <kdemacros.h>
#include <networkstatuscommon.h>
-class StatusBarNetworktqStatusIndicator : public TQHBox
+class StatusBarNetworkStatusIndicator : public TQHBox
{
Q_OBJECT
public:
- StatusBarNetworktqStatusIndicator( TQWidget * parent, const char * name );
- virtual ~StatusBarNetworktqStatusIndicator();
+ StatusBarNetworkStatusIndicator( TQWidget * parent, const char * name );
+ virtual ~StatusBarNetworkStatusIndicator();
void init();
protected slots:
- void networktqStatusChanged( const TQString & host, NetworktqStatus::EnumtqStatus status );
- void networktqStatusChanged( NetworktqStatus::EnumtqStatus status );
+ void networkStatusChanged( const TQString & host, NetworkStatus::EnumStatus status );
+ void networkStatusChanged( NetworkStatus::EnumStatus status );
};
#endif
diff --git a/networkstatus/provideriface.h b/networkstatus/provideriface.h
index ae03b8ece..93f23103d 100644
--- a/networkstatus/provideriface.h
+++ b/networkstatus/provideriface.h
@@ -27,11 +27,11 @@ class ProviderIface : virtual public DCOPObject
{
K_DCOP
k_dcop:
- /** @return NetworktqStatus::EnumOnlinetqStatus */
+ /** @return NetworkStatus::EnumOnlineStatus */
virtual int status( const TQString & network ) = 0;
- /** @return NetworktqStatus::EnumRequestResult */
+ /** @return NetworkStatus::EnumRequestResult */
virtual int establish( const TQString & network ) = 0;
- /** @return NetworktqStatus::EnumRequestResult */
+ /** @return NetworkStatus::EnumRequestResult */
virtual int shutdown( const TQString & network ) = 0;
/** fake a failure - go directly to failed */
virtual void simulateFailure() = 0;
diff --git a/networkstatus/serviceiface.h b/networkstatus/serviceiface.h
index f84883255..1e6b423ff 100644
--- a/networkstatus/serviceiface.h
+++ b/networkstatus/serviceiface.h
@@ -31,10 +31,10 @@ class ServiceIface : virtual public DCOPObject
K_DCOP
k_dcop:
/** Change the status for the given network */
- virtual void setNetworktqStatus( const TQString & networkName, int status ) = 0;
+ virtual void setNetworkStatus( const TQString & networkName, int status ) = 0;
/** Register or update the properties for a network
NB Check that people don't use this to change status */
- virtual void registerNetwork( const TQString & networkName, NetworktqStatus::Properties properties ) = 0;
+ virtual void registerNetwork( const TQString & networkName, NetworkStatus::Properties properties ) = 0;
/**
* Indicate that this service is no longer administering the named network
* TODO: Work out the implications to clients of unregistering a network
diff --git a/networkstatus/serviceifaceimpl.cpp b/networkstatus/serviceifaceimpl.cpp
index 18a2d760e..cf5c0df99 100644
--- a/networkstatus/serviceifaceimpl.cpp
+++ b/networkstatus/serviceifaceimpl.cpp
@@ -21,16 +21,16 @@
#include "serviceifaceimpl.h"
-ServiceIfaceImpl::ServiceIfaceImpl( NetworktqStatusModule * module ) : m_module ( module )
+ServiceIfaceImpl::ServiceIfaceImpl( NetworkStatusModule * module ) : m_module ( module )
{
}
void ServiceIfaceImpl::setStatus( TQString networkName, int status )
{
- m_module->setStatus( networkName, (NetworktqStatus::EnumtqStatus)status );
+ m_module->setStatus( networkName, (NetworkStatus::EnumStatus)status );
}
-void ServiceIfaceImpl::registerNetwork( TQString networkName, NetworktqStatus::Properties properties )
+void ServiceIfaceImpl::registerNetwork( TQString networkName, NetworkStatus::Properties properties )
{
m_module->registerNetwork( networkName, properties );
}
diff --git a/networkstatus/serviceifaceimpl.h b/networkstatus/serviceifaceimpl.h
index 0f5538f97..6ffba3609 100644
--- a/networkstatus/serviceifaceimpl.h
+++ b/networkstatus/serviceifaceimpl.h
@@ -31,13 +31,13 @@
class ServiceIfaceImpl : virtual public ServiceIface
{
public:
- ServiceIfaceImpl( NetworktqStatusModule * module );
+ ServiceIfaceImpl( NetworkStatusModule * module );
void setStatus( TQString networkName, int status );
- void registerNetwork( TQString networkName, NetworktqStatus::Properties properties );
+ void registerNetwork( TQString networkName, NetworkStatus::Properties properties );
void unregisterNetwork( TQString networkName );
void requestShutdown( TQString networkName );
private:
- NetworktqStatusModule * m_module;
+ NetworkStatusModule * m_module;
};
#endif
diff --git a/networkstatus/testservice.cpp b/networkstatus/testservice.cpp
index d74f35ba4..46b19109f 100644
--- a/networkstatus/testservice.cpp
+++ b/networkstatus/testservice.cpp
@@ -31,11 +31,11 @@ TestService::TestService() : TQObject(), DCOPObject("ProviderIface")
{
kapp->dcopClient()->registerAs("testservice" );
m_service = new ServiceIface_stub( "kded", "networkstatus" );
- m_status = NetworktqStatus::Offline;
- NetworktqStatus::Properties nsp;
+ m_status = NetworkStatus::Offline;
+ NetworkStatus::Properties nsp;
nsp.internet = true;
nsp.name = "test_net";
- nsp.onDemandPolicy = NetworktqStatus::All;
+ nsp.onDemandPolicy = NetworkStatus::All;
nsp.service = kapp->dcopClient()->appId();
nsp.status = m_status;
m_service->registerNetwork( "test_net", nsp );
@@ -55,39 +55,39 @@ int TestService::status( const TQString & network )
int TestService::establish( const TQString & network )
{
Q_UNUSED( network );
- m_status = NetworktqStatus::Establishing;
- m_service->setNetworktqStatus( "test_net", (int)m_status );
- m_nexttqStatus = NetworktqStatus::Online;
- TQTimer::singleShot( 5000, this, TQT_SLOT( slottqStatusChange() ) );
- return (int)NetworktqStatus::RequestAccepted;
+ m_status = NetworkStatus::Establishing;
+ m_service->setNetworkStatus( "test_net", (int)m_status );
+ m_nextStatus = NetworkStatus::Online;
+ TQTimer::singleShot( 5000, this, TQT_SLOT( slotStatusChange() ) );
+ return (int)NetworkStatus::RequestAccepted;
}
int TestService::shutdown( const TQString & network )
{
Q_UNUSED( network );
- m_status = NetworktqStatus::ShuttingDown;
- m_service->setNetworktqStatus( "test_net", (int)m_status );
- m_nexttqStatus = NetworktqStatus::Offline;
- TQTimer::singleShot( 5000, this, TQT_SLOT( slottqStatusChange() ) );
- return (int)NetworktqStatus::RequestAccepted;
+ m_status = NetworkStatus::ShuttingDown;
+ m_service->setNetworkStatus( "test_net", (int)m_status );
+ m_nextStatus = NetworkStatus::Offline;
+ TQTimer::singleShot( 5000, this, TQT_SLOT( slotStatusChange() ) );
+ return (int)NetworkStatus::RequestAccepted;
}
void TestService::simulateFailure()
{
- m_status = NetworktqStatus::OfflineFailed;
- m_service->setNetworktqStatus( "test_net", (int)m_status );
+ m_status = NetworkStatus::OfflineFailed;
+ m_service->setNetworkStatus( "test_net", (int)m_status );
}
void TestService::simulateDisconnect()
{
- m_status = NetworktqStatus::OfflineDisconnected;
- m_service->setNetworktqStatus( "test_net", (int)m_status );
+ m_status = NetworkStatus::OfflineDisconnected;
+ m_service->setNetworkStatus( "test_net", (int)m_status );
}
-void TestService::slottqStatusChange()
+void TestService::slotStatusChange()
{
- m_status = m_nexttqStatus;
- m_service->setNetworktqStatus( "test_net", (int)m_status );
+ m_status = m_nextStatus;
+ m_service->setNetworkStatus( "test_net", (int)m_status );
}
int main( int argc, char** argv )
diff --git a/networkstatus/testservice.h b/networkstatus/testservice.h
index f448f5068..65febdca9 100644
--- a/networkstatus/testservice.h
+++ b/networkstatus/testservice.h
@@ -39,11 +39,11 @@ public:
void simulateFailure();
void simulateDisconnect();
protected slots:
- void slottqStatusChange();
+ void slotStatusChange();
private:
ServiceIface_stub * m_service;
- NetworktqStatus::EnumtqStatus m_status;
- NetworktqStatus::EnumtqStatus m_nexttqStatus;
+ NetworkStatus::EnumStatus m_status;
+ NetworkStatus::EnumStatus m_nextStatus;
};
#endif