diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
commit | 7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch) | |
tree | 8474f9b444b2756228600050f07a7ff25de532b2 /networkstatus | |
parent | f587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff) | |
download | tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'networkstatus')
-rw-r--r-- | networkstatus/clientiface.h | 14 | ||||
-rw-r--r-- | networkstatus/clientifaceimpl.cpp | 10 | ||||
-rw-r--r-- | networkstatus/clientifaceimpl.h | 12 | ||||
-rw-r--r-- | networkstatus/connectionmanager.cpp | 18 | ||||
-rw-r--r-- | networkstatus/connectionmanager.h | 16 | ||||
-rw-r--r-- | networkstatus/network.cpp | 8 | ||||
-rw-r--r-- | networkstatus/network.h | 28 | ||||
-rw-r--r-- | networkstatus/networkstatus.cpp | 50 | ||||
-rw-r--r-- | networkstatus/networkstatus.h | 34 | ||||
-rw-r--r-- | networkstatus/networkstatuscommon.cpp | 4 | ||||
-rw-r--r-- | networkstatus/networkstatuscommon.h | 12 | ||||
-rw-r--r-- | networkstatus/provideriface.h | 6 | ||||
-rw-r--r-- | networkstatus/serviceiface.h | 8 | ||||
-rw-r--r-- | networkstatus/serviceifaceimpl.cpp | 8 | ||||
-rw-r--r-- | networkstatus/serviceifaceimpl.h | 8 | ||||
-rw-r--r-- | networkstatus/testservice.cpp | 14 | ||||
-rw-r--r-- | networkstatus/testservice.h | 8 |
17 files changed, 129 insertions, 129 deletions
diff --git a/networkstatus/clientiface.h b/networkstatus/clientiface.h index d8caff6b2..9fcef57a3 100644 --- a/networkstatus/clientiface.h +++ b/networkstatus/clientiface.h @@ -31,31 +31,31 @@ class ClientIface : virtual public DCOPObject K_DCOP k_dcop: /** Get the set of networks that the daemon is aware of. Mostly for debug */ - virtual QStringList networks() = 0; + virtual TQStringList networks() = 0; /** * 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 */ - virtual int status( const QString & host) = 0; + 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 */ - virtual int request( const QString & host, bool userInitiated ) = 0; + virtual int request( const TQString & host, bool userInitiated ) = 0; /** * Indicate that a previously registered connection to the given host is no longer needed by this client * @param host The hostname being relinquished. */ - virtual void relinquish( const QString & host ) = 0; + virtual void relinquish( const TQString & host ) = 0; /** * Indicate that a communication failure has occurred for a given host * @param host The hostname for which the failure occurred. * @return True indicates the caller should try again to lookup the host, as the daemon has another IP address available. */ - virtual bool reportFailure( const QString & host ) = 0; + virtual bool reportFailure( const TQString & host ) = 0; /** * Utility method to check the daemon's status */ @@ -65,13 +65,13 @@ k_dcop_signals: * @param host The host which the application has indicated it is using * @param status The new status of the network used to reach host. */ - void statusChange( QString host, int status ); + void statusChange( TQString host, int status ); /** * The network would like to shut down - any clients using this host are to finish using it immediately and call * relinquish() when done. * @param host The host, registered as in use by applications, which is about to be disconnected. */ - void shutdownRequested( QString host ); + void shutdownRequested( TQString host ); }; #endif diff --git a/networkstatus/clientifaceimpl.cpp b/networkstatus/clientifaceimpl.cpp index a5bfb2682..f20957e73 100644 --- a/networkstatus/clientifaceimpl.cpp +++ b/networkstatus/clientifaceimpl.cpp @@ -25,27 +25,27 @@ ClientIfaceImpl::ClientIfaceImpl( NetworkStatusModule * module ) : m_module ( mo { } -int ClientIfaceImpl::status( QString host ) +int ClientIfaceImpl::status( TQString host ) { return m_module->status( host ); } -int ClientIfaceImpl::request( QString host, bool userInitiated ) +int ClientIfaceImpl::request( TQString host, bool userInitiated ) { return m_module->request( host, userInitiated ); } -void ClientIfaceImpl::relinquish( QString host ) +void ClientIfaceImpl::relinquish( TQString host ) { m_module->relinquish( host ); } -bool ClientIfaceImpl::reportFailure( QString host ) +bool ClientIfaceImpl::reportFailure( TQString host ) { return m_module->reportFailure( host ); } -// QString ClientIfaceImpl::statusAsString() +// TQString ClientIfaceImpl::statusAsString() // { // // } diff --git a/networkstatus/clientifaceimpl.h b/networkstatus/clientifaceimpl.h index 5bad7afd2..bdc99a19f 100644 --- a/networkstatus/clientifaceimpl.h +++ b/networkstatus/clientifaceimpl.h @@ -22,7 +22,7 @@ #ifndef NETWORKSTATUS_CLIENTIFACEIMPL_H #define NETWORKSTATUS_CLIENTIFACEIMPL_H -#include <qstring.h> +#include <tqstring.h> #include "clientiface.h" #include "networkstatus.h" @@ -31,11 +31,11 @@ class ClientIfaceImpl : virtual public ClientIface { public: ClientIfaceImpl( NetworkStatusModule * module ); - int status( QString host ); - int request( QString host, bool userInitiated ); - void relinquish( QString host ); - bool reportFailure( QString host ); -/* QString statusAsString();*/ + int status( TQString host ); + int request( TQString host, bool userInitiated ); + void relinquish( TQString host ); + bool reportFailure( TQString host ); +/* TQString statusAsString();*/ private: NetworkStatusModule * m_module; }; diff --git a/networkstatus/connectionmanager.cpp b/networkstatus/connectionmanager.cpp index bb98ddf8e..a28c6a124 100644 --- a/networkstatus/connectionmanager.cpp +++ b/networkstatus/connectionmanager.cpp @@ -40,13 +40,13 @@ class ConnectionManagerPrivate }; // Connection manager itself -ConnectionManager::ConnectionManager( QObject * parent, const char * name ) : DCOPObject( "ConnectionManager" ),QObject( parent, name ) +ConnectionManager::ConnectionManager( TQObject * parent, const char * name ) : DCOPObject( "ConnectionManager" ),TQObject( parent, name ) { d = new ConnectionManagerPrivate; d->m_stub = new ClientIface_stub( kapp->dcopClient(), "kded", "networkstatus" ); - connectDCOPSignal( "kded", "networkstatus", "statusChange(QString,int)", "slotStatusChanged(QString,int)", false ); + connectDCOPSignal( "kded", "networkstatus", "statusChange(TQString,int)", "slotStatusChanged(TQString,int)", false ); d->m_userInitiatedOnly = false; initialise(); } @@ -70,7 +70,7 @@ void ConnectionManager::initialise() void ConnectionManager::updateStatus() { - /*NetworkStatus::EnumStatus daemonStatus = (NetworkStatus::EnumStatus)d->m_stub->status( QString::null ); + /*NetworkStatus::EnumStatus daemonStatus = (NetworkStatus::EnumStatus)d->m_stub->status( TQString::null ); switch ( daemonStatus ) { case Offline: @@ -98,14 +98,14 @@ ConnectionManager::~ConnectionManager() delete d; } -NetworkStatus::EnumStatus ConnectionManager::status( const QString & host ) +NetworkStatus::EnumStatus ConnectionManager::status( const TQString & host ) { if ( d->m_state == Inactive ) return NetworkStatus::NoNetworks; else return NetworkStatus::Offline; } -NetworkStatus::EnumRequestResult ConnectionManager::requestConnection( QWidget * mainWidget, const QString & host, bool userInitiated ) +NetworkStatus::EnumRequestResult ConnectionManager::requestConnection( TQWidget * mainWidget, const TQString & host, bool userInitiated ) { NetworkStatus::EnumRequestResult result; // if offline and the user has previously indicated they didn't want any new connections, suppress it @@ -126,12 +126,12 @@ NetworkStatus::EnumRequestResult ConnectionManager::requestConnection( QWidget * return result; } -void ConnectionManager::relinquishConnection( const QString & host ) +void ConnectionManager::relinquishConnection( const TQString & host ) { d->m_stub->relinquish( host ); } -void ConnectionManager::slotStatusChanged( QString host, int status ) +void ConnectionManager::slotStatusChanged( TQString host, int status ) { updateStatus(); // reset user initiated only flag if we are now online @@ -141,7 +141,7 @@ void ConnectionManager::slotStatusChanged( QString host, int status ) emit statusChanged( host, (NetworkStatus::EnumStatus)status ); } -bool ConnectionManager::askToConnect( QWidget * mainWidget ) +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?" ); @@ -150,7 +150,7 @@ bool ConnectionManager::askToConnect( QWidget * 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"), - QString::fromLatin1("OfflineModeAlwaysGoOnline") ) == KMessageBox::Yes ); + TQString::fromLatin1("OfflineModeAlwaysGoOnline") ) == KMessageBox::Yes ); } #include "connectionmanager.moc" diff --git a/networkstatus/connectionmanager.h b/networkstatus/connectionmanager.h index ab1401575..00ca4e35c 100644 --- a/networkstatus/connectionmanager.h +++ b/networkstatus/connectionmanager.h @@ -22,7 +22,7 @@ class ConnectionManagerPrivate; -class ConnectionManager : public QObject, virtual public DCOPObject +class ConnectionManager : public TQObject, virtual public DCOPObject { Q_OBJECT K_DCOP @@ -30,25 +30,25 @@ class ConnectionManager : public QObject, virtual public DCOPObject static ConnectionManager* self(); enum State { Inactive, Online, Offline, Pending }; virtual ~ConnectionManager(); - NetworkStatus::EnumStatus status( const QString & host ); + NetworkStatus::EnumStatus status( const TQString & host ); // check if a hostname is available. Ask user if offline. Request host - NetworkStatus::EnumRequestResult requestConnection( QWidget* mainWidget, const QString & host, bool userInitiated ); + NetworkStatus::EnumRequestResult requestConnection( TQWidget* mainWidget, const TQString & host, bool userInitiated ); // method to relinquish a connection - void relinquishConnection( const QString & host ); + void relinquishConnection( const TQString & host ); signals: // signal that the network for a hostname is up/down - void statusChanged( const QString & host, NetworkStatus::EnumStatus 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 updateStatus(); // ask if the user would like to reconnect - bool askToConnect( QWidget * mainWidget ); + bool askToConnect( TQWidget * mainWidget ); k_dcop: - void slotStatusChanged( QString host, int status ); + void slotStatusChanged( TQString host, int status ); private: - ConnectionManager( QObject *parent, const char * name ); + ConnectionManager( TQObject *parent, const char * name ); ConnectionManagerPrivate *d; static ConnectionManager * s_self; }; diff --git a/networkstatus/network.cpp b/networkstatus/network.cpp index c1aacafc4..fcb4a6f51 100644 --- a/networkstatus/network.cpp +++ b/networkstatus/network.cpp @@ -23,7 +23,7 @@ #include "network.h" -Network::Network( const QString name, NetworkStatus::Properties properties ) +Network::Network( const TQString name, NetworkStatus::Properties properties ) : m_name( name ) { kdDebug() << k_funcinfo << "constructing network '" << name << "', status: " << properties.status << endl; @@ -34,7 +34,7 @@ Network::Network( const QString name, NetworkStatus::Properties properties ) m_onDemandPolicy = properties.onDemandPolicy; } -NetworkStatus::EnumStatus Network::reachabilityFor( const QString & host ) +NetworkStatus::EnumStatus Network::reachabilityFor( const TQString & host ) { // initially assume all networks are internet // TODO: compute reachability properly @@ -53,7 +53,7 @@ NetworkStatus::EnumStatus Network::reachabilityFor( const QString & host ) } } -void Network::registerUsage( const QCString appId, const QString host ) +void Network::registerUsage( const TQCString appId, const TQString host ) { NetworkUsageStruct nus; nus.appId = appId; @@ -68,7 +68,7 @@ void Network::registerUsage( const QCString appId, const QString host ) m_usage.append( nus ); } -void Network::unregisterUsage( const QCString appId, const QString host ) +void Network::unregisterUsage( const TQCString appId, const TQString host ) { NetworkUsageList::iterator end = m_usage.end(); for ( NetworkUsageList::iterator it = m_usage.begin(); it != end; ++it ) diff --git a/networkstatus/network.h b/networkstatus/network.h index c5162f10d..dcd2cd339 100644 --- a/networkstatus/network.h +++ b/networkstatus/network.h @@ -22,44 +22,44 @@ #ifndef NETWORKSTATUS_NETWORK_H #define NETWORKSTATUS_NETWORK_H -#include <qstringlist.h> +#include <tqstringlist.h> #include <ksharedptr.h> #include "networkstatuscommon.h" struct NetworkUsageStruct { - QCString appId; - QString host; + TQCString appId; + TQString host; }; -typedef QValueList< NetworkUsageStruct > NetworkUsageList; +typedef TQValueList< NetworkUsageStruct > NetworkUsageList; class Network { public: - Network( const QString name, NetworkStatus::Properties properties ); + Network( const TQString name, NetworkStatus::Properties properties ); Network( const Network & other ); - NetworkStatus::EnumStatus reachabilityFor( const QString & host ); - void registerUsage( const QCString appId, const QString host ); - void unregisterUsage( const QCString appId, const QString 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( NetworkStatus::EnumStatus status ); void removeAllUsage(); NetworkStatus::EnumStatus status() { return m_status; } - QString name() { return m_name; } + TQString name() { return m_name; } bool internet() { return m_internet; } - QStringList netmasks() { return m_netmasks; } - QCString service() { return m_service; } + TQStringList netmasks() { return m_netmasks; } + TQCString service() { return m_service; } NetworkStatus::EnumOnDemandPolicy onDemandPolicy() { return m_onDemandPolicy; } NetworkUsageList usage() { return m_usage; } private: NetworkStatus::EnumStatus m_status; - QString m_name; + TQString m_name; bool m_internet; - QStringList m_netmasks; - QCString m_service; + TQStringList m_netmasks; + TQCString m_service; NetworkStatus::EnumOnDemandPolicy m_onDemandPolicy; NetworkUsageList m_usage; }; diff --git a/networkstatus/networkstatus.cpp b/networkstatus/networkstatus.cpp index 900ac77f5..092f2b392 100644 --- a/networkstatus/networkstatus.cpp +++ b/networkstatus/networkstatus.cpp @@ -21,9 +21,9 @@ #include "networkstatus.h" -#include <qdict.h> -#include <qtimer.h> -#include <qvaluelist.h> +#include <tqdict.h> +#include <tqtimer.h> +#include <tqvaluelist.h> #include <dcopclient.h> #include <kapplication.h> @@ -35,7 +35,7 @@ #include <kdepimmacros.h> extern "C" { - KDE_EXPORT KDEDModule* create_networkstatus( const QCString& obj ) + KDE_EXPORT KDEDModule* create_networkstatus( const TQCString& obj ) { return new NetworkStatusModule( obj ); } @@ -43,8 +43,8 @@ extern "C" { // INTERNALLY USED STRUCTS AND TYPEDEFS -//typedef QDict< Network > NetworkList; -typedef QValueList< Network * > NetworkList; +//typedef TQDict< Network > NetworkList; +typedef TQValueList< Network * > NetworkList; class NetworkStatusModule::Private { @@ -56,13 +56,13 @@ public: // CTORS/DTORS -NetworkStatusModule::NetworkStatusModule( const QCString & obj ) : KDEDModule( obj ) +NetworkStatusModule::NetworkStatusModule( const TQCString & obj ) : KDEDModule( obj ) { d = new Private; /* d->clientIface = new ClientIfaceImpl( this ); d->serviceIface = new ServiceIfaceImpl( this );*/ - connect( kapp->dcopClient(), SIGNAL( applicationRemoved( const QCString& ) ) , this, SLOT( unregisteredFromDCOP( const QCString& ) ) ); - connect( kapp->dcopClient(), SIGNAL( applicationRegistered( const QCString& ) ) , this, SLOT( registeredToDCOP( const QCString& ) ) ); + connect( kapp->dcopClient(), TQT_SIGNAL( applicationRemoved( const TQCString& ) ) , this, TQT_SLOT( unregisteredFromDCOP( const TQCString& ) ) ); + connect( kapp->dcopClient(), TQT_SIGNAL( applicationRegistered( const TQCString& ) ) , this, TQT_SLOT( registeredToDCOP( const TQCString& ) ) ); } NetworkStatusModule::~NetworkStatusModule() @@ -74,10 +74,10 @@ NetworkStatusModule::~NetworkStatusModule() // CLIENT INTERFACE -QStringList NetworkStatusModule::networks() +TQStringList NetworkStatusModule::networks() { kdDebug() << k_funcinfo << " contains " << d->networks.count() << " networks" << endl; - QStringList networks; + TQStringList networks; NetworkList::iterator end = d->networks.end(); NetworkList::iterator it = d->networks.begin(); for ( ; it != end; ++it ) @@ -85,7 +85,7 @@ QStringList NetworkStatusModule::networks() return networks; } -int NetworkStatusModule::status( const QString & host ) +int NetworkStatusModule::status( const TQString & host ) { if ( host == "127.0.0.1" || host == "localhost" ) return NetworkStatus::Online; @@ -102,7 +102,7 @@ int NetworkStatusModule::status( const QString & host ) } } -int NetworkStatusModule::request( const QString & host, bool userInitiated ) +int NetworkStatusModule::request( const TQString & host, bool userInitiated ) { // identify most suitable network for host Network * p = networkForHost( host ); @@ -110,7 +110,7 @@ int NetworkStatusModule::request( const QString & host, bool userInitiated ) return NetworkStatus::Unavailable; NetworkStatus::EnumStatus status = p->status(); - QCString appId = kapp->dcopClient()->senderId(); + TQCString appId = kapp->dcopClient()->senderId(); if ( status == NetworkStatus::Online ) { p->registerUsage( appId, host ); @@ -157,9 +157,9 @@ int NetworkStatusModule::request( const QString & host, bool userInitiated ) // return Unavailable } -void NetworkStatusModule::relinquish( const QString & host ) +void NetworkStatusModule::relinquish( const TQString & host ) { - QCString appId = kapp->dcopClient()->senderId(); + TQCString appId = kapp->dcopClient()->senderId(); // find network currently used by app for host... NetworkList::iterator end = d->networks.end(); NetworkList::iterator it = d->networks.begin(); @@ -183,7 +183,7 @@ void NetworkStatusModule::relinquish( const QString & host ) } } -bool NetworkStatusModule::reportFailure( const QString & host ) +bool NetworkStatusModule::reportFailure( const TQString & host ) { // find network for host // check IP record. remove IP usage record. if other IP exists, return true. @@ -196,7 +196,7 @@ bool NetworkStatusModule::reportFailure( const QString & host ) /* * Determine the network to use for the supplied host */ -Network * NetworkStatusModule::networkForHost( const QString & host ) const +Network * NetworkStatusModule::networkForHost( const TQString & host ) const { // return a null pointer if no networks are registered if ( d->networks.isEmpty() ) @@ -216,11 +216,11 @@ Network * NetworkStatusModule::networkForHost( const QString & host ) const } -void NetworkStatusModule::registeredToDCOP( const QCString & appId ) +void NetworkStatusModule::registeredToDCOP( const TQCString & appId ) { } -void NetworkStatusModule::unregisteredFromDCOP( const QCString & appId ) +void NetworkStatusModule::unregisteredFromDCOP( const TQCString & appId ) { // unregister any networks owned by a service that has just unregistered NetworkList::iterator it = d->networks.begin(); @@ -237,7 +237,7 @@ void NetworkStatusModule::unregisteredFromDCOP( const QCString & appId ) } // SERVICE INTERFACE // -void NetworkStatusModule::setNetworkStatus( const QString & networkName, int st ) +void NetworkStatusModule::setNetworkStatus( const TQString & networkName, int st ) { kdDebug() << k_funcinfo << endl; NetworkStatus::EnumStatus status = (NetworkStatus::EnumStatus)st; @@ -263,7 +263,7 @@ void NetworkStatusModule::setNetworkStatus( const QString & networkName, int st // notify for each host in use on that network NetworkUsageList usage = net->usage(); NetworkUsageList::iterator end = usage.end(); - QStringList notified; + TQStringList notified; for ( NetworkUsageList::iterator it = usage.begin(); it != end; ++it ) { // only notify once per host @@ -284,7 +284,7 @@ void NetworkStatusModule::setNetworkStatus( const QString & networkName, int st kdDebug() << k_funcinfo << "No network found by this name" << endl; } -void NetworkStatusModule::registerNetwork( const QString & networkName, const NetworkStatus::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 @@ -292,13 +292,13 @@ void NetworkStatusModule::registerNetwork( const QString & networkName, const Ne d->networks.append( new Network( networkName, properties ) ); } -void NetworkStatusModule::unregisterNetwork( const QString & networkName ) +void NetworkStatusModule::unregisterNetwork( const TQString & networkName ) { // TODO: check appid //d->networks.remove( networkName ); } -void NetworkStatusModule::requestShutdown( const QString & networkName ) +void NetworkStatusModule::requestShutdown( const TQString & networkName ) { Q_UNUSED( networkName ); kdDebug() << k_funcinfo << "NOT IMPLEMENTED" << endl; diff --git a/networkstatus/networkstatus.h b/networkstatus/networkstatus.h index b4281b961..710afd79a 100644 --- a/networkstatus/networkstatus.h +++ b/networkstatus/networkstatus.h @@ -37,41 +37,41 @@ class NetworkStatusModule : virtual public KDEDModule/*, public ClientIface, Ser Q_OBJECT K_DCOP public: - NetworkStatusModule( const QCString & obj ); + NetworkStatusModule( const TQCString & obj ); ~NetworkStatusModule(); k_dcop: // Client interface - QStringList networks(); - int status( const QString & host ); - int request( const QString & host, bool userInitiated ); - void relinquish( const QString & host ); - bool reportFailure( const QString & host ); -// QString statusAsString(); + TQStringList networks(); + int status( const TQString & host ); + int request( const TQString & host, bool userInitiated ); + void relinquish( const TQString & host ); + bool reportFailure( const TQString & host ); +// TQString statusAsString(); // Service interface - void setNetworkStatus( const QString & networkName, int status ); - void registerNetwork( const QString & networkName, NetworkStatus::Properties properties ); - void unregisterNetwork( const QString & networkName ); - void requestShutdown( const QString & networkName ); + 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: /** * A status change occurred for the network(s) used to connect to the given host. * @param host The host which the application has indicated it is using * @param status The new status of the network used to reach host. */ - void statusChange( QString host, int status ); + void statusChange( TQString host, int status ); /** * The network would like to shut down - any clients using this host are to finish using it immediately and call * relinquish() when done. * @param host The host, registered as in use by applications, which is about to be disconnected. */ - void shutdownRequested( QString host ); + void shutdownRequested( TQString host ); protected slots: - void registeredToDCOP( const QCString& appId ); - void unregisteredFromDCOP( const QCString& appId ); + void registeredToDCOP( const TQCString& appId ); + void unregisteredFromDCOP( const TQCString& appId ); protected: - // QStringList networkUsers( const QString & networkName ); - Network * networkForHost( const QString & host ) const; + // TQStringList networkUsers( const TQString & networkName ); + Network * networkForHost( const TQString & host ) const; private: class Private; diff --git a/networkstatus/networkstatuscommon.cpp b/networkstatus/networkstatuscommon.cpp index db9f137ec..574862929 100644 --- a/networkstatus/networkstatuscommon.cpp +++ b/networkstatus/networkstatuscommon.cpp @@ -22,7 +22,7 @@ #include "networkstatuscommon.h" #include <kdebug.h> -QDataStream & operator<< ( QDataStream & s, const NetworkStatus::Properties p ) +TQDataStream & operator<< ( TQDataStream & s, const NetworkStatus::Properties p ) { kdDebug() << k_funcinfo << "status is: " << (int)p.status << endl; s << (int)p.status; @@ -33,7 +33,7 @@ QDataStream & operator<< ( QDataStream & s, const NetworkStatus::Properties p ) return s; } -QDataStream & operator>> ( QDataStream & s, NetworkStatus::Properties &p ) +TQDataStream & operator>> ( TQDataStream & s, NetworkStatus::Properties &p ) { int status, onDemandPolicy, internet; s >> status; diff --git a/networkstatus/networkstatuscommon.h b/networkstatus/networkstatuscommon.h index e26d01688..63c388c3f 100644 --- a/networkstatus/networkstatuscommon.h +++ b/networkstatus/networkstatuscommon.h @@ -22,7 +22,7 @@ #ifndef NETWORKSTATUS_COMMON_H #define NETWORKSTATUS_COMMON_H -#include <qstringlist.h> +#include <tqstringlist.h> namespace NetworkStatus { @@ -31,24 +31,24 @@ namespace NetworkStatus enum EnumOnDemandPolicy { All, User, None, Permanent }; struct Properties { - QString name; + TQString name; // status of the network EnumStatus status; // policy for on-demand usage as defined by the service EnumOnDemandPolicy onDemandPolicy; // identifier for the service - QCString 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 - QStringList netmasks; + TQStringList netmasks; // for future expansion consider // EnumChargingModel - FlatRate, TimeCharge, VolumeCharged // EnumLinkStatus - for WLANs - VPOOR, POOR, AVERAGE, GOOD, EXCELLENT }; } -QDataStream & operator>> ( QDataStream & s, NetworkStatus::Properties &p ); -QDataStream & operator<< ( QDataStream & s, const NetworkStatus::Properties p ); +TQDataStream & operator>> ( TQDataStream & s, NetworkStatus::Properties &p ); +TQDataStream & operator<< ( TQDataStream & s, const NetworkStatus::Properties p ); #endif diff --git a/networkstatus/provideriface.h b/networkstatus/provideriface.h index f49c276d2..93f23103d 100644 --- a/networkstatus/provideriface.h +++ b/networkstatus/provideriface.h @@ -28,11 +28,11 @@ class ProviderIface : virtual public DCOPObject K_DCOP k_dcop: /** @return NetworkStatus::EnumOnlineStatus */ - virtual int status( const QString & network ) = 0; + virtual int status( const TQString & network ) = 0; /** @return NetworkStatus::EnumRequestResult */ - virtual int establish( const QString & network ) = 0; + virtual int establish( const TQString & network ) = 0; /** @return NetworkStatus::EnumRequestResult */ - virtual int shutdown( const QString & network ) = 0; + virtual int shutdown( const TQString & network ) = 0; /** fake a failure - go directly to failed */ virtual void simulateFailure() = 0; /** fake a network disconnect - go directly to offlinedisconnected */ diff --git a/networkstatus/serviceiface.h b/networkstatus/serviceiface.h index 60232d928..1e6b423ff 100644 --- a/networkstatus/serviceiface.h +++ b/networkstatus/serviceiface.h @@ -31,21 +31,21 @@ class ServiceIface : virtual public DCOPObject K_DCOP k_dcop: /** Change the status for the given network */ - virtual void setNetworkStatus( const QString & 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 QString & networkName, NetworkStatus::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 * - maybe this method needs more parameters to give them a clue. */ - virtual void unregisterNetwork( const QString & networkName ) = 0; + virtual void unregisterNetwork( const TQString & networkName ) = 0; /** * Tell the daemon that the service would like to shut down this network connection, * and to notify clients using it so they can stop using it in a controlled manner */ - virtual void requestShutdown( const QString & networkName ) = 0; + virtual void requestShutdown( const TQString & networkName ) = 0; }; #endif diff --git a/networkstatus/serviceifaceimpl.cpp b/networkstatus/serviceifaceimpl.cpp index fdbc9eec0..cf5c0df99 100644 --- a/networkstatus/serviceifaceimpl.cpp +++ b/networkstatus/serviceifaceimpl.cpp @@ -25,22 +25,22 @@ ServiceIfaceImpl::ServiceIfaceImpl( NetworkStatusModule * module ) : m_module ( { } -void ServiceIfaceImpl::setStatus( QString networkName, int status ) +void ServiceIfaceImpl::setStatus( TQString networkName, int status ) { m_module->setStatus( networkName, (NetworkStatus::EnumStatus)status ); } -void ServiceIfaceImpl::registerNetwork( QString networkName, NetworkStatus::Properties properties ) +void ServiceIfaceImpl::registerNetwork( TQString networkName, NetworkStatus::Properties properties ) { m_module->registerNetwork( networkName, properties ); } -void ServiceIfaceImpl::unregisterNetwork( QString networkName ) +void ServiceIfaceImpl::unregisterNetwork( TQString networkName ) { m_module->unregisterNetwork( networkName ); } -void ServiceIfaceImpl::requestShutdown( QString networkName ) +void ServiceIfaceImpl::requestShutdown( TQString networkName ) { m_module->requestShutdown( networkName ); } diff --git a/networkstatus/serviceifaceimpl.h b/networkstatus/serviceifaceimpl.h index 703a15c64..6ffba3609 100644 --- a/networkstatus/serviceifaceimpl.h +++ b/networkstatus/serviceifaceimpl.h @@ -32,10 +32,10 @@ class ServiceIfaceImpl : virtual public ServiceIface { public: ServiceIfaceImpl( NetworkStatusModule * module ); - void setStatus( QString networkName, int status ); - void registerNetwork( QString networkName, NetworkStatus::Properties properties ); - void unregisterNetwork( QString networkName ); - void requestShutdown( QString networkName ); + void setStatus( TQString networkName, int status ); + void registerNetwork( TQString networkName, NetworkStatus::Properties properties ); + void unregisterNetwork( TQString networkName ); + void requestShutdown( TQString networkName ); private: NetworkStatusModule * m_module; }; diff --git a/networkstatus/testservice.cpp b/networkstatus/testservice.cpp index a1552d27d..46b19109f 100644 --- a/networkstatus/testservice.cpp +++ b/networkstatus/testservice.cpp @@ -19,7 +19,7 @@ Boston, MA 02110-1301, USA. */ -#include <qtimer.h> +#include <tqtimer.h> #include <dcopclient.h> #include <kapplication.h> #include "provideriface.h" @@ -27,7 +27,7 @@ #include "testservice.h" #include "serviceiface_stub.h" -TestService::TestService() : QObject(), DCOPObject("ProviderIface") +TestService::TestService() : TQObject(), DCOPObject("ProviderIface") { kapp->dcopClient()->registerAs("testservice" ); m_service = new ServiceIface_stub( "kded", "networkstatus" ); @@ -46,29 +46,29 @@ TestService::~TestService() delete m_service; } -int TestService::status( const QString & network ) +int TestService::status( const TQString & network ) { Q_UNUSED( network ); return (int)m_status; } -int TestService::establish( const QString & 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; - QTimer::singleShot( 5000, this, SLOT( slotStatusChange() ) ); + TQTimer::singleShot( 5000, this, TQT_SLOT( slotStatusChange() ) ); return (int)NetworkStatus::RequestAccepted; } -int TestService::shutdown( const QString & network ) +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; - QTimer::singleShot( 5000, this, SLOT( slotStatusChange() ) ); + TQTimer::singleShot( 5000, this, TQT_SLOT( slotStatusChange() ) ); return (int)NetworkStatus::RequestAccepted; } diff --git a/networkstatus/testservice.h b/networkstatus/testservice.h index 202c3e593..65febdca9 100644 --- a/networkstatus/testservice.h +++ b/networkstatus/testservice.h @@ -27,15 +27,15 @@ class ServiceIface_stub; -class TestService : virtual public QObject, ProviderIface +class TestService : virtual public TQObject, ProviderIface { Q_OBJECT public: TestService(); virtual ~TestService(); - int status( const QString & network ); - int establish( const QString & network ); - int shutdown( const QString & network ); + int status( const TQString & network ); + int establish( const TQString & network ); + int shutdown( const TQString & network ); void simulateFailure(); void simulateDisconnect(); protected slots: |