BB10-Cordova/UPnP/plugin/src/blackberry10/index.js
function (success, fail, args, env) {
                var result = new PluginResult(args, env);
		args = JSON.parse(decodeURIComponent(args["input"]));
		result.ok(uPnP.getInstance().discover(result.callbackId, args), false);
	}
function (success, fail, args, env) {
                var result = new PluginResult(args, env);
		args = JSON.parse(decodeURIComponent(args["input"]));
		result.ok(uPnP.getInstance().discover(result.callbackId, args), false);
	}
These methods call into JNEXT.UPnP which handles the communication through the JNEXT plugin to upnp_js.cpp