public EzeResult close()
{
if (null != API)
{
EzeResult result = API.logout();
if (result.getStatus() == Status.SUCCESS)
{
result = API.exit();
if (result.getStatus() == Status.SUCCESS)
{
API.destroyInstance();
result = new EzeResult();
result.setEventName(EventName.LOGOUT);
result.setStatus(Status.SUCCESS);
return(result);
}
else
{
EzeEvent("Exit UnSuccesful", new EventArgs());
return(result);
}
}
else
{
EzeEvent("Close UnSuccesful", new EventArgs());
return(result);
}
}
else
{
EzeEvent("Close UnSuccesful", new EventArgs());
EzeResult result = new EzeResult();
result.setEventName(EventName.LOGOUT);
result.setStatus(Status.FAILURE);
return(result);
}
}