var exec = require('cordova/exec');

var coolMethod = function () {};

coolMethod.readCard = function (success, error) {
    exec(success, error, 'UHFR', 'readCard', []);
}

coolMethod.inventoryCard = function (success, error) {
    exec(success, error, 'UHFR', 'inventoryCard', []);
}

coolMethod.stopInventoryCard = function (success, error) {
    exec(success, error, 'UHFR', 'stopInventoryCard', []);
}

coolMethod.searchCard = function (success, error) {
    exec(success, error, 'UHFR', 'searchCard', []);
}

coolMethod.writeCard = function (arg, success, error) {
    exec(success, error, 'UHFR', 'writeCard', [arg]);
}

coolMethod.setPower = function (arg, success, error) {
    exec(success, error, 'UHFR', 'setPower', [arg]);
}

coolMethod.startWork = function (success, error) {
    exec(success, error, 'UHFR', 'startWork', []);
}

coolMethod.endWork = function (success, error) {
    exec(success, error, 'UHFR', 'endWork', []);
}

coolMethod.selectCard = function (arg, success, error) {
    exec(success, error, 'UHFR', 'selectCard', [arg]);
}

module.exports = coolMethod;