
function SceneminiCallEnding(options) {
	this.options = options;
    
    this.FlagEnding = false;
    this.FlagDropped = false;
    this.FlagPopupTextDrop = false;
     
    this.CallEndingView = null;
	this.CallEndingDim = null;
    this.CallEndingMsgLabel = null;
    
    this.PopupMsg = null;
    this.OkBtn = null;
  
}

SceneminiCallEnding.prototype.initialize = function () {
	alert("SceneminiCallEnding.initialize()");
	this.create();
}

SceneminiCallEnding.prototype.handleShow = function () {
	alert("SceneminiCallEnding.handleShow()");
	
	$("#miniCallEnding_id").show();
	$("#skype_default_dim").show();
    this.update();
}

SceneminiCallEnding.prototype.handleHide = function () {
	alert("SceneminiCallEnding.handleHide()");
	$("#miniCallEnding_id").hide();
	$("#skype_default_dim").hide();
	if(this.FlagPopupTextDrop == true)
	{
		this.CallEndingMsgLabel.SetText(IDWS_MOIP_SKYPE_CALL_ENDED);
	    this.FlagPopupTextDrop = false; 
	}
}

SceneminiCallEnding.prototype.handleFocus = function () {
	alert("SceneminiCallEnding.handleFocus()");
}

SceneminiCallEnding.prototype.handleBlur = function () {
	alert("SceneminiCallEnding.handleBlur()");
}

SceneminiCallEnding.prototype.handleKeyDown = function (keyCode) {
	alert("SceneminiCallEnding.handleKeyDown(" + keyCode + ")");

	PluginAPIMgr.PlayAudio(keyCode);
	
	switch (keyCode) {
		case $.sfKey.LEFT:
		case $.sfKey.RIGHT:
		case $.sfKey.UP:
		case $.sfKey.DOWN:
		case $.sfKey.ENTER:
			break;
           
        case $.sfKey.RETURN:
        	$.sfKey.block(event);
        	break;
        	
		case $.sfKey.EXIT:
            $.sfKey.block(event);
			break;
            
       case 147:  //infolink
       case 261:  //contents
       case 115:  //wiselink
            ProcMgr.processInfolinkKey(); 
			break;
	}
	if(Flag_Hidden_State==false)
	event.stopPropagation();
}

///////////////////////////////////////////////////////////////////////////////////////////////////////////

SceneminiCallEnding.prototype.create = function(){
    alert("SceneminiCallEnding.create()");
    
    this.CallEndingView = new View("CallEnding");
	//this.CallEndingView.SetBgImage(g_Image.IMAGE_MINI_POPUP_DIM_BG);
	this.CallEndingView.CreatePopupBG(1,'call_ending_popup_style');


    this.CallEndingMsgLabel= new Label(null, "CallEndingMassage");
    
}


//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

SceneminiCallEnding.prototype.setFlagEnding = function(flag_ending)
{
    this.FlagEnding = flag_ending;
}

SceneminiCallEnding.prototype.setFlagDropped = function(flag_dropped)
{
    this.FlagDropped = flag_dropped;
}

SceneminiCallEnding.prototype.update = function()
{
	alert("SceneminiCallEnding.update() ");

   if(this.FlagEnding == true)
   {
        this.CallEndingMsgLabel.SetText(IDWS_MOIP_SKYPE_CALL_ENDED);
        this.FlagEnding = false;
        
        $.sfScene.get({id:WIDGET.name, scope:WIDGET.id}).PrintKPILog(IDWS_MOIP_SKYPE_CALL_ENDED); 
   }
   else
   {
        if(this.FlagDropped == true)
        {
            this.CallEndingMsgLabel.SetText(TV_SID_CALL_DROPPED);        
            this.FlagDropped = false;  //init
            
            $.sfScene.get({id:WIDGET.name, scope:WIDGET.id}).PrintKPILog(TV_SID_CALL_DROPPED); 
        }
        else
        {
			this.CallEndingMsgLabel.SetText(IDWS_MOIP_SKYPE_CALL_ENDED);
			
			$.sfScene.get({id:WIDGET.name, scope:WIDGET.id}).PrintKPILog(IDWS_MOIP_SKYPE_CALL_ENDED); 
        }
   }
   
	  
}



