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

var DownloadupdateMojoService = Class.create( {
  initialize: function() {
  },
  
  progress: function(callback, callbackFail, sceneController) {
  	console.log("Updates App: download progress");
    return sceneController.serviceRequest(DownloadupdateMojoService.identifier, {
      method: 'Progress',
			parameters: { subscribe: true },
			onSuccess: callback,
			onFailure: callbackFail
    });
  },
  cancel: function(callback, callbackFail, sceneController) {
  	console.log("Updates App: download cancel");
    return sceneController.serviceRequest(DownloadupdateMojoService.identifier, {
      method: 'Cancel',
			parameters: { },
			onSuccess: callback,
			onFailure: callbackFail
    });
  }
});

DownloadupdateMojoService.identifier = 'palm://com.palm.download';


var DownloadupdateMockService = Class.create( {
  initialize: function() {
  },
  
  progress: function(callback, callbackFail, sceneController) {
  	console.log("Updates Mock App: download progress");
  },
  
  cancel: function(callback, callbackFail, sceneController) {
  	console.log("Updates Mock App: download cancel");
  }
});