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

var EraseMojoService = Class.create({
    initialize: function(){
    },
    eraseVar: function(sceneController){
        console.log('Erase Var');
        return sceneController.serviceRequest(EraseMojoService.identifier, {
            method: 'EraseVar',
            parameters: {},
            onSuccess: function(result){
                console.log('erase var on success' + Object.toJSON(result));
            },
            onFailure: function(result){
                console.log('erase var on failure' + Object.toJSON(result));
            }
        });
    },
    eraseAll: function(sceneController){
        console.log('Erase All');
        return sceneController.serviceRequest(EraseMojoService.identifier, {
            method: 'EraseAll',
            parameters: {},
            onSuccess: function(result){
                console.log('erase all on success' + Object.toJSON(result));
            },
            onFailure: function(result){
                console.log('erase all on failure' + Object.toJSON(result));
            }
        });
    },
	
	deviceWipe: function(sceneController) {
		console.log('wipe All');
		return sceneController.serviceRequest(EraseMojoService.identifier, {
            method: 'Wipe',
            parameters: {},
            onSuccess: function(result){
                console.log('Device Wipe on Success' + Object.toJSON(result));
            },
            onFailure: function(result){
                console.log('Device Wipe on failure' + Object.toJSON(result));
            }
        });
	},
	eraseMedia: function(sceneController){
        console.log('Erase Media Drive');
        return sceneController.serviceRequest(EraseMojoService.identifier, {
            method: 'EraseMedia',
            parameters: {},
            onSuccess: function(result){
                console.log('erase usb on success' + Object.toJSON(result));
            },
            onFailure: function(result){
                console.log('erase usb on failure' + Object.toJSON(result));
            }
        });
    },
});

EraseMojoService.identifier = 'palm://com.palm.storage/erase';

