Skip to content

Commit

Permalink
AWS SDK for iOS 0.1.0.2 (Beta)
Browse files Browse the repository at this point in the history
  • Loading branch information
amazonwebservices committed Jan 26, 2011
1 parent 3dffd46 commit 5bb4aab
Show file tree
Hide file tree
Showing 17 changed files with 12 additions and 6 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
4 changes: 3 additions & 1 deletion src/Amazon.S3/Model/S3GetObjectResponse.m
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

@implementation S3GetObjectResponse

@synthesize contentType;

// This method overrides the S3Response version, processing x-aws-meta-
// headers, passing all others to the superclass.
-(void)setValue:(id)value forHTTPHeaderField:(NSString *)header
Expand Down Expand Up @@ -58,12 +60,12 @@ -(void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data
else {
[super connection:connection didReceiveData:data];
}

}

-(void)dealloc
{
[metadata release];
[contentType release];

[super dealloc];
}
Expand Down
6 changes: 3 additions & 3 deletions src/Amazon.S3/Model/S3Response.m
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ -(void)setValue:(id)value forHTTPHeaderField:(NSString *)header

//NSLog( @"Setting response value [%@] from header [%@] with value [%@]", keyName, header, value );

NSString *typeName = [S3Response getTypeOfPropertyNamed:keyName];
NSString *typeName = [self getTypeOfPropertyNamed:keyName];

if ([typeName isEqualToString:@"T@\"NSString\""]) {
[self setValue:value forKey:keyName];
Expand All @@ -78,9 +78,9 @@ -(NSDate *)parseDateHeader:(NSString *)dateString
}


+(NSString *)getTypeOfPropertyNamed:(NSString *)propertyName
-(NSString *)getTypeOfPropertyNamed:(NSString *)propertyName
{
objc_property_t property = class_getProperty( self, [propertyName UTF8String] );
objc_property_t property = class_getProperty( [self class], [propertyName UTF8String] );
if (NULL == property) { return nil; }

const char *propertyAttributes = property_getAttributes( property );
Expand Down
2 changes: 1 addition & 1 deletion src/include/AmazonSDKUtil.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#import <UIKit/UIKit.h>
#import "AmazonClientException.h"

#define AWS_SDK_VERSION @"0.1.0"
#define AWS_SDK_VERSION @"0.1.0.2"
#define AWS_SDK_USER_AGENT_FORMAT @"aws-sdk-iOS/%@ %@/%@ %@"
#define kISO8061DateFormat @"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"

Expand Down
4 changes: 4 additions & 0 deletions src/include/S3/S3GetObjectResponse.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,14 @@

/** Contains the response from a getObject operation */
@interface S3GetObjectResponse : S3Response {
NSString *contentType;
NSMutableDictionary *metadata;
NSOutputStream *outputStream;
}

/** The content type of the data in the response */
@property(nonatomic, retain) NSString* contentType;

/** Get the value for a user-defined metadata key.
* @param aKey The key of the metadata.
* @return The metadata value corresponding to the supplied key.
Expand Down
2 changes: 1 addition & 1 deletion src/include/S3/S3Response.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,6 @@
-(NSDate *)parseDateHeader:(NSString *)dateString;

/** Determines the type of a property in a response. */
+(NSString *)getTypeOfPropertyNamed:(NSString *)propertyName;
-(NSString *)getTypeOfPropertyNamed:(NSString *)propertyName;

@end

0 comments on commit 5bb4aab

Please sign in to comment.