KVIrc
4.9.2
DeveloperAPIs
|
#include <WanConnectionService.h>
Public Member Functions | |
void | addPortMapping (const QString &protocol, const QString &remoteHost, int externalPort, const QString &internalClient, int internalPort, const QString &description, bool enabled=true, int leaseDuration=0) |
void | deletePortMapping (const QString &protocol, const QString &remoteHost, int externalPort) |
QString | getExternalIpAddress () const |
bool | getNatEnabled () const |
const KviPointerList < PortMapping > & | getPortMappings () const |
void | queryExternalIpAddress () |
void | queryNatEnabled () |
void | queryPortMappingEntry (int index) |
WanConnectionService (const ServiceParameters ¶ms) | |
virtual | ~WanConnectionService () |
Public Member Functions inherited from UPnP::Service | |
int | getPendingRequests () const |
Service (const QString &hostname, int port, const QString &informationUrl) | |
Service (const ServiceParameters ¶ms) | |
virtual | ~Service () |
Protected Member Functions | |
virtual void | gotActionResponse (const QString &responseType, const QMap< QString, QString > &resultValues) |
Protected Member Functions inherited from UPnP::Service | |
int | callAction (const QString &actionName, const QString &prefix) |
int | callAction (const QString &actionName, const QMap< QString, QString > &arguments, const QString &prefix) |
int | callInformationUrl () |
virtual void | gotActionErrorResponse (const QDomNode &response) |
virtual void | gotInformationResponse (const QDomNode &response) |
Private Attributes | |
bool | m_bNatEnabled |
KviPointerList< PortMapping > | m_lPortMappings |
QString | m_szExternalIpAddress |
Additional Inherited Members | |
Signals inherited from UPnP::Service | |
void | queryFinished (bool error) |
The Wan(IP/PPP)Connection service controls the connection and port forwarding settings of a router. The Layer3ForwardingService result either defines a WanIPConnection or WanPPPConnection service. Which one is returned depends on the external connection type. This class implements the common actions both services support, which is sufficient to control the port mappings of the router.
UPnP::WanConnectionService::WanConnectionService | ( | const ServiceParameters & | params | ) |
|
virtualdefault |
void UPnP::WanConnectionService::addPortMapping | ( | const QString & | protocol, |
const QString & | remoteHost, | ||
int | externalPort, | ||
const QString & | internalClient, | ||
int | internalPort, | ||
const QString & | description, | ||
bool | enabled = true , |
||
int | leaseDuration = 0 |
||
) |
References UPnP::Service::callAction().
Referenced by UPnP::IgdControlPoint::addPortMapping().
void UPnP::WanConnectionService::deletePortMapping | ( | const QString & | protocol, |
const QString & | remoteHost, | ||
int | externalPort | ||
) |
References UPnP::Service::callAction().
Referenced by UPnP::IgdControlPoint::deletePortMapping().
QString UPnP::WanConnectionService::getExternalIpAddress | ( | ) | const |
References m_szExternalIpAddress.
Referenced by UPnP::IgdControlPoint::getExternalIpAddress().
bool UPnP::WanConnectionService::getNatEnabled | ( | ) | const |
References m_bNatEnabled.
const KviPointerList< PortMapping > & UPnP::WanConnectionService::getPortMappings | ( | ) | const |
References m_lPortMappings.
|
protectedvirtual |
Reimplemented from UPnP::Service.
References UPnP::PortMapping::description, UPnP::PortMapping::enabled, UPnP::PortMapping::externalPort, UPnP::PortMapping::internalClient, UPnP::PortMapping::internalPort, UPnP::PortMapping::leaseDuration, m_bNatEnabled, m_lPortMappings, m_szExternalIpAddress, UPnP::PortMapping::protocol, and UPnP::PortMapping::remoteHost.
void UPnP::WanConnectionService::queryExternalIpAddress | ( | ) |
References UPnP::Service::callAction().
Referenced by UPnP::IgdControlPoint::slotDeviceQueried().
void UPnP::WanConnectionService::queryNatEnabled | ( | ) |
References UPnP::Service::callAction().
void UPnP::WanConnectionService::queryPortMappingEntry | ( | int | index | ) |
References UPnP::Service::callAction().
|
private |
Referenced by getNatEnabled(), and gotActionResponse().
|
private |
Referenced by getPortMappings(), and gotActionResponse().
|
private |
Referenced by getExternalIpAddress(), and gotActionResponse().