cordova.define("org.cordova.mysoft", function(require, exports, module) { var exec = require('cordova/exec');
               var images;
var my = {
    back: function() {
               var success = function(message) { };
               var error = function(message) { alert(message); };
               cordova.exec(success, error, "MysoftPlugin", "back", []);
    },
    close: function() {
               var success = function(message) { };
               var error = function(message) { alert(message); };
               cordova.exec(success, error, "MysoftPlugin", "close", []);
    },
    hideNavigateionBar : function(hide){
               var success = function(message) { };
               var error = function(message) { alert(message); };
       cordova.exec(success,error,"MysoftPlugin","hideNavigateionBar",[hide]);
    },
    DeviceInfo:function(){
               var success = function(resp)
               {
                    var c = document.getElementById("log")
                    c.innerHTML = resp;
               };
               
               var error = function(message) { alert(message); };
               cordova.exec(success,error,"MysoftPlugin","GetDeviceInfo",[]);
    },
    SetTitle: function(title) {
               var success = function(message) { };
               var error = function(message) { alert(message); };
               cordova.exec(success, error, "MysoftPlugin", "SetNavigateionTitle", [title]);
    },
               reloadAppUrl: function() {
               var success = function(message) { };
               var error = function(message) { alert(message); };
               cordova.exec(success, error, "MysoftPlugin", "reloadAppUrl", []);
               },
               
    chooseImage : function (){
               var success = function(res)
               {
                    images = res.images;
               };
               
               var error = function(message) { alert(message); };
               cordova.exec(success, error, "MysoftPlugin", "chooseImage",[{
                                                                           maxCount:3,
                                                                           width:200,
                                                                           height:200
                            }]);
    },
    previewImage: function(){
               var success = function(res)
               {
               };
               
               var error = function(message) { alert(message); };
               
               
               
               cordova.exec(success, error, "MysoftPlugin", "previewImage",[{
                                                                            current: images[1].localId,
                                                                            urls: [
                                                                                   images[0].localId,
                                                                                   images[1].localId,
                                                                                   images[2].localId
                                                                                   ]
                                                                            }]);
    },
    uploadImage : function (){
               var success = function(message) { };
               var error = function(message) { alert(message); };
               cordova.exec(success, error, "MysoftPlugin", "uploadImage",[{
                                                                           appCode:'2003',
                                                                           maxSize:200,
                                                                           sync:false,
                                                                           urls:[
                                                                                 images[0].localId,
                                                                                 images[1].localId,
                                                                                 images[2].localId
                                                                                 ]
                                                                           }]);
               },
               getImageByLocalid : function (){
               var success = function(message) { };
               var error = function(message) { alert(message); };
               cordova.exec(success, error, "MysoftPlugin", "getImageByLocalid",[{
                                                                           maxSize:200,
                                                                           localIds:[
                                                                                 images[0].localId,
                                                                                 images[1].localId,
                                                                                 images[2].localId
                                                                                 ]
                                                                           }]);
               },
               onBusinessStatusChanged : function (){
               var success = function(message) { };
               var error = function(message) { alert(message); };
               cordova.exec(success, error, "MysoftPlugin", "onBusinessStatusChanged",[{
                                                                                 msgid:200,
                                                                                  status:xxx
                                                                                 }]);
               },
               onBusinessProcessRemoved : function (){
               var success = function(message) { };
               var error = function(message) { alert(message); };
               cordova.exec(success, error, "MysoftPlugin", "onBusinessProcessRemoved",[{
                                                                                       msgid:200,
                                                                                       status:xxx
                                                                                       }]);
               }

}

module.exports = my;

});
