2
0

Bump External dependencies.

This commit is contained in:
Maarten Billemont
2013-08-11 00:08:25 -04:00
parent 77439af486
commit 8375808cdc
224 changed files with 13810 additions and 2949 deletions

View File

@@ -28,6 +28,7 @@
NSMutableDictionary *requestIDMap_;
BOOL skipAuthorization_;
NSDictionary *additionalHTTPHeaders_;
NSDictionary *urlQueryParameters_;
}
// Queries included in this batch. Each query should have a unique requestID.
@@ -42,6 +43,10 @@
// additionalHTTPHeaders.
@property (copy) NSDictionary *additionalHTTPHeaders;
// Any URL query parameters to add to the query (useful for debugging with some
// services).
@property (copy) NSDictionary *urlQueryParameters;
+ (id)batchQuery;
+ (id)batchQueryWithQueries:(NSArray *)array;

View File

@@ -22,7 +22,8 @@
@implementation GTLBatchQuery
@synthesize shouldSkipAuthorization = skipAuthorization_,
additionalHTTPHeaders = additionalHTTPHeaders_;
additionalHTTPHeaders = additionalHTTPHeaders_,
urlQueryParameters = urlQueryParameters_;
+ (id)batchQuery {
GTLBatchQuery *obj = [[[self alloc] init] autorelease];
@@ -49,6 +50,7 @@
- (void)dealloc {
[queries_ release];
[additionalHTTPHeaders_ release];
[urlQueryParameters_ release];
[requestIDMap_ release];
[super dealloc];

View File

@@ -28,6 +28,7 @@
- (BOOL)shouldSkipAuthorization;
- (void)executionDidStop;
- (NSDictionary *)additionalHTTPHeaders;
- (NSDictionary *)urlQueryParameters;
- (GTLUploadParameters *)uploadParameters;
@end
@@ -78,7 +79,7 @@
// or data must be provided.
@property (copy) GTLUploadParameters *uploadParameters;
// Any url query parameters to add to the query (useful for debugging with some
// Any URL query parameters to add to the query (useful for debugging with some
// services).
@property (copy) NSDictionary *urlQueryParameters;

View File

@@ -755,7 +755,7 @@ static NSString *ETagIfPresent(GTLObject *obj) {
// Build up the array of RPC calls.
NSMutableArray *rpcPayloads = [NSMutableArray arrayWithCapacity:numberOfQueries];
NSMutableSet *requestIDs = [NSMutableSet setWithCapacity:numberOfQueries];
NSMutableArray *requestIDs = [NSMutableSet setWithCapacity:numberOfQueries];
for (GTLQuery *query in queries) {
NSString *methodName = query.methodName;
NSDictionary *parameters = query.JSON;
@@ -772,6 +772,10 @@ static NSString *ETagIfPresent(GTLObject *obj) {
@"additionalHTTPHeaders disallowed on queries added to a batch - query %@ (%@)",
requestID, methodName);
GTL_DEBUG_ASSERT(query.urlQueryParameters == nil,
@"urlQueryParameters disallowed on queries added to a batch - query %@ (%@)",
requestID, methodName);
GTL_DEBUG_ASSERT(query.uploadParameters == nil,
@"uploadParameters disallowed on queries added to a batch - query %@ (%@)",
requestID, methodName);
@@ -802,10 +806,16 @@ static NSString *ETagIfPresent(GTLObject *obj) {
BOOL mayAuthorize = (batchCopy ? !batchCopy.shouldSkipAuthorization : YES);
// urlQueryParameters on the queries are currently unsupport during a batch
// as it's not clear how to map them.
NSURL *rpcURL = self.rpcURL;
// We'll use the batch query's URL parameters, and ignore the URL parameters
// specified on the individual queries.
NSDictionary *urlQueryParameters = batch.urlQueryParameters;
if ([urlQueryParameters count] > 0) {
rpcURL = [GTLUtilities URLWithString:[rpcURL absoluteString]
queryParameters:urlQueryParameters];
}
GTLServiceTicket *resultTicket = [self fetchObjectWithURL:rpcURL
objectClass:[GTLBatchResult class]
bodyObject:nil