diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-03 04:12:51 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-03 04:12:51 +0000 |
commit | 560378aaca1784ba19806a0414a32b20c744de39 (patch) | |
tree | ce0dfd7c3febf2a1adc7603d1019a8be2083c415 /networkstatus | |
parent | d4d5af1cdbd3cc65d095e0afc5b1f4260091cf5d (diff) | |
download | tdelibs-560378aaca1784ba19806a0414a32b20c744de39.tar.gz tdelibs-560378aaca1784ba19806a0414a32b20c744de39.zip |
Automated conversion for enhanced compatibility with TQt for Qt4 3.4.0 TP1
NOTE: This will not compile with Qt4 (yet), however it does compile with Qt3
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1211081 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'networkstatus')
-rw-r--r-- | networkstatus/clientiface.h | 4 | ||||
-rw-r--r-- | networkstatus/clientifaceimpl.cpp | 2 | ||||
-rw-r--r-- | networkstatus/clientifaceimpl.h | 4 | ||||
-rw-r--r-- | networkstatus/connectionmanager.cpp | 38 | ||||
-rw-r--r-- | networkstatus/connectionmanager.h | 10 | ||||
-rw-r--r-- | networkstatus/network.cpp | 18 | ||||
-rw-r--r-- | networkstatus/network.h | 18 | ||||
-rw-r--r-- | networkstatus/networkstatus.cpp | 74 | ||||
-rw-r--r-- | networkstatus/networkstatus.desktop | 10 | ||||
-rw-r--r-- | networkstatus/networkstatus.h | 12 | ||||
-rw-r--r-- | networkstatus/networkstatuscommon.cpp | 12 | ||||
-rw-r--r-- | networkstatus/networkstatuscommon.h | 16 | ||||
-rw-r--r-- | networkstatus/networkstatusiface.h | 6 | ||||
-rw-r--r-- | networkstatus/networkstatusindicator.cpp | 22 | ||||
-rw-r--r-- | networkstatus/networkstatusindicator.h | 10 | ||||
-rw-r--r-- | networkstatus/provideriface.h | 6 | ||||
-rw-r--r-- | networkstatus/serviceiface.h | 4 | ||||
-rw-r--r-- | networkstatus/serviceifaceimpl.cpp | 6 | ||||
-rw-r--r-- | networkstatus/serviceifaceimpl.h | 6 | ||||
-rw-r--r-- | networkstatus/testservice.cpp | 40 | ||||
-rw-r--r-- | networkstatus/testservice.h | 6 |
21 files changed, 162 insertions, 162 deletions
diff --git a/networkstatus/clientiface.h b/networkstatus/clientiface.h index 9fcef57a3..d42708ae6 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 NetworkStatus::EnumStatus representing the state of the connection to the given host + * @return a NetworktqStatus::EnumtqStatus 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 NetworkStatus::EnumRequestResult indicating whether the request was accepted + * @return An NetworktqStatus::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 f20957e73..e03850715 100644 --- a/networkstatus/clientifaceimpl.cpp +++ b/networkstatus/clientifaceimpl.cpp @@ -21,7 +21,7 @@ #include "clientifaceimpl.h" -ClientIfaceImpl::ClientIfaceImpl( NetworkStatusModule * module ) : m_module ( module ) +ClientIfaceImpl::ClientIfaceImpl( NetworktqStatusModule * module ) : m_module ( module ) { } diff --git a/networkstatus/clientifaceimpl.h b/networkstatus/clientifaceimpl.h index bdc99a19f..067d8be43 100644 --- a/networkstatus/clientifaceimpl.h +++ b/networkstatus/clientifaceimpl.h @@ -30,14 +30,14 @@ class ClientIfaceImpl : virtual public ClientIface { public: - ClientIfaceImpl( NetworkStatusModule * module ); + ClientIfaceImpl( NetworktqStatusModule * module ); int status( TQString host ); int request( TQString host, bool userInitiated ); void relinquish( TQString host ); bool reportFailure( TQString host ); /* TQString statusAsString();*/ private: - NetworkStatusModule * m_module; + NetworktqStatusModule * m_module; }; #endif diff --git a/networkstatus/connectionmanager.cpp b/networkstatus/connectionmanager.cpp index a28c6a124..818df2730 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)", "slotStatusChanged(TQString,int)", false ); + connectDCOPSignal( "kded", "networkstatus", "statusChange(TQString,int)", "slottqStatusChanged(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; - updateStatus(); + updatetqStatus(); } -void ConnectionManager::updateStatus() +void ConnectionManager::updatetqStatus() { - /*NetworkStatus::EnumStatus daemonStatus = (NetworkStatus::EnumStatus)d->m_stub->status( TQString::null ); - switch ( daemonStatus ) + /*NetworktqStatus::EnumtqStatus daemontqStatus = (NetworktqStatus::EnumtqStatus)d->m_stub->status( TQString::null ); + switch ( daemontqStatus ) { case Offline: case OfflineFailed: @@ -98,30 +98,30 @@ ConnectionManager::~ConnectionManager() delete d; } -NetworkStatus::EnumStatus ConnectionManager::status( const TQString & host ) +NetworktqStatus::EnumtqStatus ConnectionManager::status( const TQString & host ) { if ( d->m_state == Inactive ) - return NetworkStatus::NoNetworks; + return NetworktqStatus::NoNetworks; else - return NetworkStatus::Offline; + return NetworktqStatus::Offline; } -NetworkStatus::EnumRequestResult ConnectionManager::requestConnection( TQWidget * mainWidget, const TQString & host, bool userInitiated ) +NetworktqStatus::EnumRequestResult ConnectionManager::requestConnection( TQWidget * mainWidget, const TQString & host, bool userInitiated ) { - NetworkStatus::EnumRequestResult result; + NetworktqStatus::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 = NetworkStatus::UserRefused; + result = NetworktqStatus::UserRefused; // if offline, ask the user whether this connection should be allowed if ( d->m_state == Offline ) { if ( askToConnect( mainWidget ) ) - result = (NetworkStatus::EnumRequestResult)d->m_stub->request( host, userInitiated ); + result = (NetworktqStatus::EnumRequestResult)d->m_stub->request( host, userInitiated ); else - result = NetworkStatus::UserRefused; + result = NetworktqStatus::UserRefused; } // otherwise, just ask for the connection else - result = (NetworkStatus::EnumRequestResult)d->m_stub->request( host, userInitiated ); + result = (NetworktqStatus::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::slotStatusChanged( TQString host, int status ) +void ConnectionManager::slottqStatusChanged( TQString host, int status ) { - updateStatus(); + updatetqStatus(); // reset user initiated only flag if we are now online if ( d->m_state == Online ) d->m_userInitiatedOnly = false; - emit statusChanged( host, (NetworkStatus::EnumStatus)status ); + emit statusChanged( host, (NetworktqStatus::EnumtqStatus)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 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?" ); + 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?" ); 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::fromLatin1("OfflineModeAlwaysGoOnline") ) == KMessageBox::Yes ); + TQString::tqfromLatin1("OfflineModeAlwaysGoOnline") ) == KMessageBox::Yes ); } #include "connectionmanager.moc" diff --git a/networkstatus/connectionmanager.h b/networkstatus/connectionmanager.h index 00ca4e35c..d88f8d2a7 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(); - NetworkStatus::EnumStatus status( const TQString & host ); + NetworktqStatus::EnumtqStatus status( const TQString & host ); // check if a hostname is available. Ask user if offline. Request host - NetworkStatus::EnumRequestResult requestConnection( TQWidget* mainWidget, const TQString & host, bool userInitiated ); + NetworktqStatus::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, NetworkStatus::EnumStatus status ); + void statusChanged( const TQString & host, NetworktqStatus::EnumtqStatus status ); protected: // sets up internal state void initialise(); // reread the desktop status from the daemon and update internal state - void updateStatus(); + void updatetqStatus(); // ask if the user would like to reconnect bool askToConnect( TQWidget * mainWidget ); k_dcop: - void slotStatusChanged( TQString host, int status ); + void slottqStatusChanged( TQString host, int status ); private: ConnectionManager( TQObject *parent, const char * name ); ConnectionManagerPrivate *d; diff --git a/networkstatus/network.cpp b/networkstatus/network.cpp index fcb4a6f51..6d34950c1 100644 --- a/networkstatus/network.cpp +++ b/networkstatus/network.cpp @@ -23,29 +23,29 @@ #include "network.h" -Network::Network( const TQString name, NetworkStatus::Properties properties ) +Network::Network( const TQString name, NetworktqStatus::Properties properties ) : m_name( name ) { kdDebug() << k_funcinfo << "constructing network '" << name << "', status: " << properties.status << endl; m_status = properties.status; - m_netmasks = properties.netmasks; + m_nettqmasks = properties.nettqmasks; m_internet = properties.internet; m_service = properties.service; m_onDemandPolicy = properties.onDemandPolicy; } -NetworkStatus::EnumStatus Network::reachabilityFor( const TQString & host ) +NetworktqStatus::EnumtqStatus 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 )*/ ) { - 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; + 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; else status = m_status; @@ -82,7 +82,7 @@ void Network::unregisterUsage( const TQCString appId, const TQString host ) } } -void Network::setStatus( NetworkStatus::EnumStatus status ) +void Network::setStatus( NetworktqStatus::EnumtqStatus status ) { m_status = status; } diff --git a/networkstatus/network.h b/networkstatus/network.h index dcd2cd339..819c4d80d 100644 --- a/networkstatus/network.h +++ b/networkstatus/network.h @@ -37,30 +37,30 @@ typedef TQValueList< NetworkUsageStruct > NetworkUsageList; class Network { public: - Network( const TQString name, NetworkStatus::Properties properties ); + Network( const TQString name, NetworktqStatus::Properties properties ); Network( const Network & other ); - NetworkStatus::EnumStatus reachabilityFor( const TQString & host ); + NetworktqStatus::EnumtqStatus reachabilityFor( const TQString & host ); void registerUsage( const TQCString appId, const TQString host ); void unregisterUsage( const TQCString appId, const TQString host ); - void setStatus( NetworkStatus::EnumStatus status ); + void setStatus( NetworktqStatus::EnumtqStatus status ); void removeAllUsage(); - NetworkStatus::EnumStatus status() { return m_status; } + NetworktqStatus::EnumtqStatus status() { return m_status; } TQString name() { return m_name; } bool internet() { return m_internet; } - TQStringList netmasks() { return m_netmasks; } + TQStringList nettqmasks() { return m_nettqmasks; } TQCString service() { return m_service; } - NetworkStatus::EnumOnDemandPolicy onDemandPolicy() { return m_onDemandPolicy; } + NetworktqStatus::EnumOnDemandPolicy onDemandPolicy() { return m_onDemandPolicy; } NetworkUsageList usage() { return m_usage; } private: - NetworkStatus::EnumStatus m_status; + NetworktqStatus::EnumtqStatus m_status; TQString m_name; bool m_internet; - TQStringList m_netmasks; + TQStringList m_nettqmasks; TQCString m_service; - NetworkStatus::EnumOnDemandPolicy m_onDemandPolicy; + NetworktqStatus::EnumOnDemandPolicy m_onDemandPolicy; NetworkUsageList m_usage; }; diff --git a/networkstatus/networkstatus.cpp b/networkstatus/networkstatus.cpp index 21e34d978..0cd620e92 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 NetworkStatusModule( obj ); + return new NetworktqStatusModule( obj ); } } @@ -58,7 +58,7 @@ extern "C" { //typedef TQDict< Network > NetworkList; typedef TQValueList< Network * > NetworkList; -class NetworkStatusModule::Private +class NetworktqStatusModule::Private { public: NetworkList networks; @@ -68,7 +68,7 @@ public: // CTORS/DTORS -NetworkStatusModule::NetworkStatusModule( const TQCString & obj ) : KDEDModule( obj ) +NetworktqStatusModule::NetworktqStatusModule( const TQCString & obj ) : KDEDModule( obj ) { d = new Private; /* d->clientIface = new ClientIfaceImpl( this ); @@ -77,7 +77,7 @@ NetworkStatusModule::NetworkStatusModule( const TQCString & obj ) : KDEDModule( connect( kapp->dcopClient(), TQT_SIGNAL( applicationRegistered( const TQCString& ) ) , this, TQT_SLOT( registeredToDCOP( const TQCString& ) ) ); } -NetworkStatusModule::~NetworkStatusModule() +NetworktqStatusModule::~NetworktqStatusModule() { /* delete d->clientIface; delete d->serviceIface;*/ @@ -86,9 +86,9 @@ NetworkStatusModule::~NetworkStatusModule() // CLIENT INTERFACE -TQStringList NetworkStatusModule::networks() +TQStringList NetworktqStatusModule::networks() { - kdDebug() << k_funcinfo << " contains " << d->networks.count() << " networks" << endl; + kdDebug() << k_funcinfo << " tqcontains " << d->networks.count() << " networks" << endl; TQStringList networks; NetworkList::iterator end = d->networks.end(); NetworkList::iterator it = d->networks.begin(); @@ -97,15 +97,15 @@ TQStringList NetworkStatusModule::networks() return networks; } -int NetworkStatusModule::status( const TQString & host ) +int NetworktqStatusModule::status( const TQString & host ) { if ( host == "127.0.0.1" || host == "localhost" ) - return NetworkStatus::Online; + return NetworktqStatus::Online; Network * p = networkForHost( host ); if ( !p ) { //kdDebug() << k_funcinfo << " no networks have status for host '" << host << "'" << endl; - return (int)NetworkStatus::NoNetworks; + return (int)NetworktqStatus::NoNetworks; } else { @@ -114,65 +114,65 @@ int NetworkStatusModule::status( const TQString & host ) } } -int NetworkStatusModule::request( const TQString & host, bool userInitiated ) +int NetworktqStatusModule::request( const TQString & host, bool userInitiated ) { // identify most suitable network for host Network * p = networkForHost( host ); if ( !p ) - return NetworkStatus::Unavailable; + return NetworktqStatus::Unavailable; - NetworkStatus::EnumStatus status = p->status(); + NetworktqStatus::EnumtqStatus status = p->status(); TQCString appId = kapp->dcopClient()->senderId(); - if ( status == NetworkStatus::Online ) + if ( status == NetworktqStatus::Online ) { p->registerUsage( appId, host ); - return NetworkStatus::Connected; + return NetworktqStatus::Connected; } // if online // register usage // return Available - else if ( status == NetworkStatus::Establishing ) + else if ( status == NetworktqStatus::Establishing ) { p->registerUsage( appId, host ); - return NetworkStatus::RequestAccepted; + return NetworktqStatus::RequestAccepted; } // if establishing // register usage // return Accepted - else if ( status == NetworkStatus::Offline || status == NetworkStatus::ShuttingDown ) + else if ( status == NetworktqStatus::Offline || status == NetworktqStatus::ShuttingDown ) { // TODO: check on demand policy p->registerUsage( appId, host ); - return NetworkStatus::RequestAccepted; + return NetworktqStatus::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 == NetworkStatus::OfflineFailed ) + else if ( status == NetworktqStatus::OfflineFailed ) { // TODO: check user's preference for dealing with failed networks p->registerUsage( appId, host ); - return NetworkStatus::RequestAccepted; + return NetworktqStatus::RequestAccepted; } // if OfflineFailed // check user's preference - else if ( status == NetworkStatus::OfflineDisconnected ) + else if ( status == NetworktqStatus::OfflineDisconnected ) { - return NetworkStatus::Unavailable; + return NetworktqStatus::Unavailable; } else - return NetworkStatus::Unavailable; + return NetworktqStatus::Unavailable; // if OfflineDisconnected or NoNetworks // return Unavailable } -void NetworkStatusModule::relinquish( const TQString & host ) +void NetworktqStatusModule::relinquish( const TQString & host ) { TQCString appId = kapp->dcopClient()->senderId(); - // find network currently used by app for host... + // tqfind 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 NetworkStatusModule::relinquish( const TQString & host ) } } -bool NetworkStatusModule::reportFailure( const TQString & host ) +bool NetworktqStatusModule::reportFailure( const TQString & host ) { - // find network for host + // tqfind 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 NetworkStatusModule::reportFailure( const TQString & host ) /* * Determine the network to use for the supplied host */ -Network * NetworkStatusModule::networkForHost( const TQString & host ) const +Network * NetworktqStatusModule::networkForHost( const TQString & host ) const { // return a null pointer if no networks are registered if ( d->networks.isEmpty() ) @@ -228,11 +228,11 @@ Network * NetworkStatusModule::networkForHost( const TQString & host ) const } -void NetworkStatusModule::registeredToDCOP( const TQCString & appId ) +void NetworktqStatusModule::registeredToDCOP( const TQCString & appId ) { } -void NetworkStatusModule::unregisteredFromDCOP( const TQCString & appId ) +void NetworktqStatusModule::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 NetworkStatusModule::unregisteredFromDCOP( const TQCString & appId ) } // SERVICE INTERFACE // -void NetworkStatusModule::setNetworkStatus( const TQString & networkName, int st ) +void NetworktqStatusModule::setNetworktqStatus( const TQString & networkName, int st ) { kdDebug() << k_funcinfo << endl; - NetworkStatus::EnumStatus status = (NetworkStatus::EnumStatus)st; + NetworktqStatus::EnumtqStatus status = (NetworktqStatus::EnumtqStatus)st; Network * net = 0; NetworkList::iterator it = d->networks.begin(); NetworkList::iterator end = d->networks.end(); @@ -279,7 +279,7 @@ void NetworkStatusModule::setNetworkStatus( const TQString & networkName, int st for ( NetworkUsageList::iterator it = usage.begin(); it != end; ++it ) { // only notify once per host - if ( !notified.contains( (*it).host ) ) + if ( !notified.tqcontains( (*it).host ) ) { kdDebug() << "notifying statusChange of " << networkName << " to " << (int)status << " because " << (*it).appId << " is using " << (*it).host << endl; @@ -289,14 +289,14 @@ void NetworkStatusModule::setNetworkStatus( const TQString & networkName, int st } // if we are now anything but Establishing or Online, reset the usage records for that network - if ( !( net->status() == NetworkStatus::Establishing || net->status() == NetworkStatus::Establishing ) ) + if ( !( net->status() == NetworktqStatus::Establishing || net->status() == NetworktqStatus::Establishing ) ) net->removeAllUsage(); } else kdDebug() << k_funcinfo << "No network found by this name" << endl; } -void NetworkStatusModule::registerNetwork( const TQString & networkName, const NetworkStatus::Properties properties ) +void NetworktqStatusModule::registerNetwork( const TQString & networkName, const NetworktqStatus::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 NetworkStatusModule::registerNetwork( const TQString & networkName, const N d->networks.append( new Network( networkName, properties ) ); } -void NetworkStatusModule::unregisterNetwork( const TQString & networkName ) +void NetworktqStatusModule::unregisterNetwork( const TQString & networkName ) { // TODO: check appid //d->networks.remove( networkName ); } -void NetworkStatusModule::requestShutdown( const TQString & networkName ) +void NetworktqStatusModule::requestShutdown( const TQString & networkName ) { Q_UNUSED( networkName ); kdDebug() << k_funcinfo << "NOT IMPLEMENTED" << endl; diff --git a/networkstatus/networkstatus.desktop b/networkstatus/networkstatus.desktop index 4d66b8c51..5fe452433 100644 --- a/networkstatus/networkstatus.desktop +++ b/networkstatus/networkstatus.desktop @@ -1,5 +1,5 @@ [Desktop Entry] -Name=Network Status Daemon +Name=Network tqStatus 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]=Statusnisse for nettverket +Name[nb]=tqStatusnisse for nettverket Name[nds]=Nettwarkstatus-Dämoon Name[ne]=सञ्जाल स्थिति डेइमन Name[nl]=Netwerkstatusdaemon -Name[nn]=Statusnisse for nettverket +Name[nn]=tqStatusnisse for nettverket Name[pl]=Usługa stanu sieci Name[pt]=Servidor de Estado de Rede -Name[pt_BR]=Daemon de Status da Rede +Name[pt_BR]=Daemon de tqStatus 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-Status und benachrichtigt anfragende Anwendungen +Comment[de]=Überprüft den Netzwerk-tqStatus 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 710afd79a..78de9cdcd 100644 --- a/networkstatus/networkstatus.h +++ b/networkstatus/networkstatus.h @@ -30,15 +30,15 @@ #include "network.h" #include "serviceiface.h" -struct NetworkStatusStruct; +struct NetworktqStatusStruct; -class NetworkStatusModule : virtual public KDEDModule/*, public ClientIface, ServiceIface*/ // <-spot the multiple inheritance pb +class NetworktqStatusModule : virtual public KDEDModule/*, public ClientIface, ServiceIface*/ // <-spot the multiple inheritance pb { Q_OBJECT K_DCOP public: - NetworkStatusModule( const TQCString & obj ); - ~NetworkStatusModule(); + NetworktqStatusModule( const TQCString & obj ); + ~NetworktqStatusModule(); k_dcop: // Client interface TQStringList networks(); @@ -48,8 +48,8 @@ k_dcop: bool reportFailure( const TQString & host ); // TQString statusAsString(); // Service interface - void setNetworkStatus( const TQString & networkName, int status ); - void registerNetwork( const TQString & networkName, NetworkStatus::Properties properties ); + void setNetworktqStatus( const TQString & networkName, int status ); + void registerNetwork( const TQString & networkName, NetworktqStatus::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 574862929..3d73e5934 100644 --- a/networkstatus/networkstatuscommon.cpp +++ b/networkstatus/networkstatuscommon.cpp @@ -22,32 +22,32 @@ #include "networkstatuscommon.h" #include <kdebug.h> -TQDataStream & operator<< ( TQDataStream & s, const NetworkStatus::Properties p ) +TQDataStream & operator<< ( TQDataStream & s, const NetworktqStatus::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.netmasks; + s << p.nettqmasks; return s; } -TQDataStream & operator>> ( TQDataStream & s, NetworkStatus::Properties &p ) +TQDataStream & operator>> ( TQDataStream & s, NetworktqStatus::Properties &p ) { int status, onDemandPolicy, internet; s >> status; kdDebug() << k_funcinfo << "status is: " << status << endl; - p.status = ( NetworkStatus::EnumStatus )status; + p.status = ( NetworktqStatus::EnumtqStatus )status; s >> onDemandPolicy; - p.onDemandPolicy = ( NetworkStatus::EnumOnDemandPolicy )onDemandPolicy; + p.onDemandPolicy = ( NetworktqStatus::EnumOnDemandPolicy )onDemandPolicy; s >> p.service; s >> internet; if ( internet ) p.internet = true; else p.internet = false; - s >> p.netmasks; + s >> p.nettqmasks; kdDebug() << k_funcinfo << "enum converted status is: " << p.status << endl; return s; } diff --git a/networkstatus/networkstatuscommon.h b/networkstatus/networkstatuscommon.h index 63c388c3f..1b3a858e7 100644 --- a/networkstatus/networkstatuscommon.h +++ b/networkstatus/networkstatuscommon.h @@ -24,31 +24,31 @@ #include <tqstringlist.h> -namespace NetworkStatus +namespace NetworktqStatus { - enum EnumStatus { NoNetworks = 1, Unreachable, OfflineDisconnected, OfflineFailed, ShuttingDown, Offline, Establishing, Online }; + enum EnumtqStatus { 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 - EnumStatus status; + EnumtqStatus 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 netmasks that the network connects to - overridden by above internet - TQStringList netmasks; + // list of nettqmasks that the network connects to - overridden by above internet + TQStringList nettqmasks; // for future expansion consider // EnumChargingModel - FlatRate, TimeCharge, VolumeCharged - // EnumLinkStatus - for WLANs - VPOOR, POOR, AVERAGE, GOOD, EXCELLENT + // EnumLinktqStatus - for WLANs - VPOOR, POOR, AVERAGE, GOOD, EXCELLENT }; } -TQDataStream & operator>> ( TQDataStream & s, NetworkStatus::Properties &p ); -TQDataStream & operator<< ( TQDataStream & s, const NetworkStatus::Properties p ); +TQDataStream & operator>> ( TQDataStream & s, NetworktqStatus::Properties &p ); +TQDataStream & operator<< ( TQDataStream & s, const NetworktqStatus::Properties p ); #endif diff --git a/networkstatus/networkstatusiface.h b/networkstatus/networkstatusiface.h index c35a22db5..22929dd4d 100644 --- a/networkstatus/networkstatusiface.h +++ b/networkstatus/networkstatusiface.h @@ -28,7 +28,7 @@ #include "networkstatuscommon.h" -class NetworkStatusIface : virtual public DCOPObject +class NetworktqStatusIface : 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 setNetworkStatus( const TQString & networkName, int status ) = 0; - virtual void registerNetwork( NetworkStatus::Properties properties ) = 0; + virtual void setNetworktqStatus( const TQString & networkName, int status ) = 0; + virtual void registerNetwork( NetworktqStatus::Properties properties ) = 0; virtual void unregisterNetwork( const TQString & networkName ) = 0 ; k_dcop_signals: /** diff --git a/networkstatus/networkstatusindicator.cpp b/networkstatus/networkstatusindicator.cpp index 957d6f739..76888cfde 100644 --- a/networkstatus/networkstatusindicator.cpp +++ b/networkstatus/networkstatusindicator.cpp @@ -29,8 +29,8 @@ #include "networkstatusindicator.h" -StatusBarNetworkStatusIndicator::StatusBarNetworkStatusIndicator( - TQWidget * parent, const char * name ) : TQHBox( parent, name )/*, d( new StatusBarNetworkStatusIndicatorPrivate )*/ +StatusBarNetworktqStatusIndicator::StatusBarNetworktqStatusIndicator( + TQWidget * parent, const char * name ) : TQHBox( parent, name )/*, d( new StatusBarNetworktqStatusIndicatorPrivate )*/ { setMargin( 2 ); setSpacing( 1 ); @@ -38,28 +38,28 @@ StatusBarNetworkStatusIndicator::StatusBarNetworkStatusIndicator( label->setPixmap( SmallIcon("connect_no") ); TQToolTip::add( label, i18n( "The desktop is offline" ) ); - connect( ConnectionManager::self(), TQT_SIGNAL( statusChanged( const TQString &, NetworkStatus::EnumStatus ) ), - TQT_SLOT( networkStatusChanged( const TQString &, NetworkStatus::EnumStatus) ) ); + connect( ConnectionManager::self(), TQT_SIGNAL( statusChanged( const TQString &, NetworktqStatus::EnumtqStatus ) ), + TQT_SLOT( networktqStatusChanged( const TQString &, NetworktqStatus::EnumtqStatus) ) ); } -void StatusBarNetworkStatusIndicator::init() +void StatusBarNetworktqStatusIndicator::init() { - networkStatusChanged( ConnectionManager::self()->status(TQString(""))); + networktqStatusChanged( ConnectionManager::self()->status(TQString(""))); } -StatusBarNetworkStatusIndicator::~StatusBarNetworkStatusIndicator() +StatusBarNetworktqStatusIndicator::~StatusBarNetworktqStatusIndicator() { } -void StatusBarNetworkStatusIndicator::networkStatusChanged( const TQString & host, NetworkStatus::EnumStatus status ) +void StatusBarNetworktqStatusIndicator::networktqStatusChanged( const TQString & host, NetworktqStatus::EnumtqStatus status ) { - networkStatusChanged(status); + networktqStatusChanged(status); } -void StatusBarNetworkStatusIndicator::networkStatusChanged( NetworkStatus::EnumStatus status ) +void StatusBarNetworktqStatusIndicator::networktqStatusChanged( NetworktqStatus::EnumtqStatus status ) { - if ( status == NetworkStatus::Online || status == NetworkStatus::NoNetworks ) { + if ( status == NetworktqStatus::Online || status == NetworktqStatus::NoNetworks ) { hide(); } else { show(); diff --git a/networkstatus/networkstatusindicator.h b/networkstatus/networkstatusindicator.h index f1cfa966a..3c223e313 100644 --- a/networkstatus/networkstatusindicator.h +++ b/networkstatus/networkstatusindicator.h @@ -27,16 +27,16 @@ #include <kdemacros.h> #include <networkstatuscommon.h> -class StatusBarNetworkStatusIndicator : public TQHBox +class StatusBarNetworktqStatusIndicator : public TQHBox { Q_OBJECT public: - StatusBarNetworkStatusIndicator( TQWidget * parent, const char * name ); - virtual ~StatusBarNetworkStatusIndicator(); + StatusBarNetworktqStatusIndicator( TQWidget * parent, const char * name ); + virtual ~StatusBarNetworktqStatusIndicator(); void init(); protected slots: - void networkStatusChanged( const TQString & host, NetworkStatus::EnumStatus status ); - void networkStatusChanged( NetworkStatus::EnumStatus status ); + void networktqStatusChanged( const TQString & host, NetworktqStatus::EnumtqStatus status ); + void networktqStatusChanged( NetworktqStatus::EnumtqStatus status ); }; #endif diff --git a/networkstatus/provideriface.h b/networkstatus/provideriface.h index 93f23103d..ae03b8ece 100644 --- a/networkstatus/provideriface.h +++ b/networkstatus/provideriface.h @@ -27,11 +27,11 @@ class ProviderIface : virtual public DCOPObject { K_DCOP k_dcop: - /** @return NetworkStatus::EnumOnlineStatus */ + /** @return NetworktqStatus::EnumOnlinetqStatus */ virtual int status( const TQString & network ) = 0; - /** @return NetworkStatus::EnumRequestResult */ + /** @return NetworktqStatus::EnumRequestResult */ virtual int establish( const TQString & network ) = 0; - /** @return NetworkStatus::EnumRequestResult */ + /** @return NetworktqStatus::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 1e6b423ff..f84883255 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 setNetworkStatus( const TQString & networkName, int status ) = 0; + virtual void setNetworktqStatus( 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, NetworkStatus::Properties properties ) = 0; + virtual void registerNetwork( const TQString & networkName, NetworktqStatus::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 cf5c0df99..18a2d760e 100644 --- a/networkstatus/serviceifaceimpl.cpp +++ b/networkstatus/serviceifaceimpl.cpp @@ -21,16 +21,16 @@ #include "serviceifaceimpl.h" -ServiceIfaceImpl::ServiceIfaceImpl( NetworkStatusModule * module ) : m_module ( module ) +ServiceIfaceImpl::ServiceIfaceImpl( NetworktqStatusModule * module ) : m_module ( module ) { } void ServiceIfaceImpl::setStatus( TQString networkName, int status ) { - m_module->setStatus( networkName, (NetworkStatus::EnumStatus)status ); + m_module->setStatus( networkName, (NetworktqStatus::EnumtqStatus)status ); } -void ServiceIfaceImpl::registerNetwork( TQString networkName, NetworkStatus::Properties properties ) +void ServiceIfaceImpl::registerNetwork( TQString networkName, NetworktqStatus::Properties properties ) { m_module->registerNetwork( networkName, properties ); } diff --git a/networkstatus/serviceifaceimpl.h b/networkstatus/serviceifaceimpl.h index 6ffba3609..0f5538f97 100644 --- a/networkstatus/serviceifaceimpl.h +++ b/networkstatus/serviceifaceimpl.h @@ -31,13 +31,13 @@ class ServiceIfaceImpl : virtual public ServiceIface { public: - ServiceIfaceImpl( NetworkStatusModule * module ); + ServiceIfaceImpl( NetworktqStatusModule * module ); void setStatus( TQString networkName, int status ); - void registerNetwork( TQString networkName, NetworkStatus::Properties properties ); + void registerNetwork( TQString networkName, NetworktqStatus::Properties properties ); void unregisterNetwork( TQString networkName ); void requestShutdown( TQString networkName ); private: - NetworkStatusModule * m_module; + NetworktqStatusModule * m_module; }; #endif diff --git a/networkstatus/testservice.cpp b/networkstatus/testservice.cpp index 46b19109f..d74f35ba4 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 = NetworkStatus::Offline; - NetworkStatus::Properties nsp; + m_status = NetworktqStatus::Offline; + NetworktqStatus::Properties nsp; nsp.internet = true; nsp.name = "test_net"; - nsp.onDemandPolicy = NetworkStatus::All; + nsp.onDemandPolicy = NetworktqStatus::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 = 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; + 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; } int TestService::shutdown( const TQString & network ) { Q_UNUSED( network ); - 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; + 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; } void TestService::simulateFailure() { - m_status = NetworkStatus::OfflineFailed; - m_service->setNetworkStatus( "test_net", (int)m_status ); + m_status = NetworktqStatus::OfflineFailed; + m_service->setNetworktqStatus( "test_net", (int)m_status ); } void TestService::simulateDisconnect() { - m_status = NetworkStatus::OfflineDisconnected; - m_service->setNetworkStatus( "test_net", (int)m_status ); + m_status = NetworktqStatus::OfflineDisconnected; + m_service->setNetworktqStatus( "test_net", (int)m_status ); } -void TestService::slotStatusChange() +void TestService::slottqStatusChange() { - m_status = m_nextStatus; - m_service->setNetworkStatus( "test_net", (int)m_status ); + m_status = m_nexttqStatus; + m_service->setNetworktqStatus( "test_net", (int)m_status ); } int main( int argc, char** argv ) diff --git a/networkstatus/testservice.h b/networkstatus/testservice.h index 65febdca9..f448f5068 100644 --- a/networkstatus/testservice.h +++ b/networkstatus/testservice.h @@ -39,11 +39,11 @@ public: void simulateFailure(); void simulateDisconnect(); protected slots: - void slotStatusChange(); + void slottqStatusChange(); private: ServiceIface_stub * m_service; - NetworkStatus::EnumStatus m_status; - NetworkStatus::EnumStatus m_nextStatus; + NetworktqStatus::EnumtqStatus m_status; + NetworktqStatus::EnumtqStatus m_nexttqStatus; }; #endif |