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

Mojo.Controller.SceneController.addMethods( {
    sendCommand: function(command, parameters){
        var target;
        if (typeof(parameters) === "string") {
            target = command + "://" + parameters;
        }
        else {
            target = command + "://" + Object.toJSON(parameters);
        }
        return this.serviceRequest("palm://com.palm.applicationManager", {
            method: 'open',
            parameters: {
                target: target
            }
        });
    }
});
