libktorrent
2.2.0
|
#include <upnprouter.h>
Classes | |
class | Visitor |
Signals | |
void | stateChanged () |
void | xmlFileDownloaded (UPnPRouter *r, bool success) |
Public Member Functions | |
UPnPRouter (const QString &server, const QUrl &location, bool verbose=false) | |
void | addService (const UPnPService &s) |
void | downloadXMLFile () |
void | forward (const net::Port &port) |
UPnPDeviceDescription & | getDescription () |
Get the device description. | |
const UPnPDeviceDescription & | getDescription () const |
Get the device description (const version) | |
QString | getError () const |
Get the current error (null string if there is none) | |
QString | getExternalIP () const |
Get the router's external IP. | |
QUrl | getLocation () const |
Get the location of it's xml description. | |
QString | getServer () const |
Get the name of the server. | |
void | setVerbose (bool v) |
Disable or enable verbose logging. | |
void | undoForward (const net::Port &port, bt::WaitJob *waitjob=0) |
void | visit (Visitor *visitor) const |
Class representing a UPnP enabled router. This class is also used to communicate with the router.
Definition at line 96 of file upnprouter.h.
bt::UPnPRouter::UPnPRouter | ( | const QString & | server, |
const QUrl & | location, | ||
bool | verbose = false |
||
) |
Construct a router.
server | The name of the router |
location | The location of it's xml description file |
verbose | Print lots of debug info |
void bt::UPnPRouter::addService | ( | const UPnPService & | s | ) |
Add a service to the router.
s | The service |
void bt::UPnPRouter::downloadXMLFile | ( | ) |
Download the XML File of the router.
void bt::UPnPRouter::forward | ( | const net::Port & | port | ) |
Forward a local port
port | The local port to forward |
|
signal |
Internal state has changed, a forwarding succeeded or failed, or an undo forwarding succeeded or failed.
void bt::UPnPRouter::undoForward | ( | const net::Port & | port, |
bt::WaitJob * | waitjob = 0 |
||
) |
Undo forwarding
port | The port |
waitjob | When this is set the jobs needs to be added to the waitjob, so we can wait for their completeion at exit |
void bt::UPnPRouter::visit | ( | Visitor * | visitor | ) | const |
Visit all forwardings
visitor | The Visitor |
|
signal |
Signal which indicates that the XML was downloaded successfully or not.
r | The router which emitted the signal |
success | Whether or not it succeeded |