Created
August 22, 2012 19:02
-
-
Save macdonst/3428432 to your computer and use it in GitHub Desktop.
IP Address example plugin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cordova.define("cordova/plugin/ipaddress", | |
function(require, exports, module) { | |
var exec = require("cordova/exec"); | |
var IPAddress = function () {}; | |
var IPAddressError = function(code, message) { | |
this.code = code || null; | |
this.message = message || ''; | |
}; | |
IPAddressError.NO_IP_ADDRESS = 0; | |
IPAddress.prototype.get = function(success,fail) { | |
exec(success,fail,"ipAddress", | |
"get",[]); | |
}; | |
var ipAddress = new IPAddress(); | |
module.exports = ipAddress; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment