Upnp: add blacklisted state

This commit is contained in:
Yann Diorcet 2013-08-08 11:36:49 +02:00
parent 480c643418
commit c212173648
3 changed files with 7 additions and 1 deletions

View file

@ -306,6 +306,7 @@ enum _LinphoneUpnpState{
LinphoneUpnpStateNotAvailable, /**< uPnP is not available */
LinphoneUpnpStateOk, /**< uPnP is enabled */
LinphoneUpnpStateKo, /**< uPnP processing has failed */
LinphoneUpnpStateBlacklisted, /**< IGD router is blacklisted */
};
/**

View file

@ -229,7 +229,7 @@ void linphone_upnp_igd_callback(void *cookie, upnp_igd_event event, void *arg) {
lupnp->state = LinphoneUpnpStateNotAvailable;
} else if(blacklisted) {
ms_message("uPnP IGD: Router is blacklisted");
lupnp->state = LinphoneUpnpStateNotAvailable;
lupnp->state = LinphoneUpnpStateBlacklisted;
} else {
ms_message("uPnP IGD: Connected");
lupnp->state = LinphoneUpnpStateOk;

View file

@ -327,6 +327,11 @@ public interface LinphoneCore {
* Ko
*/
static public UpnpState Ko = new UpnpState(6, "Ko");
/**
* Blacklisted
*/
static public UpnpState Blacklisted = new UpnpState(6, "Blacklisted");
protected final int mValue;
private final String mStringValue;