Deprecate CDVCommandDelegate's execute and registerPlugin methods.
Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/commit/20cdaf9d Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/tree/20cdaf9d Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/diff/20cdaf9d Branch: refs/heads/master Commit: 20cdaf9d18ee367ec97551309bf606686d5aba64 Parents: f1ec68f Author: Andrew Grieve <agri...@chromium.org> Authored: Fri Oct 5 22:27:12 2012 -0400 Committer: Andrew Grieve <agri...@chromium.org> Committed: Tue Oct 9 15:41:18 2012 -0400 ---------------------------------------------------------------------- CordovaLib/Classes/CDVCommandDelegate.h | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/20cdaf9d/CordovaLib/Classes/CDVCommandDelegate.h ---------------------------------------------------------------------- diff --git a/CordovaLib/Classes/CDVCommandDelegate.h b/CordovaLib/Classes/CDVCommandDelegate.h index 7f42785..c17a5d5 100644 --- a/CordovaLib/Classes/CDVCommandDelegate.h +++ b/CordovaLib/Classes/CDVCommandDelegate.h @@ -17,6 +17,7 @@ under the License. */ +#import "CDVAvailability.h" #import "CDVInvokedUrlCommand.h" @class CDVPlugin; @@ -26,12 +27,12 @@ - (NSString*)pathForResource:(NSString*)resourcepath; - (id)getCommandInstance:(NSString*)pluginName; -- (void)registerPlugin:(CDVPlugin*)plugin withClassName:(NSString*)className; -// TODO(agrieve): Deprecate this method. Plugins should not be using this -// interface to call other plugins, since it will result in bogus callbacks -// being made. Instead, they should use getCommandInstance and call methods -// directly. -- (BOOL)execute:(CDVInvokedUrlCommand*)command; +- (void)registerPlugin:(CDVPlugin*)plugin withClassName:(NSString*)className CDV_DEPRECATED(2.2, "Use CDVViewController to register plugins, or use Cordova.plist."); + +// Plugins should not be using this interface to call other plugins since it +// will result in bogus callbacks being made. +- (BOOL)execute:(CDVInvokedUrlCommand*)command CDV_DEPRECATED(2.2, "Use direct method calls instead."); + // Sends a plugin result to the JS. - (void)sendPluginResult:(CDVPluginResult*)result callbackId:(NSString*)callbackId; // Evaluates the given JS.