You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2013/01/14 20:57:49 UTC

[2/2] ios commit: Added a namespace prefix to a constant.

Updated Branches:
  refs/heads/master 518318377 -> cc4688d1d


Added a namespace prefix to a constant.

Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/cc4688d1
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/cc4688d1
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/cc4688d1

Branch: refs/heads/master
Commit: cc4688d1da402fd2079fbcb0cce267055259e4a2
Parents: 256c6b9
Author: mwoghiren <ma...@gmail.com>
Authored: Mon Jan 14 14:05:37 2013 -0500
Committer: mwoghiren <ma...@gmail.com>
Committed: Mon Jan 14 14:05:37 2013 -0500

----------------------------------------------------------------------
 CordovaLib/Classes/CDVFile.h         |    2 +-
 CordovaLib/Classes/CDVFile.m         |   28 ++++++++++++++--------------
 CordovaLib/Classes/CDVFileTransfer.m |    4 ++--
 3 files changed, 17 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/cc4688d1/CordovaLib/Classes/CDVFile.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVFile.h b/CordovaLib/Classes/CDVFile.h
index 919fdef..4862921 100644
--- a/CordovaLib/Classes/CDVFile.h
+++ b/CordovaLib/Classes/CDVFile.h
@@ -42,7 +42,7 @@ enum CDVFileSystemType {
 };
 typedef int CDVFileSystemType;
 
-extern NSString* const kAssetsLibraryPrefix;
+extern NSString* const kCDVAssetsLibraryPrefix;
 
 @interface CDVFile : CDVPlugin {
     NSString* appDocsPath;

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/cc4688d1/CordovaLib/Classes/CDVFile.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVFile.m b/CordovaLib/Classes/CDVFile.m
index b7900ec..11b2b77 100644
--- a/CordovaLib/Classes/CDVFile.m
+++ b/CordovaLib/Classes/CDVFile.m
@@ -32,7 +32,7 @@ extern NSString * const NSURLIsExcludedFromBackupKey __attribute__((weak_import)
     NSString* const NSURLIsExcludedFromBackupKey = @"NSURLIsExcludedFromBackupKey";
 #endif
 
-NSString* const kAssetsLibraryPrefix = @"assets-library://";
+NSString* const kCDVAssetsLibraryPrefix = @"assets-library://";
 
 @implementation CDVFile
 
@@ -332,7 +332,7 @@ NSString* const kAssetsLibraryPrefix = @"assets-library://";
     NSDictionary* options = [command.arguments objectAtIndex:2 withDefault:nil];
 
     // return unsupported result for assets-library URLs
-    if ([fullPath hasPrefix:kAssetsLibraryPrefix]) {
+    if ([fullPath hasPrefix:kCDVAssetsLibraryPrefix]) {
         CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_MALFORMED_URL_EXCEPTION messageAsString:@"getFile not supported for assets-library URLs."];
         [self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
         return;
@@ -435,7 +435,7 @@ NSString* const kAssetsLibraryPrefix = @"assets-library://";
     NSString* fullPath = [command.arguments objectAtIndex:0];
 
     // return unsupported result for assets-library URLs
-    if ([fullPath hasPrefix:kAssetsLibraryPrefix]) {
+    if ([fullPath hasPrefix:kCDVAssetsLibraryPrefix]) {
         CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_MALFORMED_URL_EXCEPTION messageAsString:@"remove not supported for assets-library URLs."];
         [self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
         return;
@@ -479,7 +479,7 @@ NSString* const kAssetsLibraryPrefix = @"assets-library://";
     NSString* argPath = [command.arguments objectAtIndex:0];
 
     // return unsupported result for assets-library URLs
-    if ([argPath hasPrefix:kAssetsLibraryPrefix]) {
+    if ([argPath hasPrefix:kCDVAssetsLibraryPrefix]) {
         CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_MALFORMED_URL_EXCEPTION messageAsString:@"getMetadata not supported for assets-library URLs."];
         [self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
         return;
@@ -526,7 +526,7 @@ NSString* const kAssetsLibraryPrefix = @"assets-library://";
     NSDictionary* options = [command.arguments objectAtIndex:1 withDefault:nil];
 
     // return unsupported result for assets-library URLs
-    if ([filePath hasPrefix:kAssetsLibraryPrefix]) {
+    if ([filePath hasPrefix:kCDVAssetsLibraryPrefix]) {
         CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_MALFORMED_URL_EXCEPTION messageAsString:@"setMetadata not supported for assets-library URLs."];
         [self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
         return;
@@ -579,7 +579,7 @@ NSString* const kAssetsLibraryPrefix = @"assets-library://";
     NSString* fullPath = [command.arguments objectAtIndex:0];
 
     // return unsupported result for assets-library URLs
-    if ([fullPath hasPrefix:kAssetsLibraryPrefix]) {
+    if ([fullPath hasPrefix:kCDVAssetsLibraryPrefix]) {
         CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_MALFORMED_URL_EXCEPTION messageAsString:@"remove not supported for assets-library URLs."];
         [self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
         return;
@@ -626,7 +626,7 @@ NSString* const kAssetsLibraryPrefix = @"assets-library://";
     NSString* fullPath = [command.arguments objectAtIndex:0];
 
     // return unsupported result for assets-library URLs
-    if ([fullPath hasPrefix:kAssetsLibraryPrefix]) {
+    if ([fullPath hasPrefix:kCDVAssetsLibraryPrefix]) {
         CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_MALFORMED_URL_EXCEPTION messageAsString:@"removeRecursively not supported for assets-library URLs."];
         [self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
         return;
@@ -739,7 +739,7 @@ NSString* const kAssetsLibraryPrefix = @"assets-library://";
     NSString* newName = ([arguments count] > 2) ? [arguments objectAtIndex:2] : [srcFullPath lastPathComponent];          // use last component from appPath if new name not provided
 
     // return unsupported result for assets-library URLs
-    if ([srcFullPath hasPrefix:kAssetsLibraryPrefix]) {
+    if ([srcFullPath hasPrefix:kCDVAssetsLibraryPrefix]) {
         CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_MALFORMED_URL_EXCEPTION messageAsString:@"moveTo/copyTo not supported for assets-library URLs."];
         [self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
         return;
@@ -891,7 +891,7 @@ NSString* const kAssetsLibraryPrefix = @"assets-library://";
     NSString* argPath = [command.arguments objectAtIndex:0];
 
     // return unsupported result for assets-library URLs
-    if ([argPath hasPrefix:kAssetsLibraryPrefix]) {
+    if ([argPath hasPrefix:kCDVAssetsLibraryPrefix]) {
         CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_MALFORMED_URL_EXCEPTION messageAsString:@"getFileMetadata not supported for assets-library URLs."];
         [self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
         return;
@@ -935,7 +935,7 @@ NSString* const kAssetsLibraryPrefix = @"assets-library://";
     NSString* fullPath = [command.arguments objectAtIndex:0];
 
     // return unsupported result for assets-library URLs
-    if ([fullPath hasPrefix:kAssetsLibraryPrefix]) {
+    if ([fullPath hasPrefix:kCDVAssetsLibraryPrefix]) {
         CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_MALFORMED_URL_EXCEPTION messageAsString:@"readEntries not supported for assets-library URLs."];
         [self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
         return;
@@ -992,7 +992,7 @@ NSString* const kAssetsLibraryPrefix = @"assets-library://";
     }
 
     // return unsupported result for assets-library URLs
-    if ([argPath hasPrefix:kAssetsLibraryPrefix]) {
+    if ([argPath hasPrefix:kCDVAssetsLibraryPrefix]) {
         CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_MALFORMED_URL_EXCEPTION messageAsString:@"readAsText not supported for assets-library URLs."];
         [self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
         return;
@@ -1055,7 +1055,7 @@ NSString* const kAssetsLibraryPrefix = @"assets-library://";
     }
 
     // return unsupported result for assets-library URLs
-    if ([argPath hasPrefix:kAssetsLibraryPrefix]) {
+    if ([argPath hasPrefix:kCDVAssetsLibraryPrefix]) {
         CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_MALFORMED_URL_EXCEPTION messageAsString:@"readAsDataURL not supported for assets-library URLs."];
         [self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
         return;
@@ -1135,7 +1135,7 @@ NSString* const kAssetsLibraryPrefix = @"assets-library://";
     unsigned long long pos = (unsigned long long)[[command.arguments objectAtIndex:1] longLongValue];
 
     // return unsupported result for assets-library URLs
-    if ([argPath hasPrefix:kAssetsLibraryPrefix]) {
+    if ([argPath hasPrefix:kCDVAssetsLibraryPrefix]) {
         CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_MALFORMED_URL_EXCEPTION messageAsString:@"truncate not supported for assets-library URLs."];
         [self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
         return;
@@ -1182,7 +1182,7 @@ NSString* const kAssetsLibraryPrefix = @"assets-library://";
     unsigned long long pos = (unsigned long long)[[arguments objectAtIndex:2] longLongValue];
 
     // return unsupported result for assets-library URLs
-    if ([argPath hasPrefix:kAssetsLibraryPrefix]) {
+    if ([argPath hasPrefix:kCDVAssetsLibraryPrefix]) {
         CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_MALFORMED_URL_EXCEPTION messageAsString:@"write not supported for assets-library URLs."];
         [self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
         return;

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/cc4688d1/CordovaLib/Classes/CDVFileTransfer.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVFileTransfer.m b/CordovaLib/Classes/CDVFileTransfer.m
index 24d013f..edda9f7 100644
--- a/CordovaLib/Classes/CDVFileTransfer.m
+++ b/CordovaLib/Classes/CDVFileTransfer.m
@@ -272,7 +272,7 @@ static CFIndex WriteDataToStream(NSData* data, CFWriteStreamRef stream)
     NSString* argPath = [command.arguments objectAtIndex:0];
 
     // return unsupported result for assets-library URLs
-    if ([argPath hasPrefix:kAssetsLibraryPrefix]) {
+    if ([argPath hasPrefix:kCDVAssetsLibraryPrefix]) {
         CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_MALFORMED_URL_EXCEPTION messageAsString:@"upload not supported for assets-library URLs."];
         [self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
         return;
@@ -323,7 +323,7 @@ static CFIndex WriteDataToStream(NSData* data, CFWriteStreamRef stream)
     NSString* objectId = [command.arguments objectAtIndex:3];
 
     // return unsupported result for assets-library URLs
-    if ([filePath hasPrefix:kAssetsLibraryPrefix]) {
+    if ([filePath hasPrefix:kCDVAssetsLibraryPrefix]) {
         CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_MALFORMED_URL_EXCEPTION messageAsString:@"download not supported for assets-library URLs."];
         [self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
         return;