Remove additional obsolete files

pull/1/head
Timothy Pearson 12 years ago
parent 3f5288877b
commit c5bbf78c1b

@ -55,8 +55,7 @@ tde_add_tdeinit_executable( knetworkmanager AUTOMOC
knetworkmanager-wired_device_tray.cpp knetworkmanager-wireless_device_tray.cpp
knetworkmanager-wireless_menuitem.cpp knetworkmanager-menuitem.cpp
knetworkmanager-menu_subhead.cpp
knetworkmanager-nmsettings.cpp
sha1.cpp md5.cpp xmlmarshaller.cpp
sha1.cpp md5.cpp
knetworkmanager-wireless_network.cpp knetworkmanager-wireless_manager.cpp
knetworkmanager-connection_editor.cpp knetworkmanager-plugin.cpp knetworkmanager-vpnplugin.cpp
knetworkmanager-pluginmanager.cpp knetworkmanager-vpnservice.cpp knetworkmanager-vpnmanager.cpp

@ -1,162 +0,0 @@
/***************************************************************************
*
* knetworkmanager-nminfo_dbus.cpp - A NetworkManager frontend for KDE
*
* Copyright (C) 2005, 2006 Novell, Inc.
*
* Author: Timo Hoenig <thoenig@suse.de>, <thoenig@nouse.net>
* Valentine Sinitsyn <e_val@inbox.ru>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
**************************************************************************/
#include <stdlib.h>
#include <kdebug.h>
#include <NetworkManager.h>
#include <tqdbusobjectpath.h>
#include <tqdbusconnection.h>
#include "knetworkmanager.h"
#include "knetworkmanager-nmsettings.h"
#include "knetworkmanager-connection_setting.h"
#include "knetworkmanager-connection_store.h"
#include "knetworkmanager-connection.h"
#if !defined(NM_CHECK_VERSION)
#define NM_CHECK_VERSION(x,y,z) 0
#endif
class NMSettingsPrivate
{
public:
NMSettingsPrivate()
: obj_path_index(0)
{
}
~NMSettingsPrivate()
{
}
int obj_path_index;
};
NMSettings* NMSettings::_instance = NULL;
NMSettings* NMSettings::getInstance()
{
// return singleton instance
if (_instance)
return _instance;
return (_instance = new NMSettings());
}
NMSettings::NMSettings()
{
d = new NMSettingsPrivate();
TQT_DBusConnection conn = TQT_DBusConnection::systemBus();
kdDebug() << "NMSettings::NMSettings" << endl;
#if NM_CHECK_VERSION(0,8,992)
if (!conn.requestName("org.freedesktop.NetworkManagerUserSettings"))
kdError() << "req name failed for " << "org.freedesktop.NetworkManagerUserSettings" << endl;
#else
// request the name for the settings interface
if (!conn.requestName(NM_DBUS_SERVICE_USER_SETTINGS))
kdError() << "req name failed for " << NM_DBUS_SERVICE_USER_SETTINGS << endl;
#endif
// request the name for the connections here too
if (!conn.requestName(NM_DBUS_IFACE_SETTINGS_CONNECTION))
kdError() << "req name failed for " << NM_DBUS_IFACE_SETTINGS_CONNECTION << endl;
// request the name for the connections here too
if (!conn.requestName(NM_DBUS_IFACE_SETTINGS_CONNECTION_SECRETS))
kdError() << "req name failed for " << NM_DBUS_IFACE_SETTINGS_CONNECTION_SECRETS << endl;
// register on the DBus
if (!conn.registerObject(objectPath(), this))
kdError() << "registerobjectpath failed" << endl;
ConnectionStore* cstore = ConnectionStore::getInstance();
// we need to get informed about new connections...
connect(cstore, TQT_SIGNAL(signalConnectionAdded(ConnectionSettings::Connection*)), this, TQT_SLOT(slotNewConnection(ConnectionSettings::Connection*)));
}
NMSettings::~NMSettings()
{
delete d;
TQT_DBusConnection conn = TQT_DBusConnection::systemBus();
conn.unregisterObject(NM_DBUS_PATH_SETTINGS);
}
bool NMSettings::handleSignalSend(const TQT_DBusMessage& reply)
{
TQT_DBusConnection::systemBus().send(reply);
return true;
}
TQString NMSettings::objectPath() const
{
return TQString(NM_DBUS_PATH_SETTINGS);
}
bool NMSettings::ListConnections(TQValueList<TQT_DBusObjectPath>& connections, TQT_DBusError& /*error*/)
{
// return connections
ConnectionStore* cstore = ConnectionStore::getInstance();
TQValueList<ConnectionSettings::Connection*> conns = cstore->getConnections();
for (TQValueList<ConnectionSettings::Connection*>::Iterator it = conns.begin(); it != conns.end(); ++it)
{
ConnectionSettings::Connection* conn = (*it);
connections.append(conn->getObjectPath());
}
return true;
}
void NMSettings::handleMethodReply(const TQT_DBusMessage& reply)
{
TQT_DBusConnection::systemBus().send(reply);
}
TQT_DBusObjectPath
NMSettings::getObjPathForConnection()
{
// just increase the number for this connection
TQT_DBusObjectPath obj_path(NM_DBUS_PATH_SETTINGS_CONNECTION"/");
obj_path += TQString::number(d->obj_path_index++);
return obj_path;
}
void
NMSettings::slotNewConnection(ConnectionSettings::Connection* conn)
{
emitNewConnection(conn->getObjectPath());
}
#include "knetworkmanager-nmsettings.moc"

@ -1,77 +0,0 @@
/***************************************************************************
*
* knetworkmanager-nminfo_dbus.h - A NetworkManager frontend for KDE
*
* Copyright (C) 2005, 2006 Novell, Inc.
*
* Author: Helmut Schaa <hschaa@suse.de>, <Helmut.Schaa@gmx.de>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
**************************************************************************/
#ifndef KNETWORKMANAGER_NMSETTINGS_H
#define KNETWORKMANAGER_NMSETTINGS_H
#include <tqobject.h>
#include "knetworkmanager-connection_setting.h"
#include "dbus/networkmanagersettings.h"
class Network;
class TQT_DBusObjectPath;
class NMSettingsPrivate;
class NMSettings : public TQObject, DBus::SettingsInterface
{
Q_OBJECT
public:
/* get singleton */
static NMSettings* getInstance();
~NMSettings();
/* request the required interface from the DBus */
// void requestName (DBusMessage*);
/* functions for handling method calls sended _by_ NetworkManager */
// void getConnections (DBusMessage*);
bool handleSignalSend(const TQT_DBusMessage& reply);
TQString objectPath() const;
bool ListConnections(TQValueList<TQT_DBusObjectPath>& connections, TQT_DBusError& error);
void handleMethodReply(const TQT_DBusMessage& reply);
/* get Connection from obj_path */
TQT_DBusObjectPath getObjPathForConnection();
public slots:
/* notification about new connections */
void slotNewConnection (ConnectionSettings::Connection*);
private:
NMSettingsPrivate* d;
/* private constructor -> singleton */
NMSettings();
/* functions for sending signals/methodcalls _to_ NetworkManager */
void signalNewConnection (const char*);
/* pointer to the singleton class */
static NMSettings* _instance;
};
#endif /* KNETWORKMANAGER_NMSETTINGS_H */

@ -41,24 +41,20 @@
#include "knetworkmanager-nm_proxy.h"
#include "knetworkmanager-devicestore.h"
#if !defined(NM_CHECK_VERSION)
#define NM_CHECK_VERSION(x,y,z) 0
#endif
TQValueList<WirelessNetwork> WirelessManager::getWirelessNetworks(TDENetworkDevice* dev, TQ_UINT32 match)
{
TQValueList<WirelessNetwork> nets;
TQValueList<AccessPoint*> aps;
TQValueList<TDENetworkWiFiAPInfo*> aps;
// fetch all APs
aps = WirelessManager::getAccessPoints(dev);
// now group the APs together according to their security settings
for (TQValueList<AccessPoint*>::Iterator apit = aps.begin(); apit != aps.end(); ++apit)
for (TQValueList<TDENetworkWiFiAPInfo*>::Iterator apit = aps.begin(); apit != aps.end(); ++apit)
{
bool found = false;
// no hidden APs
AccessPoint * ap = *apit;
TDENetworkWiFiAPInfo * ap = *apit;
if ( ap ) {
if (!ap->isValid())
continue;
@ -100,22 +96,18 @@ TQValueList<WirelessNetwork> WirelessManager::getWirelessNetworks(TDENetworkDevi
return nets;
}
TQValueList<AccessPoint*> WirelessManager::getAccessPoints(TDENetworkDevice* dev)
TQValueList<TDENetworkWiFiAPInfo*> WirelessManager::getAccessPoints(TDENetworkDevice* dev)
{
// build up AP list depending on one device or on all devices
if (dev) {
return dev->accessPoints();
}
else {
TQValueList<AccessPoint *> aps;
TQValueList<TDENetworkWiFiAPInfo *> aps;
DeviceStore* store = DeviceStore::getInstance();
if (store)
{
#if NM_CHECK_VERSION(0,8,992)
TQValueList<Device*> devs = store->getDevices(NM_DEVICE_TYPE_WIFI);
#else
TQValueList<Device*> devs = store->getDevices(DEVICE_TYPE_802_11_WIRELESS);
#endif
for (TQValueList<Device*>::Iterator it = devs.begin(); it != devs.end(); ++it)
{
TDENetworkDevice* wdev = dynamic_cast<TDENetworkDevice*>(*it);
@ -147,22 +139,18 @@ TQValueList<TDEWiFiConnection*> WirelessManager::getWirelessConnections()
return conns;
}
TQValueList<AccessPoint*> WirelessManager::getAccessPointsForEssid(TQByteArray essid, TDENetworkDevice* dev)
TQValueList<TDENetworkWiFiAPInfo*> WirelessManager::getAccessPointsForEssid(TQByteArray essid, TDENetworkDevice* dev)
{
// build up AP list depending on one device or on all devices
if (dev)
return dev->accessPointsForEssid(essid);
else
{
TQValueList<AccessPoint*> aps;
TQValueList<TDENetworkWiFiAPInfo*> aps;
DeviceStore* store = DeviceStore::getInstance();
if (store)
{
#if NM_CHECK_VERSION(0,8,992)
TQValueList<Device*> devs = store->getDevices(NM_DEVICE_TYPE_WIFI);
#else
TQValueList<Device*> devs = store->getDevices(DEVICE_TYPE_802_11_WIRELESS);
#endif
for (TQValueList<Device*>::Iterator it = devs.begin(); it != devs.end(); ++it)
{
TDENetworkDevice* wdev = dynamic_cast<TDENetworkDevice*>(*it);

@ -47,13 +47,13 @@ class WirelessManager
static TQValueList<WirelessNetwork> getWirelessNetworks(TDENetworkDevice* dev = 0, TQ_UINT32 match = WirelessNetwork::MATCH_SSID);
// get all aps from either one device or from all available devices
static TQValueList<AccessPoint*> getAccessPoints(TDENetworkDevice* dev = 0);
static TQValueList<TDENetworkWiFiAPInfo*> getAccessPoints(TDENetworkDevice* dev = 0);
// get a list of all known wireless connections
static TQValueList<TDEWiFiConnection*> getWirelessConnections();
// get a list of all APs with a specific SSID
static TQValueList<AccessPoint*> getAccessPointsForEssid(TQByteArray, TDENetworkDevice* dev = 0);
static TQValueList<TDENetworkWiFiAPInfo*> getAccessPointsForEssid(TQByteArray, TDENetworkDevice* dev = 0);
};

@ -22,24 +22,17 @@
*
**************************************************************************/
// NM includes
#include <NetworkManager.h>
// KNM includes
#include "knetworkmanager.h"
#include "knetworkmanager-connection.h"
#include "knetworkmanager-accesspoint.h"
#include "knetworkmanager-wireless_network.h"
// KDE includes
// TDE includes
#include <kdebug.h>
// TQt includes
#include <tqhostaddress.h>
#include <tqvaluelist.h>
using namespace ConnectionSettings;
class WirelessNetworkPrivate
{
public:
@ -55,7 +48,7 @@ class WirelessNetworkPrivate
bool active;
TQ_UINT32 match;
TQValueList<const AccessPoint*> aps;
TQValueList<const TDENetworkWiFiAPInfo*> aps;
};
WirelessNetwork::WirelessNetwork(const WirelessNetwork& other)
@ -84,7 +77,7 @@ WirelessNetwork& WirelessNetwork::operator= (const WirelessNetwork& other)
return *this;
}
bool WirelessNetwork::contains (const AccessPoint * const ap)
bool WirelessNetwork::contains (const TDENetworkWiFiAPInfo * const ap)
{
if ( (d->match & MATCH_SSID) && getSsid() != ap->getSsidByteArray())
return false;
@ -93,7 +86,7 @@ bool WirelessNetwork::contains (const AccessPoint * const ap)
return true;
}
bool WirelessNetwork::addAP(const AccessPoint * const ap)
bool WirelessNetwork::addAP(const TDENetworkWiFiAPInfo * const ap)
{
if ( this->contains( ap ) || d->aps.isEmpty())
{
@ -124,7 +117,7 @@ TQString WirelessNetwork::getDisplaySsid() const
TDENetworkWiFiAPFlags::TDENetworkWiFiAPFlags WirelessNetwork::getFlags() const
{
TDENetworkWiFiAPFlags::TDENetworkWiFiAPFlags flags = TDENetworkWiFiAPFlags::None;
for (TQValueList<const AccessPoint*>::Iterator it = d->aps.begin(); it != d->aps.end(); ++it)
for (TQValueList<const TDENetworkWiFiAPInfo*>::Iterator it = d->aps.begin(); it != d->aps.end(); ++it)
{
flags |= (*it)->getFlags();
}
@ -134,7 +127,7 @@ TDENetworkWiFiAPFlags::TDENetworkWiFiAPFlags WirelessNetwork::getFlags() const
TDENetworkWiFiAPFlags::TDENetworkWiFiAPFlags WirelessNetwork::getWpaFlags() const
{
TDENetworkWiFiAPFlags::TDENetworkWiFiAPFlags flags = TDENetworkWiFiAPFlags::None;
for (TQValueList<const AccessPoint*>::Iterator it = d->aps.begin(); it != d->aps.end(); ++it)
for (TQValueList<const TDENetworkWiFiAPInfo*>::Iterator it = d->aps.begin(); it != d->aps.end(); ++it)
{
flags |= (*it)->getWpaFlags();
}
@ -144,7 +137,7 @@ TDENetworkWiFiAPFlags::TDENetworkWiFiAPFlags WirelessNetwork::getWpaFlags() cons
TDENetworkWiFiAPFlags::TDENetworkWiFiAPFlags WirelessNetwork::getRsnFlags() const
{
TDENetworkWiFiAPFlags::TDENetworkWiFiAPFlags flags = TDENetworkWiFiAPFlags::None;
for (TQValueList<const AccessPoint*>::Iterator it = d->aps.begin(); it != d->aps.end(); ++it)
for (TQValueList<const TDENetworkWiFiAPInfo*>::Iterator it = d->aps.begin(); it != d->aps.end(); ++it)
{
flags |= (*it)->getRsnFlags();
}
@ -159,7 +152,7 @@ bool WirelessNetwork::isEncrypted() const
TQ_UINT8 WirelessNetwork::getStrength() const
{
TQ_UINT8 strength = 0;
for (TQValueList<const AccessPoint*>::Iterator it = d->aps.begin(); it != d->aps.end(); ++it)
for (TQValueList<const TDENetworkWiFiAPInfo*>::Iterator it = d->aps.begin(); it != d->aps.end(); ++it)
{
if ((*it)->getStrength() > strength)
strength = (*it)->getStrength();

@ -29,8 +29,10 @@
#include <stdint.h>
#include <tdehardwaredevices.h>
#include <tdenetworkconnections.h>
class KNetworkManager;
class AccessPoint;
class WirelessNetworkPrivate;
/*
@ -55,10 +57,10 @@ class WirelessNetwork
WirelessNetwork& operator= (const WirelessNetwork&);
// check if the AccessPoint represents the same net
bool contains(const AccessPoint * const);
bool contains(const TDENetworkWiFiAPInfo * const);
// add an AP to the Network
bool addAP(const AccessPoint * const);
bool addAP(const TDENetworkWiFiAPInfo * const);
// combined flags of all APs
TDENetworkWiFiAPFlags::TDENetworkWiFiAPFlags getFlags() const;

File diff suppressed because it is too large Load Diff

@ -1,42 +0,0 @@
/***************************************************************************
*
* Copyright (C) 2008 by Kevin Krammer <k.krammer@gmx.at>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
**************************************************************************/
#ifndef XMLMARSHALLER_H
#define XMLMARSHALLER_H
class TQT_DBusData;
class TQDomDocument;
class TQDomElement;
class TQString;
class XMLMarshaller
{
public:
static TQDomElement fromTQT_DBusData(const TQT_DBusData& data, const TQDomDocument& ownerDoc);
static TQT_DBusData toTQT_DBusData(const TQDomElement& element);
static TQString fromTQT_DBusData(const TQT_DBusData& data);
static TQT_DBusData toTQT_DBusData(const TQString& xmlString);
};
#endif
Loading…
Cancel
Save