


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

/**
 * Provides access to ibeacon.
 */
var ibeacon = {
	
	startIBeaconScan : function(callback,errorFunc,proximityUUID,major,minor){
		cordova.exec(callback,errorFunc,"BCIBeacon","startIBeaconScan",[{"proximityUUID":proximityUUID,"major":major,"minor":minor}]);
	},
	
	stopIBeaconScan : function(callback,errorFunc,proximityUUID,major,minor){
		cordova.exec(callback,errorFunc,"BCIBeacon","stopIBeaconScan",[{"proximityUUID":proximityUUID,"major":major,"minor":minor}]);
	},
	
	startIBeaconAdvertising : function(callback,errorFunc,proximityUUID,major,minor,identifier){
		cordova.exec(callback,errorFunc,"BCIBeacon","startIBeaconAdvertising",[{"proximityUUID":proximityUUID,"major":major,"minor":minor,"identifier":identifier}]);
	},
	
	addEventListener : function(eventName,callback,errorFunc){
		cordova.exec(callback,errorFunc,"BCIBeacon","addEventListener",[{"eventName":eventName}]);
	},
};
module.exports = ibeacon;



