cordova-zebra-printer/www/ZebraPrinter.js

25 lines
724 B
JavaScript
Raw Normal View History

2018-04-27 06:54:16 -04:00
var exec = require('cordova/exec');
exports.discover = function (success, error) {
exec(success, error, 'ZebraPrinter', 'discover', []);
};
exports.connect = function (address, success, error) {
exec(success, error, 'ZebraPrinter', 'connect', [address]);
};
exports.disconnect = function (success, error) {
exec(success, error, 'ZebraPrinter', 'disconnect', []);
};
exports.printerStatus = function(success, error){
exec(success, error, 'ZebraPrinter', 'printerStatus', []);
}
exports.isConnected = function (success, error) {
exec(success, error, 'ZebraPrinter', 'isConnected', []);
};
exports.print = function (cpcl, success, error) {
exec(success, error, 'ZebraPrinter', 'print', [cpcl]);
2018-04-27 06:54:16 -04:00
};