Home | Trees | Index | Help |
---|
Package nattraverso :: Package pynupnp :: Module upnp :: Class UPnPDevice |
|
Method Summary | |
---|---|
Build the device, with the given SOAP proxy, and the meta-infos. | |
twisted.internet.defer.Deferred
|
Add a port mapping in the upnp device. |
twisted.internet.defer.Deferred
|
Triggers an external ip discovery on the upnp device. |
twisted.internet.defer.Deferred
|
Retreive the existing port mappings |
twisted.internet.defer.Deferred
|
Remove an existing port mapping on the device. |
twisted.internet.defer.Deferred
|
Fetch the existing mappings starting at index "mapping_id" from the device. |
Called when we received the external ip address from the device. | |
Called when the port mapping could not be added. | |
Called when we have no more port mappings to retreive, or an error occured while retreiving them. | |
Called when the port mapping could not be removed. | |
The port mapping was successfully added, return None to the deferred. | |
twisted.internet.defer.Deferred
|
Called we we receive a single mapping from the device. |
The port mapping was successfully removed, return None to the deferred. |
Method Details |
---|
__init__(self,
soap_proxy,
info)
Build the device, with the given SOAP proxy, and the meta-infos.
|
add_port_mapping(self, local_ip, intport, extport, desc, proto, lease=0)Add a port mapping in the upnp device. Returns a deferred.
|
get_external_ip(self)Triggers an external ip discovery on the upnp device. Returns a deferred called with the external ip of this host.
|
get_port_mappings(self)Retreive the existing port mappings
|
remove_port_mapping(self, extport, proto)Remove an existing port mapping on the device. Returns a deferred
|
_get_port_mapping(self, mapping_id=0, mappings=None)Fetch the existing mappings starting at index "mapping_id" from the device. To retreive all the mappings call this without parameters.
|
_on_external_ip(self, res)Called when we received the external ip address from the device.
|
_on_no_port_mapping_added(self, failure)Called when the port mapping could not be added. Immediately raise an UPnPError, with the SOAPpy structure inside.
|
_on_no_port_mapping_received(self, failure, mappings)Called when we have no more port mappings to retreive, or an error occured while retreiving them. Either we have a "SpecifiedArrayIndexInvalid" SOAP error, and that's ok, it just means we have finished. If it returns some other error, then we fail with an UPnPError.
|
_on_no_port_mapping_removed(self, failure)Called when the port mapping could not be removed. Immediately raise an UPnPError, with the SOAPpy structure inside.
|
_on_port_mapping_added(self, response)The port mapping was successfully added, return None to the deferred. |
_on_port_mapping_received(self, response, mapping_id, mappings)Called we we receive a single mapping from the device.
|
_on_port_mapping_removed(self, response)The port mapping was successfully removed, return None to the deferred. |
Home | Trees | Index | Help |
---|
Generated by Epydoc 2.1 on Tue Aug 30 14:56:47 2005 | http://epydoc.sf.net |