incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaz...@apache.org
Subject ios commit: [CDV-1099] Remove deprecated functions in CDVPlugin (verifyArguments, appViewController)
Date Thu, 19 Jul 2012 02:48:20 GMT
Updated Branches:
  refs/heads/master 48549bb03 -> c46974c73


[CDV-1099] Remove deprecated functions in CDVPlugin (verifyArguments, appViewController)


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/c46974c7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/tree/c46974c7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/diff/c46974c7

Branch: refs/heads/master
Commit: c46974c73519d766c7cb2599d036380ff229c41f
Parents: 48549bb
Author: Shazron Abdullah <shazron@apache.org>
Authored: Wed Jul 18 19:48:11 2012 -0700
Committer: Shazron Abdullah <shazron@apache.org>
Committed: Wed Jul 18 19:48:11 2012 -0700

----------------------------------------------------------------------
 CordovaLib/Classes/CDVPlugin.h |   19 -------------------
 CordovaLib/Classes/CDVPlugin.m |   34 ----------------------------------
 2 files changed, 0 insertions(+), 53 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/c46974c7/CordovaLib/Classes/CDVPlugin.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVPlugin.h b/CordovaLib/Classes/CDVPlugin.h
index bb793b7..b3f9c7c 100644
--- a/CordovaLib/Classes/CDVPlugin.h
+++ b/CordovaLib/Classes/CDVPlugin.h
@@ -25,10 +25,6 @@
 
 #define CDVPluginHandleOpenURLNotification	@"CDVPluginHandleOpenURLNotification"
 
-#define VERIFY_ARGUMENTS(args, expectedCount, callbackId) if (![self verifyArguments:args
withExpectedCount:expectedCount andCallbackId:callbackId \
-callerFileName:__FILE__ callerFunctionName:__PRETTY_FUNCTION__]) { return; }
-
-
 @interface CDVPlugin : NSObject {
 }
 
@@ -55,24 +51,9 @@ callerFileName:__FILE__ callerFunctionName:__PRETTY_FUNCTION__]) { return;
}
  */
 
 - (id) appDelegate;
-- (UIViewController*) appViewController 
-#ifdef __clang__
-__attribute__ ((deprecated("Use the viewController property instead. This will be removed
in Cordova 2.0.0")));
-#else
-__attribute__ ((deprecated()));
-#endif
 
 - (NSString*) writeJavascript:(NSString*)javascript;
 - (NSString*) success:(CDVPluginResult*)pluginResult callbackId:(NSString*)callbackId;
 - (NSString*) error:(CDVPluginResult*)pluginResult callbackId:(NSString*)callbackId;
 
-
-- (BOOL) verifyArguments:(NSMutableArray*)arguments withExpectedCount:(NSUInteger)expectedCount
andCallbackId:(NSString*)callbackId 
-		  callerFileName:(const char*)callerFileName callerFunctionName:(const char*)callerFunctionName
-#ifdef __clang__
-__attribute__ ((deprecated("This will be removed in Cordova 2.0.0")));
-#else
-__attribute__ ((deprecated()));
-#endif
-
 @end

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/c46974c7/CordovaLib/Classes/CDVPlugin.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVPlugin.m b/CordovaLib/Classes/CDVPlugin.m
index 2ebf4ef..34747da 100644
--- a/CordovaLib/Classes/CDVPlugin.m
+++ b/CordovaLib/Classes/CDVPlugin.m
@@ -63,34 +63,6 @@
     return self;
 }
 
-/* 
-	The arguments passed in should not included the callbackId. 
-	If argument count is not as expected, it will call the error callback using PluginResult
(if callbackId is available),
-	or it will write to stderr using NSLog.
- 
-	Usage is through the VERIFY_ARGUMENTS macro.
- */
-- (BOOL) verifyArguments:(NSMutableArray*)arguments withExpectedCount:(NSUInteger)expectedCount
andCallbackId:(NSString*)callbackId 
-		  callerFileName:(const char*)callerFileName callerFunctionName:(const char*)callerFunctionName

-{
-	NSUInteger argc = [arguments count];
-	BOOL ok = (argc >= expectedCount); // allow for optional arguments
-	
-	if (!ok) {
-		NSString* errorString = [NSString stringWithFormat:@"Incorrect no. of arguments for plugin:
was %d, expected %d", argc, expectedCount];
-		if (callbackId) {
-			NSString* callbackId = [arguments objectAtIndex:0];
-			CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR
messageAsString:errorString];
-			[self writeJavascript:[pluginResult toErrorCallbackString:callbackId]];
-		} else {
-			NSString* fileName = [[[[NSString alloc] initWithBytes:callerFileName length:strlen(callerFileName)
encoding:NSUTF8StringEncoding] autorelease] lastPathComponent];
-			NSLog(@"%@::%s - Error: %@", fileName, callerFunctionName, errorString);
-		}
-	}
-	
-	return ok;
-}
-
 /*
 // NOTE: for onPause and onResume, calls into JavaScript must not call or trigger any blocking
UI, like alerts 
 - (void) onPause {}
@@ -143,12 +115,6 @@
 	return [[UIApplication sharedApplication] delegate];
 }
 
-/* deprecated - just use the viewController property */
-- (UIViewController*) appViewController
-{
-	return self.viewController;
-}
-
 - (NSString*) writeJavascript:(NSString*)javascript
 {
 	return [self.webView stringByEvaluatingJavaScriptFromString:javascript];


Mime
View raw message