chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pweschm...@apache.org
Subject svn commit: r1455067 - in /chemistry/objectivecmis/trunk/ObjectiveCMIS: Common/CMISConstants.h Common/CMISConstants.m Utils/CMISDateUtil.m Utils/CMISHttpUploadRequest.m
Date Mon, 11 Mar 2013 09:22:10 GMT
Author: pweschmidt
Date: Mon Mar 11 09:22:10 2013
New Revision: 1455067

URL: http://svn.apache.org/r1455067
Log:
DateUtil needed to be a bit more lenient (in case minutes aren't provided in the TZ string);
cmis property added to constants; some checking in the base64 streaming in HttpUploadRequest

Modified:
    chemistry/objectivecmis/trunk/ObjectiveCMIS/Common/CMISConstants.h
    chemistry/objectivecmis/trunk/ObjectiveCMIS/Common/CMISConstants.m
    chemistry/objectivecmis/trunk/ObjectiveCMIS/Utils/CMISDateUtil.m
    chemistry/objectivecmis/trunk/ObjectiveCMIS/Utils/CMISHttpUploadRequest.m

Modified: chemistry/objectivecmis/trunk/ObjectiveCMIS/Common/CMISConstants.h
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/trunk/ObjectiveCMIS/Common/CMISConstants.h?rev=1455067&r1=1455066&r2=1455067&view=diff
==============================================================================
--- chemistry/objectivecmis/trunk/ObjectiveCMIS/Common/CMISConstants.h (original)
+++ chemistry/objectivecmis/trunk/ObjectiveCMIS/Common/CMISConstants.h Mon Mar 11 09:22:10
2013
@@ -39,7 +39,7 @@ extern NSString * const kCMISPropertyIsM
 extern NSString * const kCMISPropertyIsLatestMajorVersion;
 extern NSString * const kCMISPropertyChangeToken;
 extern NSString * const kCMISPropertyBaseTypeId;
-
+extern NSString * const kCMISPropertyCheckinComment;
 // Property values
 extern NSString * const kCMISPropertyObjectTypeIdValueDocument;
 extern NSString * const kCMISPropertyObjectTypeIdValueFolder;

Modified: chemistry/objectivecmis/trunk/ObjectiveCMIS/Common/CMISConstants.m
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/trunk/ObjectiveCMIS/Common/CMISConstants.m?rev=1455067&r1=1455066&r2=1455067&view=diff
==============================================================================
--- chemistry/objectivecmis/trunk/ObjectiveCMIS/Common/CMISConstants.m (original)
+++ chemistry/objectivecmis/trunk/ObjectiveCMIS/Common/CMISConstants.m Mon Mar 11 09:22:10
2013
@@ -40,7 +40,7 @@ NSString * const kCMISPropertyIsMajorVer
 NSString * const kCMISPropertyIsLatestMajorVersion = @"cmis:isLatestMajorVersion";
 NSString * const kCMISPropertyChangeToken = @"cmis:changeToken";
 NSString * const kCMISPropertyBaseTypeId = @"cmis:baseTypeId";
-
+NSString * const kCMISPropertyCheckinComment = @"cmis:checkinComment";
 // Property values
 
 NSString * const kCMISPropertyObjectTypeIdValueDocument = @"cmis:document";

Modified: chemistry/objectivecmis/trunk/ObjectiveCMIS/Utils/CMISDateUtil.m
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/trunk/ObjectiveCMIS/Utils/CMISDateUtil.m?rev=1455067&r1=1455066&r2=1455067&view=diff
==============================================================================
--- chemistry/objectivecmis/trunk/ObjectiveCMIS/Utils/CMISDateUtil.m (original)
+++ chemistry/objectivecmis/trunk/ObjectiveCMIS/Utils/CMISDateUtil.m Mon Mar 11 09:22:10 2013
@@ -139,14 +139,15 @@
                     }
                     
                     if (![scanner scanString:@":" intoString:nil]) {
-                        CMISLogDebug(@"No timezone minute found in time string '%@'", string);
-                        return nil;
+                        tzMinute = 0;
                     }
-                    
-                    if (![scanner scanInteger:&tzMinute]) {
-                        CMISLogDebug(@"No timezone minute found in time string '%@'", string);
-                        return nil;
+                    else{
+                        if (![scanner scanInteger:&tzMinute]) {
+                            CMISLogDebug(@"No timezone minute found in time string '%@'",
string);
+                            return nil;
+                        }
                     }
+                    
                     components.timeZone = [NSTimeZone timeZoneForSecondsFromGMT:(tzSign *
(tzHour * 3600 + tzMinute * 60))];
                 } else { // no time zone specified, assume local time
                     components.timeZone = [NSTimeZone defaultTimeZone];

Modified: chemistry/objectivecmis/trunk/ObjectiveCMIS/Utils/CMISHttpUploadRequest.m
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/trunk/ObjectiveCMIS/Utils/CMISHttpUploadRequest.m?rev=1455067&r1=1455066&r2=1455067&view=diff
==============================================================================
--- chemistry/objectivecmis/trunk/ObjectiveCMIS/Utils/CMISHttpUploadRequest.m (original)
+++ chemistry/objectivecmis/trunk/ObjectiveCMIS/Utils/CMISHttpUploadRequest.m Mon Mar 11 09:22:10
2013
@@ -197,6 +197,7 @@ authenticationProvider:(id<CMISAuthentic
             NSMutableDictionary *headers = [NSMutableDictionary dictionaryWithDictionary:self.additionalHeaders];
             [headers setValue:[NSString stringWithFormat:@"%llu", self.encodedLength] forKey:@"Content-Length"];
             self.additionalHeaders = [NSDictionary dictionaryWithDictionary:headers];
+//            [self.encoderStream open];
         }
     }
     else
@@ -205,9 +206,12 @@ authenticationProvider:(id<CMISAuthentic
             urlRequest.HTTPBodyStream = self.inputStream;
         }
     }
-    
+    BOOL startSuccess = [super startRequest:urlRequest];
+    if (self.base64Encoding) {
+        [self.encoderStream open];
+    }
 
-    return [super startRequest:urlRequest];
+    return startSuccess;
 }
 
 #pragma CMISCancellableRequest method
@@ -315,6 +319,21 @@ totalBytesExpectedToWrite:(NSInteger)tot
              first we check if we can fill the output stream buffer with data
              the criteria for that is that bufferOffset equals the buffer limit
              */
+            if (self.base64InputStream) {
+                NSStreamStatus inputStatus = self.base64InputStream.streamStatus;
+                if (inputStatus == NSStreamStatusNotOpen || inputStatus == NSStreamStatusClosed)
{
+                    CMISLogDebug(@"*** Base 64 Input Stream is not yet open or closed. The
status is %d ***", inputStatus);
+                }
+                else if (inputStatus == NSStreamStatusAtEnd){
+                    CMISLogDebug(@"*** Base 64 Input Stream has reached the end ***");
+                }
+                else if (inputStatus == NSStreamStatusError){
+                    CMISLogDebug(@"Input stream error");
+                    [self stopSendWithStatus:@"Network read error"];
+                }
+            }
+            
+            
             if (self.bufferOffset == self.bufferLimit) {
                 if (self.streamStartData != nil) {
                     self.streamStartData = nil;
@@ -433,7 +452,6 @@ totalBytesExpectedToWrite:(NSInteger)tot
     self.encoderStream = outputStream;
     self.encoderStream.delegate = self;
     [self.encoderStream scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode];
-    [self.encoderStream open];
 }
 
 



Mime
View raw message