aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/upnp/manager.cpp
diff options
context:
space:
mode:
authorGravatar Fabio Bas2008-08-15 14:02:42 +0000
committerGravatar Fabio Bas2008-08-15 14:02:42 +0000
commitefaced6c6c3f26592cbc4643e6f48b5523cd39fb (patch)
treeafe05ef1def717805f5dd773ed2713c3e92f652e /src/modules/upnp/manager.cpp
parent(quite strange) compilation fix for linux (diff)
downloadKVIrc-efaced6c6c3f26592cbc4643e6f48b5523cd39fb.tar.gz
KVIrc-efaced6c6c3f26592cbc4643e6f48b5523cd39fb.tar.bz2
KVIrc-efaced6c6c3f26592cbc4643e6f48b5523cd39fb.zip
more work on upnp, quite working now (please test)
fixed inet stuff compilation, added proper rule to CMakeList.txt git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@2249 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src/modules/upnp/manager.cpp')
-rw-r--r--src/modules/upnp/manager.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/modules/upnp/manager.cpp b/src/modules/upnp/manager.cpp
index 2684d5f18..0e8ede840 100644
--- a/src/modules/upnp/manager.cpp
+++ b/src/modules/upnp/manager.cpp
@@ -123,7 +123,19 @@ bool Manager::isGatewayAvailable()
return (m_pActiveIgdControlPoint != 0 && m_pActiveIgdControlPoint->isGatewayAvailable());
}
+ // Add a port mapping
+void Manager::addPortMapping(const QString &protocol, const QString &remoteHost, int externalPort, const QString &internalClient, int internalPort, const QString &description, bool enabled, int leaseDuration)
+{
+ if(m_pActiveIgdControlPoint != 0)
+ m_pActiveIgdControlPoint->addPortMapping(protocol, remoteHost, externalPort, internalClient, internalPort, description, enabled, leaseDuration);
+}
+// Delete a port mapping
+void Manager::deletePortMapping(const QString &protocol, const QString &remoteHost, int externalPort)
+{
+ if(m_pActiveIgdControlPoint != 0)
+ m_pActiveIgdControlPoint->deletePortMapping(protocol, remoteHost, externalPort);
+}
// The broadcast failed
void Manager::slotBroadcastTimeout()
@@ -131,6 +143,7 @@ void Manager::slotBroadcastTimeout()
if(!m_bBroadcastFoundIt)
{
qDebug() << "UPnP::Manager: Timeout, no broadcast response received!" << endl;
+
m_bBroadcastFailed = true;
}
}