mirror of
https://bitbucket.org/smil3y/kde-playground.git
synced 2025-02-24 10:52:52 +00:00
57 lines
2.5 KiB
Text
57 lines
2.5 KiB
Text
// Copyright 2010 Simon Edwards <simon@simonzone.com>
|
|
|
|
// Generated by twine2
|
|
|
|
// This program is free software; you can redistribute it and/or modify
|
|
// it under the terms of the GNU Library General Public License as
|
|
// published by the Free Software Foundation; either version 2, 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 Library General Public
|
|
// License along with this program; if not, write to the
|
|
// Free Software Foundation, Inc.,
|
|
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
namespace Solid
|
|
{
|
|
class InternetGateway : Solid::DeviceInterface
|
|
{
|
|
%TypeHeaderCode
|
|
#include <internetgateway.h>
|
|
%End
|
|
|
|
explicit InternetGateway (QObject* backendObject);
|
|
public:
|
|
enum InternetStatus
|
|
{
|
|
InternetEnabled,
|
|
InternetDisabled,
|
|
UnknownStatus
|
|
};
|
|
enum NetworkProtocol
|
|
{
|
|
TCP,
|
|
UDP
|
|
};
|
|
virtual ~InternetGateway ();
|
|
static Solid::DeviceInterface::Type deviceInterfaceType ();
|
|
void requestCurrentConnections () const;
|
|
QStringList currentConnections () const;
|
|
void addPortMapping (const QString& remoteHost, qint16 externalPort, const Solid::InternetGateway::NetworkProtocol& mappingProtocol, qint16 internalPort, const QString& internalClient);
|
|
void deletePortMapping (const QString& remoteHost, qint16 externalPort, const Solid::InternetGateway::NetworkProtocol& mappingProtocol);
|
|
Solid::InternetGateway::InternetStatus isEnabledForInternet () const;
|
|
void setEnabledForInternet (bool enabled);
|
|
signals:
|
|
void portMappingAdded (const QString& remoteHost, qint16 externalPort, const Solid::InternetGateway::NetworkProtocol& mappingProtocol, qint16 internalPort, const QString& internalClient);
|
|
void portMappingDeleted (const QString& remoteHost, qint16 externalPort, const Solid::InternetGateway::NetworkProtocol& mappingProtocol);
|
|
void enabledForInternet (bool enabled);
|
|
void currentConnectionsDataIsReady (QStringList currentConnections);
|
|
protected:
|
|
//ig InternetGateway (InternetGatewayPrivate& dd, QObject* backendObject);
|
|
};
|
|
};
|