Plugin XML settings

This commit is contained in:
Michael Bykovski 2017-07-11 15:35:12 +02:00
parent fb261d6c67
commit ac5b47b1a0
3 changed files with 43 additions and 49 deletions

View File

@ -21,7 +21,7 @@
<source-file src="src/android/NanoHTTPDWebserver.java" target-dir="src/org/apache/cordova/plugin"/> <source-file src="src/android/NanoHTTPDWebserver.java" target-dir="src/org/apache/cordova/plugin"/>
<config-file target="config.xml" parent="/*"> <config-file target="config.xml" parent="/*">
<feature name="Webserver"> <feature name="Webserver">
<param name="android-package" value="Webserver"/> <param name="android-package" value="org.apache.cordova.plugin.Webserver"/>
</feature> </feature>
</config-file> </config-file>
</platform> </platform>

View File

@ -1,4 +1,3 @@
cordova.define("cordova-plugin-webserver-tests.tests", function(require, exports, module) {
exports.defineAutoTests = function() { exports.defineAutoTests = function() {
describe('Webserver (window.webserver)', function () { describe('Webserver (window.webserver)', function () {
@ -91,5 +90,3 @@ exports.defineManualTests = function(contentEl, createActionButton) {
); );
}); });
}; };
});

View File

@ -1,7 +1,6 @@
cordova.define("cordova-plugin-webserver.webserver", function(require, exports, module) { var WEBSERVER_CLASS = "Webserver";
var WEBSERVER_CLASS = "Webserver";
exports.start = function(success_callback, error_callback, port) { exports.start = function(success_callback, error_callback, port) {
cordova.exec( cordova.exec(
success_callback, success_callback,
error_callback, error_callback,
@ -9,9 +8,9 @@ cordova.define("cordova-plugin-webserver.webserver", function(require, exports,
"start", "start",
[port] [port]
); );
}; };
exports.onRequest = function(success_callback) { exports.onRequest = function(success_callback) {
cordova.exec( cordova.exec(
success_callback, success_callback,
function(error) {console.error(error)}, function(error) {console.error(error)},
@ -19,14 +18,14 @@ cordova.define("cordova-plugin-webserver.webserver", function(require, exports,
"onRequest", "onRequest",
[] []
); );
}; };
exports.sendResponse = function( exports.sendResponse = function(
requestId, requestId,
params, params,
success_callback, success_callback,
error_callback error_callback
) { ) {
cordova.exec( cordova.exec(
success_callback, success_callback,
error_callback, error_callback,
@ -34,9 +33,9 @@ cordova.define("cordova-plugin-webserver.webserver", function(require, exports,
"sendResponse", "sendResponse",
[requestId, params] [requestId, params]
); );
}; };
exports.stop = function(success_callback, error_callback) { exports.stop = function(success_callback, error_callback) {
cordova.exec( cordova.exec(
success_callback, success_callback,
error_callback, error_callback,
@ -44,6 +43,4 @@ cordova.define("cordova-plugin-webserver.webserver", function(require, exports,
"stop", "stop",
[] []
); );
}; };
});