QuickTestResults.memory = undefined;
QuickTestResults.wifi = undefined;
QuickTestResults.bluetooth = undefined;
QuickTestResults.modem = undefined;

function QuickTestResults()
{
}

QuickTestResults.initialize = function()
{
	QuickTestResults.memory = new Array();
	QuickTestResults.wifi = new Array();
	QuickTestResults.bluetooth = new Array();
	QuickTestResults.modem = new Array();
}

QuickTestResults.reportIssue = function( area, code )
{
	switch(area)
	{
		case "memory":
			QuickTestResults.memory[QuickTestResults.memory.length] = code;
			Logging.log("Memory", code);
			break;

		case "wifi":
			QuickTestResults.wifi[QuickTestResults.wifi.length] = code;
			Logging.log("Wi-Fi", code);
			break;

		case "bluetooth":
			QuickTestResults.bluetooth[QuickTestResults.bluetooth.length] = code;
			Logging.log("Bluetooth", code);
			break;

		case "modem":
			QuickTestResults.modem[QuickTestResults.modem.length] = code;
			Logging.log("Modem", code);
			break;
	}

}

QuickTestResults.setMemoryResult = function( code )
{
	QuickTestResults.reportIssue("memory", code);
}

QuickTestResults.setWifiResult = function( code )
{
	QuickTestResults.reportIssue("wifi", code);
}

QuickTestResults.setBluetoothResult = function( code )
{
	QuickTestResults.reportIssue("bluetooth", code);
}

QuickTestResults.setModemResult = function( code )
{
	QuickTestResults.reportIssue("modem", code);
}

QuickTestResults.getNextScene = function(stage)
{
	if((QuickTestResults.memory.length == 0) && (QuickTestResults.wifi.length == 0) &&
		(QuickTestResults.bluetooth.length == 0) && (QuickTestResults.modem.length == 0))
	{
		stage.pushScene("quickTestSuccess");
	}
	else
	{
		stage.pushScene("quickTestFailure");
	}
}

