From 2b015164f4889c1a10e86708545270cc1c6bb998 Mon Sep 17 00:00:00 2001 From: Bryce Curtis Date: Fri, 10 Sep 2010 11:32:18 -0500 Subject: [PATCH] Add hasReturnValue() so that PluginManager can make decision to run an action sync or async. --- framework/src/com/phonegap/api/Plugin.java | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/framework/src/com/phonegap/api/Plugin.java b/framework/src/com/phonegap/api/Plugin.java index 9ca7281c..05ee7efd 100755 --- a/framework/src/com/phonegap/api/Plugin.java +++ b/framework/src/com/phonegap/api/Plugin.java @@ -17,12 +17,20 @@ public interface Plugin { /** * Executes the request and returns PluginResult. * - * @param action The plugin to execute. - * @param args JSONArry of arguments for the plugin. - * @return A PluginResult object with a status and message. + * @param action The action to execute. + * @param args JSONArry of arguments for the plugin. + * @return A PluginResult object with a status and message. */ PluginResult execute(String action, JSONArray args); + /** + * Identifies if action to be executed returns a value. + * + * @param action The action to execute + * @return T=returns value + */ + public boolean hasReturnValue(String action); + /** * Sets the context of the Plugin. This can then be used to do things like * get file paths associated with the Activity.