parent
26cdc6b2b5
commit
3f5288877b
@ -1,61 +0,0 @@
|
|||||||
/***************************************************************************
|
|
||||||
*
|
|
||||||
* knetworkmanager-cdma_connection.h - A NetworkManager frontend for KDE
|
|
||||||
*
|
|
||||||
* Copyright (C) 2008 Novell, Inc.
|
|
||||||
*
|
|
||||||
* Author: Will Stephenson <wstephenson@kde.org>
|
|
||||||
*
|
|
||||||
* 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 "knetworkmanager-cdma_connection.h"
|
|
||||||
|
|
||||||
#include <nm-setting-cdma.h>
|
|
||||||
#include "knetworkmanager-connection_setting_serial.h"
|
|
||||||
|
|
||||||
ConnectionSettings::CDMAConnection::CDMAConnection()
|
|
||||||
: PPPConnection(NM_SETTING_CDMA_SETTING_NAME)
|
|
||||||
{
|
|
||||||
appendSetting(new CDMA(this));
|
|
||||||
appendSetting(new Serial(this));
|
|
||||||
}
|
|
||||||
|
|
||||||
ConnectionSettings::CDMAConnection::~CDMAConnection()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
ConnectionSettings::CDMA* ConnectionSettings::CDMAConnection::getCDMASetting() const
|
|
||||||
{
|
|
||||||
return dynamic_cast<CDMA*>(getSetting(NM_SETTING_CDMA_SETTING_NAME));
|
|
||||||
}
|
|
||||||
|
|
||||||
ConnectionSettings::Serial* ConnectionSettings::CDMAConnection::getSerialSetting() const
|
|
||||||
{
|
|
||||||
return dynamic_cast<Serial*>(getSetting(NM_SETTING_SERIAL_SETTING_NAME));
|
|
||||||
}
|
|
||||||
|
|
||||||
ConnectionSettings::Connection* ConnectionSettings::CDMAConnection::duplicate()
|
|
||||||
{
|
|
||||||
CDMAConnection* conn = new CDMAConnection();
|
|
||||||
conn->updateSettings(this);
|
|
||||||
return conn;
|
|
||||||
}
|
|
||||||
|
|
||||||
#include "knetworkmanager-cdma_connection.moc"
|
|
||||||
|
|
||||||
// vim: sw=4 sts=4 noet tw=100
|
|
@ -1,50 +0,0 @@
|
|||||||
/***************************************************************************
|
|
||||||
*
|
|
||||||
* knetworkmanager-cdma_connection.h - A NetworkManager frontend for KDE
|
|
||||||
*
|
|
||||||
* Copyright (C) 2008 Novell, Inc.
|
|
||||||
*
|
|
||||||
* Author: Will Stephenson <wstephenson@kde.org>
|
|
||||||
*
|
|
||||||
* 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_CDMA_CONNECTION_H
|
|
||||||
#define KNETWORKMANAGER_CDMA_CONNECTION_H
|
|
||||||
|
|
||||||
#include "knetworkmanager-ppp_connection.h"
|
|
||||||
#include "knetworkmanager-connection_setting_cdma.h"
|
|
||||||
|
|
||||||
namespace ConnectionSettings
|
|
||||||
{
|
|
||||||
class CDMA;
|
|
||||||
class Serial;
|
|
||||||
|
|
||||||
class CDMAConnection : public PPPConnection
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
CDMAConnection();
|
|
||||||
~CDMAConnection();
|
|
||||||
CDMA* getCDMASetting() const;
|
|
||||||
Serial* getSerialSetting() const;
|
|
||||||
Connection* duplicate();
|
|
||||||
};
|
|
||||||
} // namespace ConnectionSettings
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -1,91 +0,0 @@
|
|||||||
/***************************************************************************
|
|
||||||
*
|
|
||||||
* knetworkmanager-generic_connection.cpp - 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
|
|
||||||
*
|
|
||||||
**************************************************************************/
|
|
||||||
|
|
||||||
/* qt headers */
|
|
||||||
#include <tqhostaddress.h>
|
|
||||||
#include <tqvariant.h>
|
|
||||||
#include <tqvaluelist.h>
|
|
||||||
|
|
||||||
/* kde headers */
|
|
||||||
#include <kdebug.h>
|
|
||||||
#include <klocale.h>
|
|
||||||
|
|
||||||
/* TQDbus headers */
|
|
||||||
#include <tqdbusconnection.h>
|
|
||||||
#include <tqdbusobjectpath.h>
|
|
||||||
#include <tqdbusdata.h>
|
|
||||||
#include <tqdbusdatamap.h>
|
|
||||||
#include <tqdbusvariant.h>
|
|
||||||
|
|
||||||
/* NM headers */
|
|
||||||
#include <NetworkManager.h>
|
|
||||||
|
|
||||||
/* knetworkmanager headers */
|
|
||||||
#include "knetworkmanager.h"
|
|
||||||
#include "knetworkmanager-connection.h"
|
|
||||||
#include "knetworkmanager-generic_connection.h"
|
|
||||||
#include "knetworkmanager-connection_setting.h"
|
|
||||||
#include "knetworkmanager-connection_setting_info.h"
|
|
||||||
#include "knetworkmanager-nmsettings.h"
|
|
||||||
|
|
||||||
using namespace ConnectionSettings;
|
|
||||||
|
|
||||||
/*
|
|
||||||
class GenericConnection
|
|
||||||
*/
|
|
||||||
GenericConnection::GenericConnection(const TQString& type)
|
|
||||||
: Connection()
|
|
||||||
{
|
|
||||||
// every connection needs an info-setting
|
|
||||||
appendSetting(new Info(this, type, ""));
|
|
||||||
}
|
|
||||||
|
|
||||||
TQString
|
|
||||||
GenericConnection::getType()
|
|
||||||
{
|
|
||||||
Info* info = dynamic_cast<Info*>(getSetting("connection"));
|
|
||||||
if (info)
|
|
||||||
return info->getDevType();
|
|
||||||
else
|
|
||||||
return TQString();
|
|
||||||
}
|
|
||||||
|
|
||||||
TQString
|
|
||||||
GenericConnection::getID() const
|
|
||||||
{
|
|
||||||
return getInfoSetting()->getUUID();
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
GenericConnection::setID(const TQString& id)
|
|
||||||
{
|
|
||||||
getInfoSetting()->setUUID(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
Info* GenericConnection::getInfoSetting() const
|
|
||||||
{
|
|
||||||
return dynamic_cast<Info*>(getSetting("connection"));
|
|
||||||
}
|
|
||||||
|
|
||||||
#include "knetworkmanager-generic_connection.moc"
|
|
@ -1,58 +0,0 @@
|
|||||||
/***************************************************************************
|
|
||||||
*
|
|
||||||
* knetworkmanager-generic_connection.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_GENERIC_CONNECTION_H
|
|
||||||
#define KNETWORKMANAGER_GENERIC_CONNECTION_H
|
|
||||||
|
|
||||||
#include <tqmap.h>
|
|
||||||
#include <tqobject.h>
|
|
||||||
|
|
||||||
#include "knetworkmanager-connection.h"
|
|
||||||
#include "knetworkmanager-connection_setting.h"
|
|
||||||
#include "dbus/connection.h"
|
|
||||||
#include "dbus/connectionnode.h"
|
|
||||||
|
|
||||||
class TQDBusObjectPath;
|
|
||||||
|
|
||||||
namespace ConnectionSettings
|
|
||||||
{
|
|
||||||
|
|
||||||
class ConnectionSetting;
|
|
||||||
class Info;
|
|
||||||
|
|
||||||
class GenericConnection : public Connection
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
GenericConnection(const TQString&);
|
|
||||||
TQString getType();
|
|
||||||
|
|
||||||
TQString getID() const;
|
|
||||||
void setID(const TQString& id);
|
|
||||||
|
|
||||||
Info* getInfoSetting() const;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
#endif /* KNETWORKMANAGER_GENERIC_CONNECTION_H */
|
|
@ -1,60 +0,0 @@
|
|||||||
/***************************************************************************
|
|
||||||
*
|
|
||||||
* knetworkmanager-gsm_connection.h - A NetworkManager frontend for KDE
|
|
||||||
*
|
|
||||||
* Copyright (C) 2008 Novell, Inc.
|
|
||||||
*
|
|
||||||
* Author: Will Stephenson <wstephenson@kde.org>
|
|
||||||
*
|
|
||||||
* 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 "knetworkmanager-gsm_connection.h"
|
|
||||||
|
|
||||||
#include <nm-setting-gsm.h>
|
|
||||||
#include "knetworkmanager-connection_setting_serial.h"
|
|
||||||
|
|
||||||
ConnectionSettings::GSMConnection::GSMConnection()
|
|
||||||
: PPPConnection(NM_SETTING_GSM_SETTING_NAME)
|
|
||||||
{
|
|
||||||
appendSetting(new GSM(this));
|
|
||||||
appendSetting(new Serial(this));
|
|
||||||
}
|
|
||||||
|
|
||||||
ConnectionSettings::GSMConnection::~GSMConnection()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
ConnectionSettings::GSM* ConnectionSettings::GSMConnection::getGSMSetting() const
|
|
||||||
{
|
|
||||||
return dynamic_cast<GSM*>(getSetting(NM_SETTING_GSM_SETTING_NAME));
|
|
||||||
}
|
|
||||||
|
|
||||||
ConnectionSettings::Serial* ConnectionSettings::GSMConnection::getSerialSetting() const
|
|
||||||
{
|
|
||||||
return dynamic_cast<Serial*>(getSetting(NM_SETTING_SERIAL_SETTING_NAME));
|
|
||||||
}
|
|
||||||
|
|
||||||
ConnectionSettings::Connection* ConnectionSettings::GSMConnection::duplicate()
|
|
||||||
{
|
|
||||||
GSMConnection* conn = new GSMConnection();
|
|
||||||
conn->updateSettings(this);
|
|
||||||
return conn;
|
|
||||||
}
|
|
||||||
#include "knetworkmanager-gsm_connection.moc"
|
|
||||||
|
|
||||||
// vim: sw=4 sts=4 noet tw=100
|
|
@ -1,50 +0,0 @@
|
|||||||
/***************************************************************************
|
|
||||||
*
|
|
||||||
* knetworkmanager-gsm_connection.h - A NetworkManager frontend for KDE
|
|
||||||
*
|
|
||||||
* Copyright (C) 2008 Novell, Inc.
|
|
||||||
*
|
|
||||||
* Author: Will Stephenson <wstephenson@kde.org>
|
|
||||||
*
|
|
||||||
* 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_GSM_CONNECTION_H
|
|
||||||
#define KNETWORKMANAGER_GSM_CONNECTION_H
|
|
||||||
|
|
||||||
#include "knetworkmanager-ppp_connection.h"
|
|
||||||
#include "knetworkmanager-connection_setting_gsm.h"
|
|
||||||
|
|
||||||
namespace ConnectionSettings
|
|
||||||
{
|
|
||||||
class GSM;
|
|
||||||
class Serial;
|
|
||||||
|
|
||||||
class GSMConnection : public PPPConnection
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
GSMConnection();
|
|
||||||
~GSMConnection();
|
|
||||||
GSM* getGSMSetting() const;
|
|
||||||
Serial* getSerialSetting() const;
|
|
||||||
Connection* duplicate();
|
|
||||||
};
|
|
||||||
}; // namespace ConnectionSettings
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -1,54 +0,0 @@
|
|||||||
/***************************************************************************
|
|
||||||
*
|
|
||||||
* knetworkmanager-ppp_connection.h - A NetworkManager frontend for KDE
|
|
||||||
*
|
|
||||||
* Copyright (C) 2008 Novell, Inc.
|
|
||||||
*
|
|
||||||
* Author: Will Stephenson <wstephenson@kde.org>
|
|
||||||
*
|
|
||||||
* 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 "knetworkmanager-ppp_connection.h"
|
|
||||||
|
|
||||||
#include <nm-setting-ppp.h>
|
|
||||||
#include <nm-setting-ip4-config.h>
|
|
||||||
|
|
||||||
ConnectionSettings::PPPConnection::PPPConnection(const TQString & infoName)
|
|
||||||
: GenericConnection(infoName)
|
|
||||||
{
|
|
||||||
appendSetting(new IPv4(this));
|
|
||||||
appendSetting(new PPP(this));
|
|
||||||
}
|
|
||||||
|
|
||||||
ConnectionSettings::PPPConnection::~PPPConnection()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
ConnectionSettings::IPv4* ConnectionSettings::PPPConnection::getIPv4Setting() const
|
|
||||||
{
|
|
||||||
return dynamic_cast<ConnectionSettings::IPv4*>(getSetting(NM_SETTING_IP4_CONFIG_SETTING_NAME));
|
|
||||||
}
|
|
||||||
|
|
||||||
ConnectionSettings::PPP* ConnectionSettings::PPPConnection::getPPPSetting() const
|
|
||||||
{
|
|
||||||
return dynamic_cast<PPP*>(getSetting(NM_SETTING_PPP_SETTING_NAME));
|
|
||||||
}
|
|
||||||
|
|
||||||
#include "knetworkmanager-ppp_connection.moc"
|
|
||||||
|
|
||||||
// vim: sw=4 sts=4 noet tw=100
|
|
@ -1,51 +0,0 @@
|
|||||||
/***************************************************************************
|
|
||||||
*
|
|
||||||
* knetworkmanager-ppp_connection.h - A NetworkManager frontend for KDE
|
|
||||||
*
|
|
||||||
* Copyright (C) 2008 Novell, Inc.
|
|
||||||
*
|
|
||||||
* Author: Will Stephenson <wstephenson@kde.org>
|
|
||||||
*
|
|
||||||
* 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_PPP_CONNECTION_H
|
|
||||||
#define KNETWORKMANAGER_PPP_CONNECTION_H
|
|
||||||
|
|
||||||
#include "knetworkmanager-generic_connection.h"
|
|
||||||
#include "knetworkmanager-connection_setting_ipv4.h"
|
|
||||||
#include "knetworkmanager-connection_setting_ppp.h"
|
|
||||||
|
|
||||||
namespace ConnectionSettings
|
|
||||||
{
|
|
||||||
class Info;
|
|
||||||
class IPv4;
|
|
||||||
class PPP;
|
|
||||||
|
|
||||||
class PPPConnection : public GenericConnection
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
PPPConnection(const TQString& infoName);
|
|
||||||
~PPPConnection();
|
|
||||||
PPP* getPPPSetting() const;
|
|
||||||
IPv4* getIPv4Setting() const;
|
|
||||||
};
|
|
||||||
} // namespace ConnectionSettings
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -1,85 +0,0 @@
|
|||||||
/***************************************************************************
|
|
||||||
*
|
|
||||||
* knetworkmanager-vpn_connection.cpp - 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
|
|
||||||
*
|
|
||||||
**************************************************************************/
|
|
||||||
|
|
||||||
/* qt headers */
|
|
||||||
#include <tqhostaddress.h>
|
|
||||||
#include <tqvariant.h>
|
|
||||||
#include <tqvaluelist.h>
|
|
||||||
|
|
||||||
/* kde headers */
|
|
||||||
#include <kdebug.h>
|
|
||||||
#include <klocale.h>
|
|
||||||
|
|
||||||
/* TQDbus headers */
|
|
||||||
#include <tqdbusconnection.h>
|
|
||||||
#include <tqdbusobjectpath.h>
|
|
||||||
#include <tqdbusdata.h>
|
|
||||||
#include <tqdbusdatamap.h>
|
|
||||||
#include <tqdbusvariant.h>
|
|
||||||
|
|
||||||
/* NM headers */
|
|
||||||
#include <NetworkManager.h>
|
|
||||||
|
|
||||||
/* knetworkmanager headers */
|
|
||||||
#include "knetworkmanager.h"
|
|
||||||
#include "knetworkmanager-vpn_connection.h"
|
|
||||||
#include "knetworkmanager-connection_setting.h"
|
|
||||||
#include "knetworkmanager-connection_setting_info.h"
|
|
||||||
#include "knetworkmanager-connection_setting_ipv4.h"
|
|
||||||
#include "knetworkmanager-connection_setting_vpn.h"
|
|
||||||
#include "knetworkmanager-nmsettings.h"
|
|
||||||
|
|
||||||
using namespace ConnectionSettings;
|
|
||||||
|
|
||||||
/*
|
|
||||||
class VPNConnection
|
|
||||||
*/
|
|
||||||
VPNConnection::VPNConnection()
|
|
||||||
: GenericConnection(NM_SETTING_VPN_SETTING_NAME)
|
|
||||||
{
|
|
||||||
// add all settings needed for a VPN connection
|
|
||||||
appendSetting(new VPN(this));
|
|
||||||
|
|
||||||
// TODO: Maybe IPv4 Setting?
|
|
||||||
}
|
|
||||||
|
|
||||||
VPN* VPNConnection::getVPNSetting() const
|
|
||||||
{
|
|
||||||
return dynamic_cast<VPN*>(getSetting(NM_SETTING_VPN_SETTING_NAME));
|
|
||||||
}
|
|
||||||
|
|
||||||
ConnectionSetting* VPNConnection::getVPNSettingConnectionCore() const
|
|
||||||
{
|
|
||||||
return getSetting(NM_SETTING_VPN_SETTING_NAME);
|
|
||||||
}
|
|
||||||
|
|
||||||
Connection* VPNConnection::duplicate()
|
|
||||||
{
|
|
||||||
VPNConnection* conn = new VPNConnection();
|
|
||||||
conn->updateSettings(this);
|
|
||||||
return conn;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#include "knetworkmanager-vpn_connection.moc"
|
|
@ -1,54 +0,0 @@
|
|||||||
/***************************************************************************
|
|
||||||
*
|
|
||||||
* knetworkmanager-vpn_connection.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_VPN_CONNECTION_H
|
|
||||||
#define KNETWORKMANAGER_VPN_CONNECTION_H
|
|
||||||
|
|
||||||
#include <tqmap.h>
|
|
||||||
#include <tqobject.h>
|
|
||||||
|
|
||||||
#include "knetworkmanager-generic_connection.h"
|
|
||||||
#include "knetworkmanager-connection_setting.h"
|
|
||||||
#include "knetworkmanager-connection_setting_vpn.h"
|
|
||||||
|
|
||||||
class TQDBusObjectPath;
|
|
||||||
|
|
||||||
namespace ConnectionSettings
|
|
||||||
{
|
|
||||||
|
|
||||||
class VPN;
|
|
||||||
|
|
||||||
class VPNConnection : public GenericConnection
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
VPNConnection();
|
|
||||||
|
|
||||||
VPN* getVPNSetting() const;
|
|
||||||
ConnectionSetting* getVPNSettingConnectionCore() const;
|
|
||||||
Connection* duplicate();
|
|
||||||
};
|
|
||||||
}
|
|
||||||
#endif /* KNETWORKMANAGER_VPN_CONNECTION_H */
|
|
@ -1,84 +0,0 @@
|
|||||||
/***************************************************************************
|
|
||||||
*
|
|
||||||
* knetworkmanager-wired_connection.cpp - 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
|
|
||||||
*
|
|
||||||
**************************************************************************/
|
|
||||||
|
|
||||||
/* qt headers */
|
|
||||||
#include <tqhostaddress.h>
|
|
||||||
#include <tqvariant.h>
|
|
||||||
#include <tqvaluelist.h>
|
|
||||||
|
|
||||||
/* kde headers */
|
|
||||||
#include <kdebug.h>
|
|
||||||
#include <klocale.h>
|
|
||||||
|
|
||||||
/* TQDbus headers */
|
|
||||||
#include <tqdbusconnection.h>
|
|
||||||
#include <tqdbusobjectpath.h>
|
|
||||||
#include <tqdbusdata.h>
|
|
||||||
#include <tqdbusdatamap.h>
|
|
||||||
#include <tqdbusvariant.h>
|
|
||||||
|
|
||||||
/* NM headers */
|
|
||||||
#include <NetworkManager.h>
|
|
||||||
|
|
||||||
/* knetworkmanager headers */
|
|
||||||
#include "knetworkmanager.h"
|
|
||||||
#include "knetworkmanager-wired_connection.h"
|
|
||||||
#include "knetworkmanager-connection_setting.h"
|
|
||||||
#include "knetworkmanager-connection_setting_info.h"
|
|
||||||
#include "knetworkmanager-connection_setting_ipv4.h"
|
|
||||||
#include "knetworkmanager-connection_setting_wired.h"
|
|
||||||
#include "knetworkmanager-connection_setting_8021x.h"
|
|
||||||
#include "knetworkmanager-nmsettings.h"
|
|
||||||
|
|
||||||
using namespace ConnectionSettings;
|
|
||||||
|
|
||||||
/*
|
|
||||||
class WiredConnection
|
|
||||||
*/
|
|
||||||
WiredConnection::WiredConnection()
|
|
||||||
: GenericConnection(NM_SETTING_WIRED_SETTING_NAME)
|
|
||||||
{
|
|
||||||
// add all settings needed for a wired connection
|
|
||||||
appendSetting(new Wired(this));
|
|
||||||
appendSetting(new IPv4(this));
|
|
||||||
}
|
|
||||||
|
|
||||||
Wired* WiredConnection::getWiredSetting() const
|
|
||||||
{
|
|
||||||
return dynamic_cast<Wired*>(getSetting(NM_SETTING_WIRED_SETTING_NAME));
|
|
||||||
}
|
|
||||||
|
|
||||||
IPv4* WiredConnection::getIPv4Setting() const
|
|
||||||
{
|
|
||||||
return dynamic_cast<IPv4*>(getSetting("ipv4"));
|
|
||||||
}
|
|
||||||
|
|
||||||
Connection* WiredConnection::duplicate()
|
|
||||||
{
|
|
||||||
WiredConnection* conn = new WiredConnection();
|
|
||||||
conn->updateSettings(this);
|
|
||||||
return conn;
|
|
||||||
}
|
|
||||||
|
|
||||||
#include "knetworkmanager-wired_connection.moc"
|
|
@ -1,55 +0,0 @@
|
|||||||
/***************************************************************************
|
|
||||||
*
|
|
||||||
* knetworkmanager-wired_connection.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_WIRED_CONNECTION_H
|
|
||||||
#define KNETWORKMANAGER_WIRED_CONNECTION_H
|
|
||||||
|
|
||||||
#include <tqmap.h>
|
|
||||||
#include <tqobject.h>
|
|
||||||
#include <nm-setting-wired.h>
|
|
||||||
|
|
||||||
#include "knetworkmanager-generic_connection.h"
|
|
||||||
#include "knetworkmanager-connection_setting.h"
|
|
||||||
|
|
||||||
class TQDBusObjectPath;
|
|
||||||
|
|
||||||
namespace ConnectionSettings
|
|
||||||
{
|
|
||||||
|
|
||||||
class Wired;
|
|
||||||
class IPv4;
|
|
||||||
|
|
||||||
class WiredConnection : public GenericConnection
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
WiredConnection();
|
|
||||||
|
|
||||||
Wired* getWiredSetting() const;
|
|
||||||
IPv4* getIPv4Setting() const;
|
|
||||||
Connection* duplicate();
|
|
||||||
};
|
|
||||||
}
|
|
||||||
#endif /* KNETWORKMANAGER_WIRED_CONNECTION_H */
|
|
@ -1,94 +0,0 @@
|
|||||||
/***************************************************************************
|
|
||||||
*
|
|
||||||
* knetworkmanager-wireless_connection.cpp - 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
|
|
||||||
*
|
|
||||||
**************************************************************************/
|
|
||||||
|
|
||||||
/* qt headers */
|
|
||||||
#include <tqhostaddress.h>
|
|
||||||
#include <tqvariant.h>
|
|
||||||
#include <tqvaluelist.h>
|
|
||||||
|
|
||||||
/* kde headers */
|
|
||||||
#include <kdebug.h>
|
|
||||||
#include <klocale.h>
|
|
||||||
|
|
||||||
/* TQDbus headers */
|
|
||||||
#include <tqdbusconnection.h>
|
|
||||||
#include <tqdbusobjectpath.h>
|
|
||||||
#include <tqdbusdata.h>
|
|
||||||
#include <tqdbusdatamap.h>
|
|
||||||
#include <tqdbusvariant.h>
|
|
||||||
|
|
||||||
/* NM headers */
|
|
||||||
#include <NetworkManager.h>
|
|
||||||
|
|
||||||
/* knetworkmanager headers */
|
|
||||||
#include "knetworkmanager.h"
|
|
||||||
#include "knetworkmanager-wireless_connection.h"
|
|
||||||
#include "knetworkmanager-connection_dbus.h"
|
|
||||||
#include "knetworkmanager-connection_secrets_dbus.h"
|
|
||||||
#include "knetworkmanager-connection_setting.h"
|
|
||||||
#include "knetworkmanager-connection_setting_info.h"
|
|
||||||
#include "knetworkmanager-connection_setting_ipv4.h"
|
|
||||||
#include "knetworkmanager-connection_setting_wireless.h"
|
|
||||||
#include "knetworkmanager-connection_setting_wireless_security.h"
|
|
||||||
#include "knetworkmanager-connection_setting_8021x.h"
|
|
||||||
#include "knetworkmanager-nmsettings.h"
|
|
||||||
|
|
||||||
using namespace ConnectionSettings;
|
|
||||||
|
|
||||||
/*
|
|
||||||
class WirelessConnection
|
|
||||||
*/
|
|
||||||
WirelessConnection::WirelessConnection()
|
|
||||||
: GenericConnection(NM_SETTING_WIRELESS_SETTING_NAME)
|
|
||||||
{
|
|
||||||
// create all settings needed for a wireless connection
|
|
||||||
appendSetting(new IPv4(this));
|
|
||||||
appendSetting(new Wireless(this));
|
|
||||||
appendSetting(new WirelessSecurity(this));
|
|
||||||
appendSetting(new IEEE8021x(this));
|
|
||||||
}
|
|
||||||
|
|
||||||
Wireless* WirelessConnection::getWirelessSetting() const
|
|
||||||
{
|
|
||||||
return dynamic_cast<Wireless*>(getSetting(NM_SETTING_WIRELESS_SETTING_NAME));
|
|
||||||
}
|
|
||||||
|
|
||||||
WirelessSecurity* WirelessConnection::getWirelessSecuritySetting() const
|
|
||||||
{
|
|
||||||
return dynamic_cast<WirelessSecurity*>(getSetting(NM_SETTING_WIRELESS_SECURITY_SETTING_NAME));
|
|
||||||
}
|
|
||||||
|
|
||||||
IPv4* WirelessConnection::getIPv4Setting() const
|
|
||||||
{
|
|
||||||
return dynamic_cast<IPv4*>(getSetting(NM_SETTING_IP4_CONFIG_SETTING_NAME));
|
|
||||||
}
|
|
||||||
|
|
||||||
Connection* WirelessConnection::duplicate()
|
|
||||||
{
|
|
||||||
WirelessConnection* conn = new WirelessConnection();
|
|
||||||
conn->updateSettings(this);
|
|
||||||
return conn;
|
|
||||||
}
|
|
||||||
|
|
||||||
#include "knetworkmanager-wireless_connection.moc"
|
|
@ -1,59 +0,0 @@
|
|||||||
/***************************************************************************
|
|
||||||
*
|
|
||||||
* knetworkmanager-wireless_connection.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_WIRELESS_CONNECTION_H
|
|
||||||
#define KNETWORKMANAGER_WIRELESS_CONNECTION_H
|
|
||||||
|
|
||||||
#include <tqmap.h>
|
|
||||||
#include <tqobject.h>
|
|
||||||
#include <nm-setting-wireless.h>
|
|
||||||
|
|
||||||
#include "knetworkmanager-generic_connection.h"
|
|
||||||
#include "knetworkmanager-connection_setting.h"
|
|
||||||
|
|
||||||
class TQDBusObjectPath;
|
|
||||||
namespace ConnectionSettings
|
|
||||||
{
|
|
||||||
|
|
||||||
class Info;
|
|
||||||
class Wireless;
|
|
||||||
class WirelessSecurity;
|
|
||||||
class IPv4;
|
|
||||||
|
|
||||||
typedef TQMap<TQString, SettingsMap> ConnectionMap;
|
|
||||||
|
|
||||||
class WirelessConnection : public GenericConnection
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
WirelessConnection();
|
|
||||||
|
|
||||||
Wireless* getWirelessSetting() const;
|
|
||||||
WirelessSecurity* getWirelessSecuritySetting() const;
|
|
||||||
IPv4* getIPv4Setting() const;
|
|
||||||
Connection* duplicate();
|
|
||||||
};
|
|
||||||
}
|
|
||||||
#endif /* KNETWORKMANAGER_WIRELESS_CONNECTION_H */
|
|
Loading…
Reference in new issue