KVIrc 5.2.0
Developer APIs
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
UPnP::WanConnectionService Class Reference

#include <WanConnectionService.h>

+ Inheritance diagram for UPnP::WanConnectionService:

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 &params)
 
 ~WanConnectionService ()
 
- Public Member Functions inherited from UPnP::Service
int getPendingRequests () const
 
 Service (const ServiceParameters &params)
 
 Service (QString hostname, int port, const QString &informationUrl)
 
 ~Service ()
 

Protected Member Functions

void gotActionResponse (const QString &responseType, const QMap< QString, QString > &resultValues) override
 
- Protected Member Functions inherited from UPnP::Service
int callAction (const QString &actionName, const QMap< QString, QString > &arguments, const QString &prefix)
 
int callAction (const QString &actionName, const QString &prefix)
 
int callInformationUrl ()
 
virtual void gotActionErrorResponse (const QDomNode &response)
 
virtual void gotInformationResponse (const QDomNode &response)
 

Private Attributes

bool m_bNatEnabled
 
KviPointerList< PortMappingm_lPortMappings
 
QString m_szExternalIpAddress
 

Additional Inherited Members

- Signals inherited from UPnP::Service
void queryFinished (bool error)
 

Detailed Description

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.

Author
Diederik van der Boor

Constructor & Destructor Documentation

◆ WanConnectionService()

UPnP::WanConnectionService::WanConnectionService ( const ServiceParameters params)

◆ ~WanConnectionService()

UPnP::WanConnectionService::~WanConnectionService ( )
default

Member Function Documentation

◆ addPortMapping()

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 
)

◆ deletePortMapping()

void UPnP::WanConnectionService::deletePortMapping ( const QString &  protocol,
const QString &  remoteHost,
int  externalPort 
)

◆ getExternalIpAddress()

QString UPnP::WanConnectionService::getExternalIpAddress ( ) const

◆ getNatEnabled()

bool UPnP::WanConnectionService::getNatEnabled ( ) const

References m_bNatEnabled.

◆ getPortMappings()

const KviPointerList< PortMapping > & UPnP::WanConnectionService::getPortMappings ( ) const

References m_lPortMappings.

◆ gotActionResponse()

void UPnP::WanConnectionService::gotActionResponse ( const QString &  responseType,
const QMap< QString, QString > &  resultValues 
)
overrideprotectedvirtual

◆ queryExternalIpAddress()

void UPnP::WanConnectionService::queryExternalIpAddress ( )

◆ queryNatEnabled()

void UPnP::WanConnectionService::queryNatEnabled ( )

◆ queryPortMappingEntry()

void UPnP::WanConnectionService::queryPortMappingEntry ( int  index)

Member Data Documentation

◆ m_bNatEnabled

bool UPnP::WanConnectionService::m_bNatEnabled
private

Referenced by getNatEnabled(), and gotActionResponse().

◆ m_lPortMappings

KviPointerList<PortMapping> UPnP::WanConnectionService::m_lPortMappings
private

◆ m_szExternalIpAddress

QString UPnP::WanConnectionService::m_szExternalIpAddress
private

The documentation for this class was generated from the following files: