Add callbackId to Plugin.execute() so result can be sent back when overlapping calls to same plugin occur.

This commit is contained in:
Bryce Curtis
2010-10-05 20:35:51 -05:00
parent 23b02e7267
commit 9adb85a64b
16 changed files with 111 additions and 125 deletions
@@ -15,13 +15,14 @@ public class CryptoHandler extends Plugin {
}
/**
* Executes the request and returns CommandResult.
* Executes the request and returns PluginResult.
*
* @param action The command to execute.
* @param args JSONArry of arguments for the command.
* @return A CommandResult object with a status and message.
* @param action The action to execute.
* @param args JSONArry of arguments for the plugin.
* @param callbackId The callback id used when calling back into JavaScript.
* @return A PluginResult object with a status and message.
*/
public PluginResult execute(String action, JSONArray args) {
public PluginResult execute(String action, JSONArray args, String callbackId) {
PluginResult.Status status = PluginResult.Status.OK;
String result = "";