/* Copyright 2009 Palm, Inc.  All rights reserved. */

var OtaspUtility = Class.create ({
	
	readOtaspStatus: function (response) {
		Mojo.Log.info("otasp status = %j ", response);
		if(response.eventOtasp != undefined) {
			sessionStatus = response.eventOtasp.status;
		}
		if(sessionStatus == "programmingfailed") {
			activationFailed = true;
		} else if(sessionStatus == "programmingsucceeded") {
			isActivated = true;
		}
		Mojo.Controller.stageController.pushScene('provision');
	},
	
	otaspError: function (response) {
		Mojo.Log.error("otasp provision error = %j", response);
		
		activationFailed = true;
		Mojo.Controller.stageController.pushScene('provision');
	}
			
});

var OtaspUtil = new OtaspUtility();
