• Main Page
  • Classes
  • Files
  • File List

include/AmazonWebServiceClient.h

00001 /*
00002  * Copyright 2010 Amazon.com, Inc. or its affiliates. All Rights Reserved.
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License").
00005  * You may not use this file except in compliance with the License.
00006  * A copy of the License is located at
00007  *
00008  *  http://aws.amazon.com/apache2.0
00009  *
00010  * or in the "license" file accompanying this file. This file is distributed
00011  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
00012  * express or implied. See the License for the specific language governing
00013  * permissions and limitations under the License.
00014  */
00015 
00016 #import "AmazonSDKUtil.h"
00017 #import "AmazonAuthUtils.h"
00018 #import "AmazonClientException.h"
00019 #import "AmazonLogger.h"
00020 #import "AmazonServiceException.h"
00021 #import "AmazonSignatureException.h"
00022 #import "AmazonUnmarshallerXMLParserDelegate.h"
00023 #import "AmazonServiceRequest.h"
00024 #import "AmazonServiceResponse.h"
00025 #import "AmazonServiceResponseUnmarshaller.h"
00026 
00027 @interface AmazonWebServiceClient : NSObject 
00028 {
00029         NSString* accessKey;
00030         NSString* secretKey;
00031         NSString* endpoint;
00032         int maxRetries;
00033 }
00034 
00035 @property(nonatomic, retain) NSString* endpoint;
00036 @property(nonatomic) int maxRetries;
00037 
00043 -(id)initWithAccessKey:(NSString*)accessKey withSecretKey:(NSString*)secretKey;
00044 
00050 -(NSURLRequest *)signURLRequest:(NSMutableURLRequest *)request;
00051 
00052 -(void)signRequest:(AmazonServiceRequest *)serviceRequest;
00053 
00061 +(AmazonServiceResponse *)constructResponseFromRequest:(AmazonServiceRequest *)request;
00062 
00068 -(AmazonServiceResponse *)invoke:(AmazonServiceRequest *)request;
00069 
00070 -(NSString*)getV2StringToSign:(NSURL*)theEndpoint request:(AmazonServiceRequest *)serviceRequest;
00071 
00072 -(AmazonServiceResponse *)parseResponseBody:(NSData *)body withDelegateType:(Class)delegateType;
00073 -(void)pauseExponentially:(int)tryCount; 
00074 -(bool)shouldRetry:(AmazonServiceResponse *)response;
00075 
00076 @end
00077 
00078 

Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.