KVIrc
4.9.2
DeveloperAPIs
|
#include <igdcontrolpoint.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 |
IgdControlPoint (const QString &hostname, int port, const QString &rootUrl) | |
void | initialize () |
bool | isGatewayAvailable () |
virtual | ~IgdControlPoint () |
Private Slots | |
void | slotDeviceQueried (bool error) |
void | slotWanQueryFinished (bool error) |
Private Attributes | |
bool | m_bGatewayAvailable |
int | m_iIgdPort |
RootService * | m_pRootService |
WanConnectionService * | m_pWanConnectionService |
QString | m_szIgdHostname |
A control point is a UPnP term for "client". It's the host that controls the UPnP device. This control point specifically handles Internet Gateway Devices (routers in UPnP terminology). It queries the device for its port mapping service (an instance of a WanIPConnection or WanPPPConnection service). Once the service is found, it can be used from the Manager class to configure port mappings.
UPnP::IgdControlPoint::IgdControlPoint | ( | const QString & | hostname, |
int | port, | ||
const QString & | rootUrl | ||
) |
References connect(), KviRuntimeInfo::hostname(), m_iIgdPort, m_pRootService, m_szIgdHostname, and slotDeviceQueried().
|
virtual |
References m_iIgdPort, m_pRootService, m_pWanConnectionService, and m_szIgdHostname.
void UPnP::IgdControlPoint::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::WanConnectionService::addPortMapping(), and m_pWanConnectionService.
Referenced by UPnP::Manager::addPortMapping().
void UPnP::IgdControlPoint::deletePortMapping | ( | const QString & | protocol, |
const QString & | remoteHost, | ||
int | externalPort | ||
) |
References UPnP::WanConnectionService::deletePortMapping(), and m_pWanConnectionService.
Referenced by UPnP::Manager::deletePortMapping().
QString UPnP::IgdControlPoint::getExternalIpAddress | ( | ) | const |
References UPnP::WanConnectionService::getExternalIpAddress(), and m_pWanConnectionService.
Referenced by UPnP::Manager::getExternalIpAddress().
void UPnP::IgdControlPoint::initialize | ( | ) |
References m_pRootService, and UPnP::RootService::queryDevice().
Referenced by UPnP::Manager::slotDeviceFound().
bool UPnP::IgdControlPoint::isGatewayAvailable | ( | ) |
References m_bGatewayAvailable.
Referenced by UPnP::Manager::isGatewayAvailable().
|
privateslot |
References connect(), UPnP::ServiceParameters::controlUrl, UPnP::RootService::getServiceByType(), m_bGatewayAvailable, m_pRootService, m_pWanConnectionService, UPnP::WanConnectionService::queryExternalIpAddress(), UPnP::ServiceParameters::serviceId, slotWanQueryFinished(), WanIpConnectionType, and WanPPPConnectionType.
Referenced by IgdControlPoint().
|
privateslot |
Referenced by slotDeviceQueried().
|
private |
Referenced by isGatewayAvailable(), and slotDeviceQueried().
|
private |
Referenced by IgdControlPoint(), and ~IgdControlPoint().
|
private |
Referenced by IgdControlPoint(), initialize(), slotDeviceQueried(), and ~IgdControlPoint().
|
private |
Referenced by addPortMapping(), deletePortMapping(), getExternalIpAddress(), slotDeviceQueried(), and ~IgdControlPoint().
|
private |
Referenced by IgdControlPoint(), and ~IgdControlPoint().