KDE 4.6 PyKDE API Reference

- KDE's Python API

# InternetGateway Class Reference

`from PyKDE4.solid import *`

Inherits: Solid.DeviceInterface → QObject
Namespace: Solid

## Detailed Description

## Enumerations

InternetStatus | { InternetEnabled, InternetDisabled, UnknownStatus }
NetworkProtocol | { TCP, UDP }

## Signals

| currentConnectionsDataIsReady (QStringList currentConnections)
| enabledForInternet (bool enabled)
| portMappingAdded (QString remoteHost, int externalPort, Solid.InternetGateway.NetworkProtocol mappingProtocol, int internalPort, QString internalClient)
| portMappingDeleted (QString remoteHost, int externalPort, Solid.InternetGateway.NetworkProtocol mappingProtocol)

## Methods

| __init__ (self, QObject backendObject)
| addPortMapping (self, QString remoteHost, int externalPort, Solid.InternetGateway.NetworkProtocol mappingProtocol, int internalPort, QString internalClient)
QStringList | currentConnections (self)
| deletePortMapping (self, QString remoteHost, int externalPort, Solid.InternetGateway.NetworkProtocol mappingProtocol)
Solid.InternetGateway.InternetStatus | isEnabledForInternet (self)
| requestCurrentConnections (self)
| setEnabledForInternet (self, bool enabled)

## Static Methods

Solid.DeviceInterface.Type | deviceInterfaceType ()

## Signal Documentation

currentConnectionsDataIsReady | ( | QStringList | currentConnections
| ) |  |  |

Signal syntax:
  `QObject.connect(source, SIGNAL("currentConnectionsDataIsReady(QStringList)"), target_slot)`

enabledForInternet | ( | bool | enabled
| ) |  |  |

Signal syntax:
  `QObject.connect(source, SIGNAL("enabledForInternet(bool)"), target_slot)`

portMappingAdded | ( | QString | remoteHost,
|  | int | externalPort,
|  | Solid.InternetGateway.NetworkProtocol | mappingProtocol,
|  | int | internalPort,
|  | QString | internalClient
| ) |  |  |

Signal syntax:
  `QObject.connect(source, SIGNAL("portMappingAdded(const QString&, qint16, const Solid::InternetGateway::NetworkProtocol&, qint16, const QString&)"), target_slot)`

portMappingDeleted | ( | QString | remoteHost,
|  | int | externalPort,
|  | Solid.InternetGateway.NetworkProtocol | mappingProtocol
| ) |  |  |

Signal syntax:
  `QObject.connect(source, SIGNAL("portMappingDeleted(const QString&, qint16, const Solid::InternetGateway::NetworkProtocol&)"), target_slot)`

## Method Documentation

__init__ | ( | self, |
|  | QObject | backendObject
| ) |  |  |

addPortMapping | ( | self, |
|  | QString | remoteHost,
|  | int | externalPort,
|  | Solid.InternetGateway.NetworkProtocol | mappingProtocol,
|  | int | internalPort,
|  | QString | internalClient
| ) |  |  |

QStringList currentConnections | ( |  | self ) |

deletePortMapping | ( | self, |
|  | QString | remoteHost,
|  | int | externalPort,
|  | Solid.InternetGateway.NetworkProtocol | mappingProtocol
| ) |  |  |

Solid.InternetGateway.InternetStatus isEnabledForInternet | ( |  | self ) |

requestCurrentConnections | ( |  | self ) |

setEnabledForInternet | ( | self, |
|  | bool | enabled
| ) |  |  |

## Static Method Documentation

Solid.DeviceInterface.Type deviceInterfaceType | ( |  | ) |

## Enumeration Documentation

InternetStatus

Enumerator:

  InternetEnabled = 0 |
  InternetDisabled = 1 |
  UnknownStatus = 2 |

NetworkProtocol

Enumerator:

  TCP = 0 |
  UDP = 1 |